Various doc tweaks
- "Optimized baseline entropy coding" = "Huffman table optimization" "Optimized baseline entropy coding" was meant to emphasize that the feature is only useful when generating baseline (single-scan lossy 8-bit-per-sample Huffman-coded) JPEG images, because it is automatically enabled when generating Huffman-coded progressive (multi-scan), 12-bit-per-sample, and lossless JPEG images. However, Huffman table optimization isn't actually an integral part of those non-baseline modes. You can forego Huffman table optimization with 12-bit data precision if you supply your own Huffman tables. The spec doesn't require it with progressive or lossless mode, either, although our implementation does. Furthermore, "baseline" describes more than just the type of entropy coding used. It was incorrect to say that optimized "baseline" entropy coding is automatically enabled for Huffman-coded progressive, 12-bit-per-sample, and lossless JPEG images, since those are clearly not baseline images. - "Progressive entropy coding" = "Progressive JPEG" "Progressive" describes more than just the type of entropy coding used. (In fact, both Huffman-coded and arithmetic-coded images can be progressive.) - Mention that TJPARAM_OPTIMIZE/TJ.PARAM_OPTIMIZE can be used with lossless transformation as well. - General wordsmithing - Formatting tweaks
This commit is contained in:
@@ -566,7 +566,7 @@ final class TJBench {
|
||||
precision = tjt.get(TJ.PARAM_PRECISION);
|
||||
cs = tjt.get(TJ.PARAM_COLORSPACE);
|
||||
if (tjt.get(TJ.PARAM_PROGRESSIVE) == 1)
|
||||
System.out.println("JPEG image uses progressive entropy coding\n");
|
||||
System.out.println("JPEG image is progressive\n");
|
||||
if (tjt.get(TJ.PARAM_ARITHMETIC) == 1)
|
||||
System.out.println("JPEG image uses arithmetic entropy coding\n");
|
||||
tjt.set(TJ.PARAM_PROGRESSIVE, progressive ? 1 : 0);
|
||||
@@ -782,8 +782,8 @@ final class TJBench {
|
||||
System.out.println("-lossless = Generate lossless JPEG images when compressing (implies");
|
||||
System.out.println(" -subsamp 444). PSV is the predictor selection value (1-7).");
|
||||
System.out.println("-maxmemory = Memory limit (in megabytes) for intermediate buffers used with");
|
||||
System.out.println(" progressive JPEG compression and decompression, optimized baseline entropy");
|
||||
System.out.println(" coding, lossless JPEG compression, and lossless transformation");
|
||||
System.out.println(" progressive JPEG compression and decompression, Huffman table");
|
||||
System.out.println(" optimization, lossless JPEG compression, and lossless transformation");
|
||||
System.out.println(" [default = no limit]");
|
||||
System.out.println("-maxpixels = Input image size limit (in pixels) [default = no limit]");
|
||||
System.out.println("-nowrite = Do not write reference or output images (improves consistency of");
|
||||
@@ -821,11 +821,11 @@ final class TJBench {
|
||||
System.out.println(" the scaled MCU width.");
|
||||
System.out.println("-fastdct = Use the fastest DCT/IDCT algorithm available");
|
||||
System.out.println("-fastupsample = Use the fastest chrominance upsampling algorithm available");
|
||||
System.out.println("-optimize = Use optimized baseline entropy coding in JPEG images generated by");
|
||||
System.out.println("-optimize = Compute optimal Huffman tables for JPEG images generated by");
|
||||
System.out.println(" compession and transform operations");
|
||||
System.out.println("-progressive = Use progressive entropy coding in JPEG images generated by");
|
||||
System.out.println(" compression and transform operations (can be combined with -arithmetic;");
|
||||
System.out.println(" implies -optimize unless -arithmetic is also specified)");
|
||||
System.out.println("-progressive = Generate progressive JPEG images when compressing or");
|
||||
System.out.println(" transforming (can be combined with -arithmetic; implies -optimize unless");
|
||||
System.out.println(" -arithmetic is also specified)");
|
||||
System.out.println("-limitscans = Refuse to decompress or transform progressive JPEG images that");
|
||||
System.out.println(" have an unreasonably large number of scans");
|
||||
System.out.println("-scale M/N = When decompressing, scale the width/height of the JPEG image by a");
|
||||
@@ -929,7 +929,7 @@ final class TJBench {
|
||||
optimize = true;
|
||||
xformOpt |= TJTransform.OPT_OPTIMIZE;
|
||||
} else if (argv[i].equalsIgnoreCase("-progressive")) {
|
||||
System.out.println("Using progressive entropy coding\n");
|
||||
System.out.println("Generating progressive JPEG images\n");
|
||||
progressive = true;
|
||||
xformOpt |= TJTransform.OPT_PROGRESSIVE;
|
||||
} else if (argv[i].equalsIgnoreCase("-arithmetic")) {
|
||||
@@ -1128,7 +1128,7 @@ final class TJBench {
|
||||
|
||||
if (optimize && !progressive && !arithmetic && !lossless &&
|
||||
precision != 12)
|
||||
System.out.println("Using optimized baseline entropy coding\n");
|
||||
System.out.println("Computing optimal Huffman tables\n");
|
||||
|
||||
if (precision == 16 && !lossless)
|
||||
throw new Exception("-lossless must be specified along with -precision 16");
|
||||
|
||||
Reference in New Issue
Block a user