aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-12-05 03:30:18 +0100
committerPřemysl Eric Janouch <p@janouch.name>2023-12-05 03:35:33 +0100
commitbae640a11600559f2dc54f8b7dbef50c3e49c6d5 (patch)
treeda87b2b3c773e931306644a56afb37627fdbd4ce
parent52c17c8a16762341caf2fb7b72f41130ac5a4052 (diff)
downloadfiv-bae640a11600559f2dc54f8b7dbef50c3e49c6d5.tar.gz
fiv-bae640a11600559f2dc54f8b7dbef50c3e49c6d5.tar.xz
fiv-bae640a11600559f2dc54f8b7dbef50c3e49c6d5.zip
Circumvent JPEG QS & libjpeg-turbo incompatibility
UV upsampling visibly requires JPEG QS to update its code to follow recent changes within libjpeg-turbo.
-rw-r--r--fiv-io.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fiv-io.c b/fiv-io.c
index ed93e62..d89be3a 100644
--- a/fiv-io.c
+++ b/fiv-io.c
@@ -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,