Skip to content

Commit

Permalink
Disable libjxl lossless mode for float16
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwixz committed Oct 8, 2024
1 parent 7ce271f commit 68d637d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/imageio/format/jxl.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ int write_image(struct dt_imageio_module_data_t *data,
// Must preserve original profile for lossless mode
basic_info.uses_original_profile = JXL_TRUE;
LIBJXL_ASSERT(JxlEncoderSetFrameDistance(frame_settings, 0.0f));
LIBJXL_ASSERT(JxlEncoderSetFrameLossless(frame_settings, JXL_TRUE));

// Do not enable libjxl lossless mode for float16, see #17487
if (!(params->bpp == 16 && params->pixel_type))
LIBJXL_ASSERT(JxlEncoderSetFrameLossless(frame_settings, JXL_TRUE));
}
else
{
Expand Down

0 comments on commit 68d637d

Please sign in to comment.