pub const TJ_NUMSAMP: u32 = 6;
pub const TJ_NUMPF: u32 = 12;
pub const TJ_NUMCS: u32 = 5;
pub const TJFLAG_BOTTOMUP: u32 = 2;
pub const TJFLAG_FASTUPSAMPLE: u32 = 256;
pub const TJFLAG_NOREALLOC: u32 = 1024;
pub const TJFLAG_FASTDCT: u32 = 2048;
pub const TJFLAG_ACCURATEDCT: u32 = 4096;
pub const TJFLAG_STOPONWARNING: u32 = 8192;
pub const TJFLAG_PROGRESSIVE: u32 = 16384;
pub const TJ_NUMERR: u32 = 2;
pub const TJ_NUMXOP: u32 = 8;
pub const TJXOPT_PERFECT: u32 = 1;
pub const TJXOPT_TRIM: u32 = 2;
pub const TJXOPT_CROP: u32 = 4;
pub const TJXOPT_GRAY: u32 = 8;
pub const TJXOPT_NOOUTPUT: u32 = 16;
pub const TJXOPT_PROGRESSIVE: u32 = 32;
pub const TJXOPT_COPYNONE: u32 = 64;
pub const TJFLAG_FORCEMMX: u32 = 8;
pub const TJFLAG_FORCESSE: u32 = 16;
pub const TJFLAG_FORCESSE2: u32 = 32;
pub const TJFLAG_FORCESSE3: u32 = 128;
pub const NUMSUBOPT: u32 = 6;
pub const TJ_BGR: u32 = 1;
pub const TJ_BOTTOMUP: u32 = 2;
pub const TJ_FORCEMMX: u32 = 8;
pub const TJ_FORCESSE: u32 = 16;
pub const TJ_FORCESSE2: u32 = 32;
pub const TJ_ALPHAFIRST: u32 = 64;
pub const TJ_FORCESSE3: u32 = 128;
pub const TJ_FASTUPSAMPLE: u32 = 256;
pub const TJ_YUV: u32 = 512;
pub const TJSAMP_TJSAMP_444: TJSAMP = 0;
pub const TJSAMP_TJSAMP_422: TJSAMP = 1;
pub const TJSAMP_TJSAMP_420: TJSAMP = 2;
pub const TJSAMP_TJSAMP_GRAY: TJSAMP = 3;
pub const TJSAMP_TJSAMP_440: TJSAMP = 4;
pub const TJSAMP_TJSAMP_411: TJSAMP = 5;
pub type TJSAMP = libc::c_uint;
extern "C" {
pub static tjMCUWidth: [libc::c_int; 6usize];
}
extern "C" {
pub static tjMCUHeight: [libc::c_int; 6usize];
}
pub const TJPF_TJPF_RGB: TJPF = 0;
pub const TJPF_TJPF_BGR: TJPF = 1;
pub const TJPF_TJPF_RGBX: TJPF = 2;
pub const TJPF_TJPF_BGRX: TJPF = 3;
pub const TJPF_TJPF_XBGR: TJPF = 4;
pub const TJPF_TJPF_XRGB: TJPF = 5;
pub const TJPF_TJPF_GRAY: TJPF = 6;
pub const TJPF_TJPF_RGBA: TJPF = 7;
pub const TJPF_TJPF_BGRA: TJPF = 8;
pub const TJPF_TJPF_ABGR: TJPF = 9;
pub const TJPF_TJPF_ARGB: TJPF = 10;
pub const TJPF_TJPF_CMYK: TJPF = 11;
pub const TJPF_TJPF_UNKNOWN: TJPF = -1;
pub type TJPF = libc::c_int;
extern "C" {
pub static tjRedOffset: [libc::c_int; 12usize];
}
extern "C" {
pub static tjGreenOffset: [libc::c_int; 12usize];
}
extern "C" {
pub static tjBlueOffset: [libc::c_int; 12usize];
}
extern "C" {
pub static tjAlphaOffset: [libc::c_int; 12usize];
}
extern "C" {
pub static tjPixelSize: [libc::c_int; 12usize];
}
pub const TJCS_TJCS_RGB: TJCS = 0;
pub const TJCS_TJCS_YCbCr: TJCS = 1;
pub const TJCS_TJCS_GRAY: TJCS = 2;
pub const TJCS_TJCS_CMYK: TJCS = 3;
pub const TJCS_TJCS_YCCK: TJCS = 4;
pub type TJCS = libc::c_uint;
pub const TJERR_TJERR_WARNING: TJERR = 0;
pub const TJERR_TJERR_FATAL: TJERR = 1;
pub type TJERR = libc::c_uint;
pub const TJXOP_TJXOP_NONE: TJXOP = 0;
pub const TJXOP_TJXOP_HFLIP: TJXOP = 1;
pub const TJXOP_TJXOP_VFLIP: TJXOP = 2;
pub const TJXOP_TJXOP_TRANSPOSE: TJXOP = 3;
pub const TJXOP_TJXOP_TRANSVERSE: TJXOP = 4;
pub const TJXOP_TJXOP_ROT90: TJXOP = 5;
pub const TJXOP_TJXOP_ROT180: TJXOP = 6;
pub const TJXOP_TJXOP_ROT270: TJXOP = 7;
pub type TJXOP = libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tjscalingfactor {
pub num: libc::c_int,
pub denom: libc::c_int,
}
#[test]
fn bindgen_test_layout_tjscalingfactor() {
assert_eq!(
::core::mem::size_of::<tjscalingfactor>(),
8usize,
concat!("Size of: ", stringify!(tjscalingfactor))
);
assert_eq!(
::core::mem::align_of::<tjscalingfactor>(),
4usize,
concat!("Alignment of ", stringify!(tjscalingfactor))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjscalingfactor>())).num as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(tjscalingfactor),
"::",
stringify!(num)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjscalingfactor>())).denom as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(tjscalingfactor),
"::",
stringify!(denom)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tjregion {
pub x: libc::c_int,
pub y: libc::c_int,
pub w: libc::c_int,
pub h: libc::c_int,
}
#[test]
fn bindgen_test_layout_tjregion() {
assert_eq!(
::core::mem::size_of::<tjregion>(),
16usize,
concat!("Size of: ", stringify!(tjregion))
);
assert_eq!(
::core::mem::align_of::<tjregion>(),
4usize,
concat!("Alignment of ", stringify!(tjregion))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjregion>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(tjregion),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjregion>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(tjregion),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjregion>())).w as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(tjregion),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjregion>())).h as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(tjregion),
"::",
stringify!(h)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tjtransform {
pub r: tjregion,
pub op: libc::c_int,
pub options: libc::c_int,
pub data: *mut libc::c_void,
pub customFilter: ::core::option::Option<
unsafe extern "C" fn(
coeffs: *mut libc::c_short,
arrayRegion: tjregion,
planeRegion: tjregion,
componentIndex: libc::c_int,
transformIndex: libc::c_int,
transform: *mut tjtransform,
) -> libc::c_int,
>,
}
#[test]
fn bindgen_test_layout_tjtransform() {
assert_eq!(
::core::mem::size_of::<tjtransform>(),
40usize,
concat!("Size of: ", stringify!(tjtransform))
);
assert_eq!(
::core::mem::align_of::<tjtransform>(),
8usize,
concat!("Alignment of ", stringify!(tjtransform))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjtransform>())).r as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(tjtransform),
"::",
stringify!(r)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjtransform>())).op as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(tjtransform),
"::",
stringify!(op)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjtransform>())).options as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(tjtransform),
"::",
stringify!(options)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjtransform>())).data as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(tjtransform),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<tjtransform>())).customFilter as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(tjtransform),
"::",
stringify!(customFilter)
)
);
}
pub type tjhandle = *mut libc::c_void;
extern "C" {
pub fn tjInitCompress() -> tjhandle;
}
extern "C" {
pub fn tjCompress2(
handle: tjhandle,
srcBuf: *const libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelFormat: libc::c_int,
jpegBuf: *mut *mut libc::c_uchar,
jpegSize: *mut libc::c_ulong,
jpegSubsamp: libc::c_int,
jpegQual: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjCompressFromYUV(
handle: tjhandle,
srcBuf: *const libc::c_uchar,
width: libc::c_int,
pad: libc::c_int,
height: libc::c_int,
subsamp: libc::c_int,
jpegBuf: *mut *mut libc::c_uchar,
jpegSize: *mut libc::c_ulong,
jpegQual: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjCompressFromYUVPlanes(
handle: tjhandle,
srcPlanes: *mut *const libc::c_uchar,
width: libc::c_int,
strides: *const libc::c_int,
height: libc::c_int,
subsamp: libc::c_int,
jpegBuf: *mut *mut libc::c_uchar,
jpegSize: *mut libc::c_ulong,
jpegQual: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjBufSize(
width: libc::c_int,
height: libc::c_int,
jpegSubsamp: libc::c_int,
) -> libc::c_ulong;
}
extern "C" {
pub fn tjBufSizeYUV2(
width: libc::c_int,
pad: libc::c_int,
height: libc::c_int,
subsamp: libc::c_int,
) -> libc::c_ulong;
}
extern "C" {
pub fn tjPlaneSizeYUV(
componentID: libc::c_int,
width: libc::c_int,
stride: libc::c_int,
height: libc::c_int,
subsamp: libc::c_int,
) -> libc::c_ulong;
}
extern "C" {
pub fn tjPlaneWidth(
componentID: libc::c_int,
width: libc::c_int,
subsamp: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjPlaneHeight(
componentID: libc::c_int,
height: libc::c_int,
subsamp: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjEncodeYUV3(
handle: tjhandle,
srcBuf: *const libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelFormat: libc::c_int,
dstBuf: *mut libc::c_uchar,
pad: libc::c_int,
subsamp: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjEncodeYUVPlanes(
handle: tjhandle,
srcBuf: *const libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelFormat: libc::c_int,
dstPlanes: *mut *mut libc::c_uchar,
strides: *mut libc::c_int,
subsamp: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjInitDecompress() -> tjhandle;
}
extern "C" {
pub fn tjDecompressHeader3(
handle: tjhandle,
jpegBuf: *const libc::c_uchar,
jpegSize: libc::c_ulong,
width: *mut libc::c_int,
height: *mut libc::c_int,
jpegSubsamp: *mut libc::c_int,
jpegColorspace: *mut libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjGetScalingFactors(numscalingfactors: *mut libc::c_int) -> *mut tjscalingfactor;
}
extern "C" {
pub fn tjDecompress2(
handle: tjhandle,
jpegBuf: *const libc::c_uchar,
jpegSize: libc::c_ulong,
dstBuf: *mut libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelFormat: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDecompressToYUV2(
handle: tjhandle,
jpegBuf: *const libc::c_uchar,
jpegSize: libc::c_ulong,
dstBuf: *mut libc::c_uchar,
width: libc::c_int,
pad: libc::c_int,
height: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDecompressToYUVPlanes(
handle: tjhandle,
jpegBuf: *const libc::c_uchar,
jpegSize: libc::c_ulong,
dstPlanes: *mut *mut libc::c_uchar,
width: libc::c_int,
strides: *mut libc::c_int,
height: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDecodeYUV(
handle: tjhandle,
srcBuf: *const libc::c_uchar,
pad: libc::c_int,
subsamp: libc::c_int,
dstBuf: *mut libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelFormat: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDecodeYUVPlanes(
handle: tjhandle,
srcPlanes: *mut *const libc::c_uchar,
strides: *const libc::c_int,
subsamp: libc::c_int,
dstBuf: *mut libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelFormat: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjInitTransform() -> tjhandle;
}
extern "C" {
pub fn tjTransform(
handle: tjhandle,
jpegBuf: *const libc::c_uchar,
jpegSize: libc::c_ulong,
n: libc::c_int,
dstBufs: *mut *mut libc::c_uchar,
dstSizes: *mut libc::c_ulong,
transforms: *mut tjtransform,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDestroy(handle: tjhandle) -> libc::c_int;
}
extern "C" {
pub fn tjAlloc(bytes: libc::c_int) -> *mut libc::c_uchar;
}
extern "C" {
pub fn tjLoadImage(
filename: *const libc::c_char,
width: *mut libc::c_int,
align: libc::c_int,
height: *mut libc::c_int,
pixelFormat: *mut libc::c_int,
flags: libc::c_int,
) -> *mut libc::c_uchar;
}
extern "C" {
pub fn tjSaveImage(
filename: *const libc::c_char,
buffer: *mut libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelFormat: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjFree(buffer: *mut libc::c_uchar);
}
extern "C" {
pub fn tjGetErrorStr2(handle: tjhandle) -> *mut libc::c_char;
}
extern "C" {
pub fn tjGetErrorCode(handle: tjhandle) -> libc::c_int;
}
extern "C" {
pub fn TJBUFSIZE(width: libc::c_int, height: libc::c_int) -> libc::c_ulong;
}
extern "C" {
pub fn TJBUFSIZEYUV(
width: libc::c_int,
height: libc::c_int,
jpegSubsamp: libc::c_int,
) -> libc::c_ulong;
}
extern "C" {
pub fn tjBufSizeYUV(
width: libc::c_int,
height: libc::c_int,
subsamp: libc::c_int,
) -> libc::c_ulong;
}
extern "C" {
pub fn tjCompress(
handle: tjhandle,
srcBuf: *mut libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelSize: libc::c_int,
dstBuf: *mut libc::c_uchar,
compressedSize: *mut libc::c_ulong,
jpegSubsamp: libc::c_int,
jpegQual: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjEncodeYUV(
handle: tjhandle,
srcBuf: *mut libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelSize: libc::c_int,
dstBuf: *mut libc::c_uchar,
subsamp: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjEncodeYUV2(
handle: tjhandle,
srcBuf: *mut libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelFormat: libc::c_int,
dstBuf: *mut libc::c_uchar,
subsamp: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDecompressHeader(
handle: tjhandle,
jpegBuf: *mut libc::c_uchar,
jpegSize: libc::c_ulong,
width: *mut libc::c_int,
height: *mut libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDecompressHeader2(
handle: tjhandle,
jpegBuf: *mut libc::c_uchar,
jpegSize: libc::c_ulong,
width: *mut libc::c_int,
height: *mut libc::c_int,
jpegSubsamp: *mut libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDecompress(
handle: tjhandle,
jpegBuf: *mut libc::c_uchar,
jpegSize: libc::c_ulong,
dstBuf: *mut libc::c_uchar,
width: libc::c_int,
pitch: libc::c_int,
height: libc::c_int,
pixelSize: libc::c_int,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjDecompressToYUV(
handle: tjhandle,
jpegBuf: *mut libc::c_uchar,
jpegSize: libc::c_ulong,
dstBuf: *mut libc::c_uchar,
flags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn tjGetErrorStr() -> *mut libc::c_char;
}