From 07e982d9b410790ddd40764c10c77b0efca33dd7 Mon Sep 17 00:00:00 2001 From: DRC Date: Thu, 31 Oct 2013 07:11:39 +0000 Subject: [PATCH] Deprecate and undocument the FORCE{MMX|SSE|SSE2|SSE3} flags. These were originally introduced in TurboJPEG/IPP as a way to override the automatic CPU selection in the underlying IPP codec, which was closed source. They are not meaningful anymore, since libjpeg-turbo provides environment variables to accomplish the same thing and since it no longer necessarily uses x86 SIMD code behind the scenes. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1072 632fc199-4ca6-4c93-a231-07263d6284db --- doc/html/group___turbo_j_p_e_g.html | 68 --------------------- doc/html/search/all_74.js | 4 -- java/doc/deprecated-list.html | 30 +++++++++ java/doc/index-all.html | 12 ++-- java/doc/org/libjpegturbo/turbojpeg/TJ.html | 44 +++++-------- java/org/libjpegturbo/turbojpeg/TJ.java | 22 ++----- java/org_libjpegturbo_turbojpeg_TJ.h | 8 --- tjbench.c | 22 ------- turbojpeg.h | 27 +++----- 9 files changed, 63 insertions(+), 174 deletions(-) diff --git a/doc/html/group___turbo_j_p_e_g.html b/doc/html/group___turbo_j_p_e_g.html index d0c1303..2c3395b 100644 --- a/doc/html/group___turbo_j_p_e_g.html +++ b/doc/html/group___turbo_j_p_e_g.html @@ -115,18 +115,6 @@ Macros #define TJFLAG_BOTTOMUP  The uncompressed source/destination image is stored in bottom-up (Windows, OpenGL) order, not top-down (X11) order. More...
  -#define TJFLAG_FORCEMMX - Turn off CPU auto-detection and force TurboJPEG to use MMX code (if the underlying codec supports it.) More...
-  -#define TJFLAG_FORCESSE - Turn off CPU auto-detection and force TurboJPEG to use SSE code (if the underlying codec supports it.) More...
-  -#define TJFLAG_FORCESSE2 - Turn off CPU auto-detection and force TurboJPEG to use SSE2 code (if the underlying codec supports it.) More...
-  -#define TJFLAG_FORCESSE3 - Turn off CPU auto-detection and force TurboJPEG to use SSE3 code (if the underlying codec supports it.) More...
-  #define TJFLAG_FASTUPSAMPLE  When decompressing an image that was compressed using chrominance subsampling, use the fastest chrominance upsampling algorithm available in the underlying codec. More...
  @@ -424,62 +412,6 @@ Variables

When decompressing an image that was compressed using chrominance subsampling, use the fastest chrominance upsampling algorithm available in the underlying codec.

The default is to use smooth upsampling, which creates a smooth transition between neighboring chrominance components in order to reduce upsampling artifacts in the decompressed image.

- - - -
-
- - - - -
#define TJFLAG_FORCEMMX
-
- -

Turn off CPU auto-detection and force TurboJPEG to use MMX code (if the underlying codec supports it.)

- -
-
- -
-
- - - - -
#define TJFLAG_FORCESSE
-
- -

Turn off CPU auto-detection and force TurboJPEG to use SSE code (if the underlying codec supports it.)

- -
-
- -
-
- - - - -
#define TJFLAG_FORCESSE2
-
- -

Turn off CPU auto-detection and force TurboJPEG to use SSE2 code (if the underlying codec supports it.)

- -
-
- -
-
- - - - -
#define TJFLAG_FORCESSE3
-
- -

Turn off CPU auto-detection and force TurboJPEG to use SSE3 code (if the underlying codec supports it.)

