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:
@@ -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
|
||||
=====
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user