Files
mozjpeg/java/org_libjpegturbo_turbojpeg_TJ.h
DRC df9dbff830 TurboJPEG: New param to limit virt array mem usage
This corresponds to max_memory_to_use in the jpeg_memory_mgr struct in
the libjpeg API, except that the TurboJPEG parameter is specified in
megabytes.  Because this is 2023 and computers with less than 1 MB of
memory are not a thing (at least not within the scope of libjpeg-turbo
support), it isn't useful to allow a limit less than 1 MB to be
specified.  Furthermore, because TurboJPEG parameters are signed
integers, if we allowed the memory limit to be specified in bytes, then
it would be impossible to specify a limit larger than 2 GB on 64-bit
machines.  Because max_memory_to_use is a long signed integer,
effectively we can specify a limit of up to 2 petabytes on 64-bit
machines if the TurboJPEG parameter is specified in megabytes.  (2 PB
should be enough for anybody, right?)

This commit also bumps the TurboJPEG API version to 3.0.1.  Since the
TurboJPEG API version no longer tracks the libjpeg-turbo version, it
makes sense to increment the API revision number when adding constants,
to increment the minor version number when adding functions, and to
increment the major version number for a complete overhaul.

This commit also removes the vestigial TJ_NUMPARAM macro, which was
never defined because it proved unnecessary.

Partially implements #735
2023-11-14 10:19:06 -05:00

184 lines
7.7 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_PARAM_MAXMEMORY
#define org_libjpegturbo_turbojpeg_TJ_PARAM_MAXMEMORY 23L
#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