-
diff --git a/doc/html/search/all_74.js b/doc/html/search/all_74.js index a32ccde..21e0ced 100644 --- a/doc/html/search/all_74.js +++ b/doc/html/search/all_74.js @@ -25,10 +25,6 @@ var searchData= ['tjflag_5fbottomup',['TJFLAG_BOTTOMUP',['../group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec',1,'turbojpeg.h']]], ['tjflag_5ffastdct',['TJFLAG_FASTDCT',['../group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2',1,'turbojpeg.h']]], ['tjflag_5ffastupsample',['TJFLAG_FASTUPSAMPLE',['../group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d',1,'turbojpeg.h']]], - ['tjflag_5fforcemmx',['TJFLAG_FORCEMMX',['../group___turbo_j_p_e_g.html#ga4e872f11c82f241736fa8297920f24e5',1,'turbojpeg.h']]], - ['tjflag_5fforcesse',['TJFLAG_FORCESSE',['../group___turbo_j_p_e_g.html#gae17e63189e8cd730feed3efbd2454f38',1,'turbojpeg.h']]], - ['tjflag_5fforcesse2',['TJFLAG_FORCESSE2',['../group___turbo_j_p_e_g.html#ga8cf0bca96ea4d472563f4b0ebf8c48e7',1,'turbojpeg.h']]], - ['tjflag_5fforcesse3',['TJFLAG_FORCESSE3',['../group___turbo_j_p_e_g.html#gaf9d49066633404da4386d70820295dd2',1,'turbojpeg.h']]], ['tjflag_5fnorealloc',['TJFLAG_NOREALLOC',['../group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963',1,'turbojpeg.h']]], ['tjfree',['tjFree',['../group___turbo_j_p_e_g.html#ga8c4a1231dc06a450514c835f6471f137',1,'turbojpeg.h']]], ['tjgeterrorstr',['tjGetErrorStr',['../group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf',1,'turbojpeg.h']]], diff --git a/java/doc/deprecated-list.html b/java/doc/deprecated-list.html index 2430387..9f3b4fd 100644 --- a/java/doc/deprecated-list.html +++ b/java/doc/deprecated-list.html @@ -81,9 +81,39 @@ function windowTitle()
Contents + + + + + + + + + + + + + + + + + +
+Deprecated Fields
org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX +
+           
org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE +
+           
org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2 +
+           
org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3 +
+           
+  +

diff --git a/java/doc/index-all.html b/java/doc/index-all.html index 916b3c2..81d9b45 100644 --- a/java/doc/index-all.html +++ b/java/doc/index-all.html @@ -239,20 +239,16 @@ Static variable in class org.libjpegturbo.turbojpeg.FLAG_FORCEMMX - Static variable in class org.libjpegturbo.turbojpeg.TJ -
Turn off CPU auto-detection and force TurboJPEG to use MMX code - (if the underlying codec supports it.) +
Deprecated. 
FLAG_FORCESSE - Static variable in class org.libjpegturbo.turbojpeg.TJ -
Turn off CPU auto-detection and force TurboJPEG to use SSE code - (if the underlying codec supports it.) +
Deprecated. 
FLAG_FORCESSE2 - Static variable in class org.libjpegturbo.turbojpeg.TJ -
Turn off CPU auto-detection and force TurboJPEG to use SSE2 code - (if the underlying codec supports it.) +
Deprecated. 
FLAG_FORCESSE3 - Static variable in class org.libjpegturbo.turbojpeg.TJ -
Turn off CPU auto-detection and force TurboJPEG to use SSE3 code - (if the underlying codec supports it.) +
Deprecated. 

diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJ.html b/java/doc/org/libjpegturbo/turbojpeg/TJ.html index 3a94cba..bad022e 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJ.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJ.html @@ -194,8 +194,7 @@ TurboJPEG utility class (cannot be instantiated)

