diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/jpeg/jpeglib.h | 10 | ||||
-rw-r--r-- | common/jpeg/turbojpeg.h | 63 | ||||
-rw-r--r-- | common/jpeg/win/jconfig.h | 16 |
3 files changed, 37 insertions, 52 deletions
diff --git a/common/jpeg/jpeglib.h b/common/jpeg/jpeglib.h index 31f0dd66..7cc8039b 100644 --- a/common/jpeg/jpeglib.h +++ b/common/jpeg/jpeglib.h @@ -14,6 +14,10 @@ #ifndef JPEGLIB_H #define JPEGLIB_H +#ifdef __cplusplus +extern "C" { +#endif + /* * First we include the configuration files that record how this * installation of the JPEG library is set up. jconfig.h can be @@ -219,7 +223,7 @@ typedef enum { JCS_EXT_BGR, /* blue/green/red */ JCS_EXT_BGRX, /* blue/green/red/x */ JCS_EXT_XBGR, /* x/blue/green/red */ - JCS_EXT_XRGB, /* x/red/green/blue */ + JCS_EXT_XRGB /* x/red/green/blue */ } J_COLOR_SPACE; /* DCT/IDCT algorithm options. */ @@ -1103,4 +1107,8 @@ struct jpeg_color_quantizer { long dummy; }; #include "jerror.h" /* fetch error codes too */ #endif +#ifdef __cplusplus +} +#endif + #endif /* JPEGLIB_H */ diff --git a/common/jpeg/turbojpeg.h b/common/jpeg/turbojpeg.h index 808e2f30..5f99c076 100644 --- a/common/jpeg/turbojpeg.h +++ b/common/jpeg/turbojpeg.h @@ -27,15 +27,30 @@ enum {TJ_444=0, TJ_422, TJ_420, TJ_GRAYSCALE}; /* Flags */ -#define TJ_BGR 1 -#define TJ_BOTTOMUP 2 -#define TJ_FORCEMMX 8 /* Force IPP to use MMX code even if SSE available */ -#define TJ_FORCESSE 16 /* Force IPP to use SSE1 code even if SSE2 available */ -#define TJ_FORCESSE2 32 /* Force IPP to use SSE2 code (useful if auto-detect is not working properly) */ -#define TJ_ALPHAFIRST 64 /* BGR buffer is ABGR and RGB buffer is ARGB */ -#define TJ_FORCESSE3 128 /* Force IPP to use SSE3 code (useful if auto-detect is not working properly) */ -#define TJ_FASTUPSAMPLE 256 /* Use fast, inaccurate 4:2:2 and 4:2:0 YUV upsampling routines in libjpeg decompressor */ - +#define TJ_BGR 1 + /* The components of each pixel in the source/destination bitmap are stored + in B,G,R order, not R,G,B */ +#define TJ_BOTTOMUP 2 + /* The source/destination bitmap is stored in bottom-up (Windows, OpenGL) + order, not top-down (X11) order */ +#define TJ_FORCEMMX 8 + /* Turn off CPU auto-detection and force TurboJPEG to use MMX code + (IPP and 32-bit libjpeg-turbo versions only) */ +#define TJ_FORCESSE 16 + /* Turn off CPU auto-detection and force TurboJPEG to use SSE code + (32-bit IPP and 32-bit libjpeg-turbo versions only) */ +#define TJ_FORCESSE2 32 + /* Turn off CPU auto-detection and force TurboJPEG to use SSE2 code + (32-bit IPP and 32-bit libjpeg-turbo versions only) */ +#define TJ_ALPHAFIRST 64 + /* If the source/destination bitmap is 32 bpp, assume that each pixel is + ARGB/XRGB (or ABGR/XBGR if TJ_BGR is also specified) */ +#define TJ_FORCESSE3 128 + /* Turn off CPU auto-detection and force TurboJPEG to use SSE3 code + (64-bit IPP version only) */ +#define TJ_FASTUPSAMPLE 256 + /* Use fast, inaccurate 4:2:2 and 4:2:0 YUV upsampling routines + (libjpeg version only) */ typedef void* tjhandle; #define TJPAD(p) (((p)+3)&(~3)) @@ -103,20 +118,8 @@ DLLEXPORT tjhandle DLLCALL tjInitCompress(void); TJ_GRAYSCALE: Generate grayscale JPEG image [INPUT] jpegqual = JPEG quality (an integer between 0 and 100 inclusive.) - [INPUT] flags = the bitwise OR of one or more of the following - - TJ_BGR: The components of each pixel in the source image are stored in - B,G,R order, not R,G,B - TJ_BOTTOMUP: The source image is stored in bottom-up (Windows) order, - not top-down - TJ_FORCEMMX: Valid only for the Intel Performance Primitives implementation - of this codec-- force IPP to use MMX code (bypass CPU auto-detection) - TJ_FORCESSE: Valid only for the Intel Performance Primitives implementation - of this codec-- force IPP to use SSE code (bypass CPU auto-detection) - TJ_FORCESSE2: Valid only for the Intel Performance Primitives implementation - of this codec-- force IPP to use SSE2 code (bypass CPU auto-detection) - TJ_FORCESSE3: Valid only for the Intel Performance Primitives implementation - of this codec-- force IPP to use SSE3 code (bypass CPU auto-detection) + [INPUT] flags = the bitwise OR of one or more of the flags described in the + "Flags" section above. RETURNS: 0 on success, -1 on error */ @@ -185,18 +188,8 @@ DLLEXPORT int DLLCALL tjDecompressHeader(tjhandle j, [INPUT] height = height (in pixels) of the destination image [INPUT] pixelsize = size (in bytes) of each pixel in the destination image RGBA/RGBx and BGRA/BGRx: 4, RGB and BGR: 3 - [INPUT] flags = the bitwise OR of one or more of the following - - TJ_BGR: The components of each pixel in the destination image should be - written in B,G,R order, not R,G,B - TJ_BOTTOMUP: The destination image should be stored in bottom-up - (Windows) order, not top-down - TJ_FORCEMMX: Valid only for the Intel Performance Primitives implementation - of this codec-- force IPP to use MMX code (bypass CPU auto-detection) - TJ_FORCESSE: Valid only for the Intel Performance Primitives implementation - of this codec-- force IPP to use SSE code (bypass CPU auto-detection) - TJ_FORCESSE2: Valid only for the Intel Performance Primitives implementation - of this codec-- force IPP to use SSE2 code (bypass CPU auto-detection) + [INPUT] flags = the bitwise OR of one or more of the flags described in the + "Flags" section above. RETURNS: 0 on success, -1 on error */ diff --git a/common/jpeg/win/jconfig.h b/common/jpeg/win/jconfig.h index 7987ba6f..9cf6f102 100644 --- a/common/jpeg/win/jconfig.h +++ b/common/jpeg/win/jconfig.h @@ -28,19 +28,3 @@ typedef unsigned char boolean; #undef RIGHT_SHIFT_IS_UNSIGNED #endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE /* optional */ -#define USE_SETMODE /* Microsoft has setmode() */ -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ |