|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.libjpegturbo.turbojpeg.TJ
public final class TJ
TurboJPEG utility class (cannot be instantiated)
| Nested Class Summary | |
|---|---|
class |
TJ.ScalingFactor
Fractional scaling factor |
| Field Summary | |
|---|---|
static int |
FLAG_BOTTOMUP
The uncompressed source/destination image is stored in bottom-up (Windows, OpenGL) order, not top-down (X11) order. |
static int |
FLAG_FASTUPSAMPLE
Use fast, inaccurate chrominance upsampling routines in the JPEG decompressor (libjpeg and libjpeg-turbo versions only.) |
static int |
FLAG_FORCEMMX
Turn off CPU auto-detection and force TurboJPEG to use MMX code (IPP and 32-bit libjpeg-turbo versions only.) |
static int |
FLAG_FORCESSE
Turn off CPU auto-detection and force TurboJPEG to use SSE code (32-bit IPP and 32-bit libjpeg-turbo versions only.) |
static int |
FLAG_FORCESSE2
Turn off CPU auto-detection and force TurboJPEG to use SSE2 code (32-bit IPP and 32-bit libjpeg-turbo versions only.) |
static int |
FLAG_FORCESSE3
Turn off CPU auto-detection and force TurboJPEG to use SSE3 code (64-bit IPP version only.) |
static int |
NUMPF
The number of pixel formats |
static int |
NUMSAMP
The number of chrominance subsampling options |
static int |
PF_BGR
BGR pixel format. |
static int |
PF_BGRX
BGRX pixel format. |
static int |
PF_GRAY
Grayscale pixel format. |
static int |
PF_RGB
RGB pixel format. |
static int |
PF_RGBX
RGBX pixel format. |
static int |
PF_XBGR
XBGR pixel format. |
static int |
PF_XRGB
XRGB pixel format. |
static int |
SAMP_420
4:2:0 chrominance subsampling. |
static int |
SAMP_422
4:2:2 chrominance subsampling. |
static int |
SAMP_440
4:4:0 chrominance subsampling. |
static int |
SAMP_444
4:4:4 chrominance subsampling (no chrominance subsampling). |
static int |
SAMP_GRAY
Grayscale. |
| Constructor Summary | |
|---|---|
TJ()
|
|
| Method Summary | |
|---|---|
static int |
bufSize(int width,
int height)
Returns the maximum size of the buffer (in bytes) required to hold a JPEG image with the given width and height. |
static int |
bufSizeYUV(int width,
int height,
int subsamp)
Returns the size of the buffer required to hold a YUV planar image with the given width, height, and level of chrominance subsampling. |
static int |
getBlueShift(int pixelFormat)
Returns the blue shift for the given pixel format. |
static int |
getGreenShift(int pixelFormat)
Returns the green shift for the given pixel format. |
static int |
getMCUHeight(int subsamp)
Returns the MCU block height for the given level of chrominance subsampling. |
static int |
getMCUWidth(int subsamp)
Returns the MCU block width for the given level of chrominance subsampling. |
static int |
getPixelSize(int pixelFormat)
Returns the pixel size (in bytes) for the given pixel format. |
static int |
getRedShift(int pixelFormat)
Returns the red shift for the given pixel format. |
static TJ.ScalingFactor[] |
getScalingFactors()
Returns a list of fractional scaling factors that the JPEG decompressor in this implementation of TurboJPEG supports. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NUMSAMP
public static final int SAMP_444
public static final int SAMP_422
public static final int SAMP_420
public static final int SAMP_GRAY
public static final int SAMP_440
public static final int NUMPF
public static final int PF_RGB
public static final int PF_BGR
public static final int PF_RGBX
public static final int PF_BGRX
public static final int PF_XBGR
public static final int PF_XRGB
public static final int PF_GRAY
public static final int FLAG_BOTTOMUP
public static final int FLAG_FORCEMMX
public static final int FLAG_FORCESSE
public static final int FLAG_FORCESSE2
public static final int FLAG_FORCESSE3
public static final int FLAG_FASTUPSAMPLE
| Constructor Detail |
|---|
public TJ()
| Method Detail |
|---|
public static int getMCUWidth(int subsamp)
throws java.lang.Exception
subsamp - the level of chrominance subsampling
java.lang.Exception
public static int getMCUHeight(int subsamp)
throws java.lang.Exception
subsamp - the level of chrominance subsampling
java.lang.Exception
public static int getPixelSize(int pixelFormat)
throws java.lang.Exception
pixelFormat - the pixel format
java.lang.Exception
public static int getRedShift(int pixelFormat)
throws java.lang.Exception
TJ.PF_BGRX is stored as an int, then the red
component will be
(pixel >> TJ.getRedShift(TJ.PF_BGRX)) & 0xFF.
pixelFormat - the pixel format
java.lang.Exception
public static int getGreenShift(int pixelFormat)
throws java.lang.Exception
TJ.PF_BGRX is stored as an int, then the
green component will be
(pixel >> TJ.getGreenShift(TJ.PF_BGRX)) & 0xFF.
pixelFormat - the pixel format
java.lang.Exception
public static int getBlueShift(int pixelFormat)
throws java.lang.Exception
TJ.PF_BGRX is stored as an int, then the blue
component will be
(pixel >> TJ.getBlueShift(TJ.PF_BGRX)) & 0xFF.
pixelFormat - the pixel format
java.lang.Exception
public static int bufSize(int width,
int height)
throws java.lang.Exception
width - the width (in pixels) of the JPEG imageheight - the height (in pixels) of the JPEG image
java.lang.Exception
public static int bufSizeYUV(int width,
int height,
int subsamp)
throws java.lang.Exception
width - the width (in pixels) of the YUV imageheight - the height (in pixels) of the YUV imagesubsamp - the level of chrominance subsampling used in the YUV
image
java.lang.Exception
public static TJ.ScalingFactor[] getScalingFactors()
throws java.lang.Exception
java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||