+          Deprecated.  +          Deprecated.  +          Deprecated.  +          Deprecated. 
FLAG_FORCEMMX
-          Turn off CPU auto-detection and force TurboJPEG to use MMX code - (if the underlying codec supports it.)
@@ -203,8 +202,7 @@ TurboJPEG utility class (cannot be instantiated) FLAG_FORCESSE
-          Turn off CPU auto-detection and force TurboJPEG to use SSE code - (if the underlying codec supports it.)
@@ -212,8 +210,7 @@ TurboJPEG utility class (cannot be instantiated) FLAG_FORCESSE2
-          Turn off CPU auto-detection and force TurboJPEG to use SSE2 code - (if the underlying codec supports it.)
@@ -221,8 +218,7 @@ TurboJPEG utility class (cannot be instantiated) FLAG_FORCESSE3
-          Turn off CPU auto-detection and force TurboJPEG to use SSE3 code - (if the underlying codec supports it.)
@@ -943,12 +939,10 @@ public static final int FLAG_BOTTOMUP

FLAG_FORCEMMX

-public static final int FLAG_FORCEMMX
-
-
Turn off CPU auto-detection and force TurboJPEG to use MMX code - (if the underlying codec supports it.) -

+@Deprecated +public static final int FLAG_FORCEMMX

+
Deprecated. 
See Also:
Constant Field Values

@@ -956,12 +950,10 @@ public static final int FLAG_FORCEMMX

FLAG_FORCESSE

-public static final int FLAG_FORCESSE
-
-
Turn off CPU auto-detection and force TurboJPEG to use SSE code - (if the underlying codec supports it.) -

+@Deprecated +public static final int FLAG_FORCESSE

+
Deprecated. 
See Also:
Constant Field Values

@@ -969,12 +961,10 @@ public static final int FLAG_FORCESSE

FLAG_FORCESSE2

-public static final int FLAG_FORCESSE2
-
-
Turn off CPU auto-detection and force TurboJPEG to use SSE2 code - (if the underlying codec supports it.) -

+@Deprecated +public static final int FLAG_FORCESSE2

+
Deprecated. 
See Also:
Constant Field Values

@@ -982,12 +972,10 @@ public static final int FLAG_FORCESSE2

FLAG_FORCESSE3

-public static final int FLAG_FORCESSE3
-
-
Turn off CPU auto-detection and force TurboJPEG to use SSE3 code - (if the underlying codec supports it.) -

+@Deprecated +public static final int FLAG_FORCESSE3

+
Deprecated. 
See Also:
Constant Field Values

