Circumvent JPEG QS & libjpeg-turbo incompatibility

UV upsampling visibly requires JPEG QS to update its code
to follow recent changes within libjpeg-turbo.
This commit is contained in:
Přemysl Eric Janouch 2023-12-05 03:30:18 +01:00
parent 52c17c8a16
commit bae640a116
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -1614,11 +1614,16 @@ load_libjpeg_enhanced(
{
// Go for the maximum quality setting.
jpegqs_control_t opts = {
.flags = JPEGQS_DIAGONALS | JPEGQS_JOINT_YUV | JPEGQS_UPSAMPLE_UV,
.flags = JPEGQS_DIAGONALS | JPEGQS_JOINT_YUV,
.threads = g_get_num_processors(),
.niter = 3,
};
// Waiting for https://github.com/ilyakurdyukov/jpeg-quantsmooth/issues/28
#if LIBJPEG_TURBO_VERSION_NUMBER < 2001090
opts.flags |= JPEGQS_UPSAMPLE_UV;
#endif
(void) jpegqs_start_decompress(cinfo, &opts);
while (cinfo->output_scanline < cinfo->output_height)
(void) jpeg_read_scanlines(cinfo, lines + cinfo->output_scanline,