This allows losslessly transposed or rotated 4:1:1 JPEG images to be losslessly cropped, partially decompressed, or decompressed to planar YUV images. Because tj3Transform() allows multiple lossless transformations to be chained together, all subsampling options need to have a corresponding transposed subsampling option. (This is why 4:4:0 was originally implemented as well.) Otherwise, the documentation would be technically incorrect. It says that images with unknown subsampling types cannot be losslessly cropped, partially decompressed, or decompressed to planar YUV images, but it doesn't say anything about images with known subsampling types whose subsampling type becomes unknown if the image is rotated or transposed. This is one of those situations in which it is easier to implement a feature that works around the problem than to document the problem. Closes #659
182 lines
7.6 KiB
C
182 lines
7.6 KiB
C
/* DO NOT EDIT THIS FILE - it is machine generated */
|
|
#include <jni.h>
|
|
/* Header for class org_libjpegturbo_turbojpeg_TJ */
|
|
|
|
#ifndef _Included_org_libjpegturbo_turbojpeg_TJ
|
|
#define _Included_org_libjpegturbo_turbojpeg_TJ
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#undef org_libjpegturbo_turbojpeg_TJ_NUMSAMP
|
|
#define org_libjpegturbo_turbojpeg_TJ_NUMSAMP 7L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_444
|
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_444 0L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_422
|
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_422 1L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_420
|
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_420 2L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY
|
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY 3L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_440
|
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_440 4L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_411
|
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_411 5L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_441
|
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_441 6L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_UNKNOWN
|
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_UNKNOWN -1L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_NUMPF
|
|
#define org_libjpegturbo_turbojpeg_TJ_NUMPF 12L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_RGB
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_RGB 0L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_BGR
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_BGR 1L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_RGBX
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_RGBX 2L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_BGRX
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_BGRX 3L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_XBGR
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_XBGR 4L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_XRGB
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_XRGB 5L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_GRAY
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_GRAY 6L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_RGBA
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_RGBA 7L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_BGRA
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_BGRA 8L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_ABGR
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_ABGR 9L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_ARGB
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_ARGB 10L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_CMYK
|
|
#define org_libjpegturbo_turbojpeg_TJ_PF_CMYK 11L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_NUMCS
|
|
#define org_libjpegturbo_turbojpeg_TJ_NUMCS 5L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_RGB
|
|
#define org_libjpegturbo_turbojpeg_TJ_CS_RGB 0L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_YCbCr
|
|
#define org_libjpegturbo_turbojpeg_TJ_CS_YCbCr 1L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_GRAY
|
|
#define org_libjpegturbo_turbojpeg_TJ_CS_GRAY 2L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_CMYK
|
|
#define org_libjpegturbo_turbojpeg_TJ_CS_CMYK 3L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_YCCK
|
|
#define org_libjpegturbo_turbojpeg_TJ_CS_YCCK 4L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_STOPONWARNING
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_STOPONWARNING 0L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_BOTTOMUP
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_BOTTOMUP 1L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_QUALITY
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_QUALITY 3L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_SUBSAMP
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_SUBSAMP 4L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_JPEGWIDTH
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_JPEGWIDTH 5L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_JPEGHEIGHT
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_JPEGHEIGHT 6L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_PRECISION
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_PRECISION 7L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_COLORSPACE
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_COLORSPACE 8L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_FASTUPSAMPLE
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_FASTUPSAMPLE 9L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_FASTDCT
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_FASTDCT 10L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_OPTIMIZE
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_OPTIMIZE 11L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_PROGRESSIVE
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_PROGRESSIVE 12L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_SCANLIMIT
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_SCANLIMIT 13L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_ARITHMETIC
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_ARITHMETIC 14L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_LOSSLESS
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_LOSSLESS 15L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_LOSSLESSPSV
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_LOSSLESSPSV 16L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_LOSSLESSPT
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_LOSSLESSPT 17L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_RESTARTBLOCKS
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_RESTARTBLOCKS 18L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_RESTARTROWS
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_RESTARTROWS 19L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_XDENSITY
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_XDENSITY 20L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_YDENSITY
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_YDENSITY 21L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_PARAM_DENSITYUNITS
|
|
#define org_libjpegturbo_turbojpeg_TJ_PARAM_DENSITYUNITS 22L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP
|
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP 2L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE
|
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE 256L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTDCT
|
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_FASTDCT 2048L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_ACCURATEDCT
|
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_ACCURATEDCT 4096L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_STOPONWARNING
|
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_STOPONWARNING 8192L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_PROGRESSIVE
|
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_PROGRESSIVE 16384L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_LIMITSCANS
|
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_LIMITSCANS 32768L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_NUMERR
|
|
#define org_libjpegturbo_turbojpeg_TJ_NUMERR 2L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_ERR_WARNING
|
|
#define org_libjpegturbo_turbojpeg_TJ_ERR_WARNING 0L
|
|
#undef org_libjpegturbo_turbojpeg_TJ_ERR_FATAL
|
|
#define org_libjpegturbo_turbojpeg_TJ_ERR_FATAL 1L
|
|
/*
|
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
|
* Method: bufSize
|
|
* Signature: (III)I
|
|
*/
|
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSize
|
|
(JNIEnv *, jclass, jint, jint, jint);
|
|
|
|
/*
|
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
|
* Method: bufSizeYUV
|
|
* Signature: (IIII)I
|
|
*/
|
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII
|
|
(JNIEnv *, jclass, jint, jint, jint, jint);
|
|
|
|
/*
|
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
|
* Method: planeSizeYUV
|
|
* Signature: (IIIII)I
|
|
*/
|
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeSizeYUV__IIIII
|
|
(JNIEnv *, jclass, jint, jint, jint, jint, jint);
|
|
|
|
/*
|
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
|
* Method: planeWidth
|
|
* Signature: (III)I
|
|
*/
|
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeWidth__III
|
|
(JNIEnv *, jclass, jint, jint, jint);
|
|
|
|
/*
|
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
|
* Method: planeHeight
|
|
* Signature: (III)I
|
|
*/
|
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeHeight__III
|
|
(JNIEnv *, jclass, jint, jint, jint);
|
|
|
|
/*
|
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
|
* Method: getScalingFactors
|
|
* Signature: ()[Lorg/libjpegturbo/turbojpeg/TJScalingFactor;
|
|
*/
|
|
JNIEXPORT jobjectArray JNICALL Java_org_libjpegturbo_turbojpeg_TJ_getScalingFactors
|
|
(JNIEnv *, jclass);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|