diff --git a/java/org/libjpegturbo/turbojpeg/TJ.java b/java/org/libjpegturbo/turbojpeg/TJ.java index 9fe3058..ac4a4dd 100644 --- a/java/org/libjpegturbo/turbojpeg/TJ.java +++ b/java/org/libjpegturbo/turbojpeg/TJ.java @@ -353,26 +353,16 @@ public final class TJ { * OpenGL) order, not top-down (X11) order. */ public static final int FLAG_BOTTOMUP = 2; - /** - * Turn off CPU auto-detection and force TurboJPEG to use MMX code - * (if the underlying codec supports it.) - */ + + @Deprecated public static final int FLAG_FORCEMMX = 8; - /** - * Turn off CPU auto-detection and force TurboJPEG to use SSE code - * (if the underlying codec supports it.) - */ + @Deprecated public static final int FLAG_FORCESSE = 16; - /** - * Turn off CPU auto-detection and force TurboJPEG to use SSE2 code - * (if the underlying codec supports it.) - */ + @Deprecated public static final int FLAG_FORCESSE2 = 32; - /** - * Turn off CPU auto-detection and force TurboJPEG to use SSE3 code - * (if the underlying codec supports it.) - */ + @Deprecated public static final int FLAG_FORCESSE3 = 128; + /** * When decompressing an image that was compressed using chrominance * subsampling, use the fastest chrominance upsampling algorithm available in diff --git a/java/org_libjpegturbo_turbojpeg_TJ.h b/java/org_libjpegturbo_turbojpeg_TJ.h index d590831..b00a128 100644 --- a/java/org_libjpegturbo_turbojpeg_TJ.h +++ b/java/org_libjpegturbo_turbojpeg_TJ.h @@ -61,14 +61,6 @@ extern "C" { #define org_libjpegturbo_turbojpeg_TJ_CS_YCCK 4L #undef org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP #define org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP 2L -#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCEMMX -#define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCEMMX 8L -#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE -#define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE 16L -#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE2 -#define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE2 32L -#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE3 -#define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE3 128L #undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE #define org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE 256L #undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTDCT diff --git a/tjbench.c b/tjbench.c index 58ed147..0164d9b 100644 --- a/tjbench.c +++ b/tjbench.c @@ -697,8 +697,6 @@ void usage(char *progname) printf("-bottomup = Test bottom-up compression/decompression\n"); printf("-tile = Test performance of the codec when the image is encoded as separate\n"); printf(" tiles of varying sizes.\n"); - printf("-forcemmx, -forcesse, -forcesse2, -forcesse3 =\n"); - printf(" Force MMX, SSE, SSE2, or SSE3 code paths in the underlying codec\n"); printf("-rgb, -bgr, -rgbx, -bgrx, -xbgr, -xrgb =\n"); printf(" Test the specified color conversion path in the codec (default: BGR)\n"); printf("-fastupsample = Use the fastest chrominance upsampling algorithm available in\n"); @@ -798,26 +796,6 @@ int main(int argc, char *argv[]) { dotile=1; xformopt|=TJXOPT_CROP; } - if(!strcasecmp(argv[i], "-forcesse3")) - { - printf("Forcing SSE3 code\n\n"); - flags|=TJFLAG_FORCESSE3; - } - if(!strcasecmp(argv[i], "-forcesse2")) - { - printf("Forcing SSE2 code\n\n"); - flags|=TJFLAG_FORCESSE2; - } - if(!strcasecmp(argv[i], "-forcesse")) - { - printf("Forcing SSE code\n\n"); - flags|=TJFLAG_FORCESSE; - } - if(!strcasecmp(argv[i], "-forcemmx")) - { - printf("Forcing MMX code\n\n"); - flags|=TJFLAG_FORCEMMX; - } if(!strcasecmp(argv[i], "-fastupsample")) { printf("Using fast upsampling code\n\n"); diff --git a/turbojpeg.h b/turbojpeg.h index b6597f1..0dfafeb 100644 --- a/turbojpeg.h +++ b/turbojpeg.h @@ -322,26 +322,6 @@ enum TJCS * OpenGL) order, not top-down (X11) order. */ #define TJFLAG_BOTTOMUP 2 -/** - * Turn off CPU auto-detection and force TurboJPEG to use MMX code (if the - * underlying codec supports it.) - */ -#define TJFLAG_FORCEMMX 8 -/** - * Turn off CPU auto-detection and force TurboJPEG to use SSE code (if the - * underlying codec supports it.) - */ -#define TJFLAG_FORCESSE 16 -/** - * Turn off CPU auto-detection and force TurboJPEG to use SSE2 code (if the - * underlying codec supports it.) - */ -#define TJFLAG_FORCESSE2 32 -/** - * Turn off CPU auto-detection and force TurboJPEG to use SSE3 code (if the - * underlying codec supports it.) - */ -#define TJFLAG_FORCESSE3 128 /** * When decompressing an image that was compressed using chrominance * subsampling, use the fastest chrominance upsampling algorithm available in @@ -1056,6 +1036,13 @@ DLLEXPORT void DLLCALL tjFree(unsigned char *buffer); DLLEXPORT char* DLLCALL tjGetErrorStr(void); +/* Deprecated functions and macros */ +#define TJFLAG_FORCEMMX 8 +#define TJFLAG_FORCESSE 16 +#define TJFLAG_FORCESSE2 32 +#define TJFLAG_FORCESSE3 128 + + /* Backward compatibility functions and macros (nothing to see here) */ #define NUMSUBOPT TJ_NUMSAMP #define TJ_444 TJSAMP_444 -- 2.40.0