From ae92418cc18076cbdd0b38165f6215f2c2f9aa5f Mon Sep 17 00:00:00 2001 From: DRC Date: Sun, 18 Aug 2013 10:47:07 +0000 Subject: [PATCH] Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in TJBench; Wordsmithing; Disable timestamp in generated HTML files to make diffing and merging easier git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1016 632fc199-4ca6-4c93-a231-07263d6284db --- java/Makefile.am | 2 +- java/TJBench.java | 8 +++++-- java/doc/allclasses-frame.html | 2 -- java/doc/allclasses-noframe.html | 2 -- java/doc/constant-values.html | 2 -- java/doc/deprecated-list.html | 2 -- java/doc/help-doc.html | 2 -- java/doc/index-all.html | 2 -- java/doc/index.html | 1 - java/doc/org/libjpegturbo/turbojpeg/TJ.html | 23 +++++++++---------- .../libjpegturbo/turbojpeg/TJCompressor.html | 2 -- .../turbojpeg/TJCustomFilter.html | 2 -- .../turbojpeg/TJDecompressor.html | 2 -- .../turbojpeg/TJScalingFactor.html | 2 -- .../libjpegturbo/turbojpeg/TJTransform.html | 2 -- .../libjpegturbo/turbojpeg/TJTransformer.html | 2 -- .../libjpegturbo/turbojpeg/package-frame.html | 2 -- .../turbojpeg/package-summary.html | 2 -- .../libjpegturbo/turbojpeg/package-tree.html | 2 -- java/doc/overview-tree.html | 2 -- java/doc/serialized-form.html | 2 -- java/org/libjpegturbo/turbojpeg/TJ.java | 21 +++++++++-------- 22 files changed, 29 insertions(+), 60 deletions(-) diff --git a/java/Makefile.am b/java/Makefile.am index 06d813c8..1307d69a 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -62,7 +62,7 @@ headers: all docs: all mkdir -p ${srcdir}/doc; \ - javadoc -d ${srcdir}/doc -sourcepath ${srcdir} org.libjpegturbo.turbojpeg + javadoc -notimestamp -d ${srcdir}/doc -sourcepath ${srcdir} org.libjpegturbo.turbojpeg endif diff --git a/java/TJBench.java b/java/TJBench.java index c8cca5f6..eaf5fa38 100644 --- a/java/TJBench.java +++ b/java/TJBench.java @@ -1,5 +1,5 @@ /* - * Copyright (C)2009-2012 D. R. Commander. All Rights Reserved. + * Copyright (C)2009-2013 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -600,6 +600,7 @@ class TJBench { System.out.println(" codec"); System.out.println("-accuratedct = Use the most accurate DCT/IDCT algorithms available in the"); System.out.println(" underlying codec"); + System.out.println("-440 = Test 4:4:0 chrominance subsampling instead of 4:2:2"); System.out.println("-quiet = Output results in tabular rather than verbose format"); System.out.println("-yuvencode = Encode RGB input as planar YUV rather than compressing as JPEG"); System.out.println("-yuvdecode = Decode JPEG image to planar YUV rather than RGB"); @@ -636,6 +637,7 @@ class TJBench { byte[] srcBuf = null; int w = 0, h = 0; int minQual = -1, maxQual = -1; int minArg = 1; int retval = 0; + boolean do440 = false; try { @@ -713,6 +715,8 @@ class TJBench { System.out.println("Using most accurate DCT/IDCT algorithm\n"); flags |= TJ.FLAG_ACCURATEDCT; } + if (argv[i].equals("-440")) + do440 = true; if (argv[i].equalsIgnoreCase("-rgb")) pf = TJ.PF_RGB; if (argv[i].equalsIgnoreCase("-rgbx")) @@ -834,7 +838,7 @@ class TJBench { System.out.println(""); System.gc(); for (int i = maxQual; i >= minQual; i--) - doTest(srcBuf, w, h, TJ.SAMP_422, i, argv[0]); + doTest(srcBuf, w, h, do440 ? TJ.SAMP_440 : TJ.SAMP_422, i, argv[0]); System.out.println(""); System.gc(); for (int i = maxQual; i >= minQual; i--) diff --git a/java/doc/allclasses-frame.html b/java/doc/allclasses-frame.html index c02463d0..b2810b52 100644 --- a/java/doc/allclasses-frame.html +++ b/java/doc/allclasses-frame.html @@ -2,12 +2,10 @@ - All Classes - diff --git a/java/doc/allclasses-noframe.html b/java/doc/allclasses-noframe.html index 1f134aa6..ddc3d633 100644 --- a/java/doc/allclasses-noframe.html +++ b/java/doc/allclasses-noframe.html @@ -2,12 +2,10 @@ - All Classes - diff --git a/java/doc/constant-values.html b/java/doc/constant-values.html index 5c6ab692..e4adb67a 100644 --- a/java/doc/constant-values.html +++ b/java/doc/constant-values.html @@ -2,12 +2,10 @@ - Constant Field Values - diff --git a/java/doc/deprecated-list.html b/java/doc/deprecated-list.html index a19b0267..37ca5155 100644 --- a/java/doc/deprecated-list.html +++ b/java/doc/deprecated-list.html @@ -2,12 +2,10 @@ - Deprecated List - diff --git a/java/doc/help-doc.html b/java/doc/help-doc.html index 7fb7c441..b919d0aa 100644 --- a/java/doc/help-doc.html +++ b/java/doc/help-doc.html @@ -2,12 +2,10 @@ - API Help - diff --git a/java/doc/index-all.html b/java/doc/index-all.html index 36435a71..a534d435 100644 --- a/java/doc/index-all.html +++ b/java/doc/index-all.html @@ -2,12 +2,10 @@ - Index - diff --git a/java/doc/index.html b/java/doc/index.html index f187a87e..87aed330 100644 --- a/java/doc/index.html +++ b/java/doc/index.html @@ -2,7 +2,6 @@ - Generated Documentation (Untitled) diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJ.html b/java/doc/org/libjpegturbo/turbojpeg/TJ.html index 2a11b78f..f9054064 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJ.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJ.html @@ -2,12 +2,10 @@ - TJ - @@ -534,6 +532,7 @@ public static final int SAMP_440
4:4:0 chrominance subsampling. The JPEG or YUV image will contain one chrominance component for every 1x2 block of pixels in the source image. + Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.

See Also:
Constant Field Values
@@ -796,11 +795,11 @@ FLAG_FASTDCT public static final int FLAG_FASTDCT
Use the fastest DCT/IDCT algorithm available in the underlying codec. The - default if this flag is not specified is implementation-specific. The - libjpeg implementation, for example, uses the fast algorithm by default - when compressing, because this has been shown to have only a very slight - effect on accuracy, but it uses the accurate algorithm when decompressing, - because this has been shown to have a larger effect. + default if this flag is not specified is implementation-specific. For + example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast + algorithm by default when compressing, because this has been shown to have + only a very slight effect on accuracy, but it uses the accurate algorithm + when decompressing, because this has been shown to have a larger effect.

See Also:
Constant Field Values
@@ -814,11 +813,11 @@ public static final int FLAG_ACCURATEDCT
Use the most accurate DCT/IDCT algorithm available in the underlying codec. The default if this flag is not specified is - implementation-specific. The libjpeg implementation, for example, uses - the fast algorithm by default when compressing, because this has been - shown to have only a very slight effect on accuracy, but it uses the - accurate algorithm when decompressing, because this has been shown to have - a larger effect. + implementation-specific. For example, the implementation of TurboJPEG for + libjpeg[-turbo] uses the fast algorithm by default when compressing, + because this has been shown to have only a very slight effect on accuracy, + but it uses the accurate algorithm when decompressing, because this has + been shown to have a larger effect.

See Also:
Constant Field Values
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html index 871d9bc5..bc3d67e7 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html @@ -2,12 +2,10 @@ - TJCompressor - diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html b/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html index c91978d5..4cb26157 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html @@ -2,12 +2,10 @@ - TJCustomFilter - diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html index d7c6495e..832e4741 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html @@ -2,12 +2,10 @@ - TJDecompressor - diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html b/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html index 9262c49f..af29fc56 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html @@ -2,12 +2,10 @@ - TJScalingFactor - diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html b/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html index 5a319807..3a68c9f8 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html @@ -2,12 +2,10 @@ - TJTransform - diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html index dfef713c..1e76ac8e 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html @@ -2,12 +2,10 @@ - TJTransformer - diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-frame.html b/java/doc/org/libjpegturbo/turbojpeg/package-frame.html index 72860782..f160418d 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/package-frame.html +++ b/java/doc/org/libjpegturbo/turbojpeg/package-frame.html @@ -2,12 +2,10 @@ - org.libjpegturbo.turbojpeg - diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-summary.html b/java/doc/org/libjpegturbo/turbojpeg/package-summary.html index bafbf528..505512c9 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/package-summary.html +++ b/java/doc/org/libjpegturbo/turbojpeg/package-summary.html @@ -2,12 +2,10 @@ - org.libjpegturbo.turbojpeg - diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-tree.html b/java/doc/org/libjpegturbo/turbojpeg/package-tree.html index 40eb9100..e13143d8 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/package-tree.html +++ b/java/doc/org/libjpegturbo/turbojpeg/package-tree.html @@ -2,12 +2,10 @@ - org.libjpegturbo.turbojpeg Class Hierarchy - diff --git a/java/doc/overview-tree.html b/java/doc/overview-tree.html index 93c07d3f..1c12b10e 100644 --- a/java/doc/overview-tree.html +++ b/java/doc/overview-tree.html @@ -2,12 +2,10 @@ - Class Hierarchy - diff --git a/java/doc/serialized-form.html b/java/doc/serialized-form.html index d6162a94..8ba0661b 100644 --- a/java/doc/serialized-form.html +++ b/java/doc/serialized-form.html @@ -2,12 +2,10 @@ - Serialized Form - diff --git a/java/org/libjpegturbo/turbojpeg/TJ.java b/java/org/libjpegturbo/turbojpeg/TJ.java index 9f7c6822..6c6a95da 100644 --- a/java/org/libjpegturbo/turbojpeg/TJ.java +++ b/java/org/libjpegturbo/turbojpeg/TJ.java @@ -61,6 +61,7 @@ public final class TJ { /** * 4:4:0 chrominance subsampling. The JPEG or YUV image will contain one * chrominance component for every 1x2 block of pixels in the source image. + * Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo. */ public static final int SAMP_440 = 4; @@ -300,21 +301,21 @@ public final class TJ { public static final int FLAG_FASTUPSAMPLE = 256; /** * Use the fastest DCT/IDCT algorithm available in the underlying codec. The - * default if this flag is not specified is implementation-specific. The - * libjpeg implementation, for example, uses the fast algorithm by default - * when compressing, because this has been shown to have only a very slight - * effect on accuracy, but it uses the accurate algorithm when decompressing, - * because this has been shown to have a larger effect. + * default if this flag is not specified is implementation-specific. For + * example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast + * algorithm by default when compressing, because this has been shown to have + * only a very slight effect on accuracy, but it uses the accurate algorithm + * when decompressing, because this has been shown to have a larger effect. */ public static final int FLAG_FASTDCT = 2048; /** * Use the most accurate DCT/IDCT algorithm available in the underlying * codec. The default if this flag is not specified is - * implementation-specific. The libjpeg implementation, for example, uses - * the fast algorithm by default when compressing, because this has been - * shown to have only a very slight effect on accuracy, but it uses the - * accurate algorithm when decompressing, because this has been shown to have - * a larger effect. + * implementation-specific. For example, the implementation of TurboJPEG for + * libjpeg[-turbo] uses the fast algorithm by default when compressing, + * because this has been shown to have only a very slight effect on accuracy, + * but it uses the accurate algorithm when decompressing, because this has + * been shown to have a larger effect. */ public static final int FLAG_ACCURATEDCT = 4096;