TJBench: Set TJ*OPT_PROGRESSIVE with -progressive

The documented behavior of the -progressive option is to use progressive
entropy coding in JPEG images generated by compression and transform
operations.  However, setting TJFLAG_PROGRESSIVE was insufficient to
accomplish that, because TJBench doesn't enable lossless transformation
if xformOpt == 0.
This commit is contained in:
DRC
2023-01-20 13:14:11 -06:00
parent b99e7590b0
commit 98a6455875
3 changed files with 6 additions and 0 deletions

View File

@@ -48,6 +48,10 @@ image dimensions.
8. Fixed an issue whereby the Java version of TJBench did not accept a range of
quality values.
9. Fixed an issue whereby, when `-progressive` was passed to TJBench, the JPEG
input image was not transformed into a progressive JPEG image prior to
decompression.
2.1.4
=====

View File

@@ -813,6 +813,7 @@ final class TJBench {
} else if (argv[i].equalsIgnoreCase("-progressive")) {
System.out.println("Using progressive entropy coding\n");
flags |= TJ.FLAG_PROGRESSIVE;
xformOpt |= TJTransform.OPT_PROGRESSIVE;
} else if (argv[i].equalsIgnoreCase("-rgb"))
pf = TJ.PF_RGB;
else if (argv[i].equalsIgnoreCase("-rgbx"))

View File

@@ -864,6 +864,7 @@ int main(int argc, char *argv[])
} else if (!strcasecmp(argv[i], "-progressive")) {
printf("Using progressive entropy coding\n\n");
flags |= TJFLAG_PROGRESSIVE;
xformOpt |= TJXOPT_PROGRESSIVE;
} else if (!strcasecmp(argv[i], "-rgb"))
pf = TJPF_RGB;
else if (!strcasecmp(argv[i], "-rgbx"))