From 9f01177f72ad55acf98c0160a9ddbe67ea3271ff Mon Sep 17 00:00:00 2001 From: Kornel Date: Thu, 25 Feb 2021 21:43:59 +0000 Subject: [PATCH] Default to single-scan DC People don't like green faces --- README-mozilla.txt | 4 ++-- jcparam.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README-mozilla.txt b/README-mozilla.txt index 7187f939..11d2e5c2 100644 --- a/README-mozilla.txt +++ b/README-mozilla.txt @@ -24,7 +24,7 @@ mozjpeg's implementation of the libjpeg API includes an extensibility framework that allows new features to be added without modifying the transparent libjpeg compress/decompress structures (which would break backward ABI compatibility.) Extension parameters are placed into the opaque jpeg_comp_master structure, and -a set of accessor functions and globally unique tokens allows for +a set of accessor functions and globally unique tokens allows for getting/setting those parameters without directly accessing the structure. Currently, only the accessor functions necessary to support the mozjpeg @@ -185,7 +185,7 @@ Integer Extension Parameters Supported by mozjpeg 8 = Table from: An Improved Detection Model for DCT Coefficient Quantization (1993) Peterson, Ahumada and Watson -* JINT_DC_SCAN_OPT_MODE (default: 1) +* JINT_DC_SCAN_OPT_MODE (default: 0) Specifies the DC scan optimization mode. The following options are available: 0 = One scan for all components diff --git a/jcparam.c b/jcparam.c index 06942337..a432a491 100644 --- a/jcparam.c +++ b/jcparam.c @@ -487,9 +487,9 @@ jpeg_set_defaults (j_compress_ptr cinfo) /* Choose JPEG colorspace based on input space, set defaults accordingly */ jpeg_default_colorspace(cinfo); - - cinfo->master->dc_scan_opt_mode = 1; - + + cinfo->master->dc_scan_opt_mode = 0; + #ifdef C_PROGRESSIVE_SUPPORTED if (cinfo->master->compress_profile == JCP_MAX_COMPRESSION) { cinfo->master->optimize_scans = TRUE;