| 
 | ||||||||
| 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)
| Field Summary | |
|---|---|
| static int | FLAG_ACCURATEDCTUse the most accurate DCT/IDCT algorithm available in the underlying codec. | 
| static int | FLAG_BOTTOMUPThe uncompressed source/destination image is stored in bottom-up (Windows, OpenGL) order, not top-down (X11) order. | 
| static int | FLAG_FASTDCTUse the fastest DCT/IDCT algorithm available in the underlying codec. | 
| static int | FLAG_FASTUPSAMPLEWhen decompressing an image that was compressed using chrominance subsampling, use the fastest chrominance upsampling algorithm available in the underlying codec. | 
| static int | FLAG_FORCEMMXTurn off CPU auto-detection and force TurboJPEG to use MMX code (if the underlying codec supports it.) | 
| static int | FLAG_FORCESSETurn off CPU auto-detection and force TurboJPEG to use SSE code (if the underlying codec supports it.) | 
| static int | FLAG_FORCESSE2Turn off CPU auto-detection and force TurboJPEG to use SSE2 code (if the underlying codec supports it.) | 
| static int | FLAG_FORCESSE3Turn off CPU auto-detection and force TurboJPEG to use SSE3 code (if the underlying codec supports it.) | 
| static int | NUMPFThe number of pixel formats | 
| static int | NUMSAMPThe number of chrominance subsampling options | 
| static int | PF_ABGRABGR pixel format. | 
| static int | PF_ARGBARGB pixel format. | 
| static int | PF_BGRBGR pixel format. | 
| static int | PF_BGRABGRA pixel format. | 
| static int | PF_BGRXBGRX pixel format. | 
| static int | PF_GRAYGrayscale pixel format. | 
| static int | PF_RGBRGB pixel format. | 
| static int | PF_RGBARGBA pixel format. | 
| static int | PF_RGBXRGBX pixel format. | 
| static int | PF_XBGRXBGR pixel format. | 
| static int | PF_XRGBXRGB pixel format. | 
| static int | SAMP_4204:2:0 chrominance subsampling. | 
| static int | SAMP_4224:2:2 chrominance subsampling. | 
| static int | SAMP_4404:4:0 chrominance subsampling. | 
| static int | SAMP_4444:4:4 chrominance subsampling (no chrominance subsampling). | 
| static int | SAMP_GRAYGrayscale. | 
| Constructor Summary | |
|---|---|
| TJ() | |
| Method Summary | |
|---|---|
| static int | bufSize(int width,
        int height,
        int jpegSubsamp)Returns the maximum size of the buffer (in bytes) required to hold a JPEG image with the given width, height, and level of chrominance subsampling. | 
| static int | bufSizeYUV(int width,
           int height,
           int subsamp)Returns the size of the buffer (in bytes) required to hold a YUV planar image with the given width, height, and level of chrominance subsampling. | 
| static int | getBlueOffset(int pixelFormat)For the given pixel format, returns the number of bytes that the blue component is offset from the start of the pixel. | 
| static int | getGreenOffset(int pixelFormat)For the given pixel format, returns the number of bytes that the green component is offset from the start of the pixel. | 
| 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 | getRedOffset(int pixelFormat)For the given pixel format, returns the number of bytes that the red component is offset from the start of the pixel. | 
| static TJScalingFactor[] | 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 PF_RGBA
PF_RGBX, except that when
 decompressing, the X byte is guaranteed to be 0xFF, which can be
 interpreted as an opaque alpha channel.
public static final int PF_BGRA
PF_BGRX, except that when
 decompressing, the X byte is guaranteed to be 0xFF, which can be
 interpreted as an opaque alpha channel.
public static final int PF_ABGR
PF_XBGR, except that when
 decompressing, the X byte is guaranteed to be 0xFF, which can be
 interpreted as an opaque alpha channel.
public static final int PF_ARGB
PF_XRGB, except that when
 decompressing, the X byte is guaranteed to be 0xFF, which can be
 interpreted as an opaque alpha channel.
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
public static final int FLAG_FASTDCT
public static final int FLAG_ACCURATEDCT
| Constructor Detail | 
|---|
public TJ()
| Method Detail | 
|---|
public static int getMCUWidth(int subsamp)
                       throws java.lang.Exception
subsamp - the level of chrominance subsampling (one of
 SAMP_*)
java.lang.Exception
public static int getMCUHeight(int subsamp)
                        throws java.lang.Exception
subsamp - the level of chrominance subsampling (one of
 SAMP_*)
java.lang.Exception
public static int getPixelSize(int pixelFormat)
                        throws java.lang.Exception
pixelFormat - the pixel format (one of PF_*)
java.lang.Exception
public static int getRedOffset(int pixelFormat)
                        throws java.lang.Exception
TJ.PF_BGRX is stored in char pixel[],
 then the red component will be
 pixel[TJ.getRedOffset(TJ.PF_BGRX)].
pixelFormat - the pixel format (one of PF_*)
java.lang.Exception
public static int getGreenOffset(int pixelFormat)
                          throws java.lang.Exception
TJ.PF_BGRX is stored in char pixel[],
 then the green component will be
 pixel[TJ.getGreenOffset(TJ.PF_BGRX)].
pixelFormat - the pixel format (one of PF_*)
java.lang.Exception
public static int getBlueOffset(int pixelFormat)
                         throws java.lang.Exception
TJ.PF_BGRX is stored in char pixel[],
 then the blue component will be
 pixel[TJ.getBlueOffset(TJ.PF_BGRX)].
pixelFormat - the pixel format (one of PF_*)
java.lang.Exception
public static int bufSize(int width,
                          int height,
                          int jpegSubsamp)
                   throws java.lang.Exception
width - the width (in pixels) of the JPEG imageheight - the height (in pixels) of the JPEG imagejpegSubsamp - the level of chrominance subsampling to be used when
 generating the JPEG image (one of TJ.SAMP_*)
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 (one of TJ.SAMP_*)
java.lang.Exception
public static TJScalingFactor[] getScalingFactors()
                                           throws java.lang.Exception
java.lang.Exception| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||