// Regenerated by `cargo run -p xtask -- generate-bindings`.

/* automatically generated by rust-bindgen 0.72.1 */

pub const AVIF_VERSION_MAJOR: u32 = 1;
pub const AVIF_VERSION_MINOR: u32 = 3;
pub const AVIF_VERSION_PATCH: u32 = 0;
pub const AVIF_VERSION_DEVEL: u32 = 0;
pub const AVIF_VERSION: u32 = 1030000;
pub const AVIF_TRUE: u32 = 1;
pub const AVIF_FALSE: u32 = 0;
pub const AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE: u32 = 256;
pub const AVIF_DEFAULT_IMAGE_SIZE_LIMIT: u32 = 268435456;
pub const AVIF_DEFAULT_IMAGE_DIMENSION_LIMIT: u32 = 32768;
pub const AVIF_DEFAULT_IMAGE_COUNT_LIMIT: u32 = 2592000;
pub const AVIF_QUALITY_DEFAULT: i32 = -1;
pub const AVIF_QUALITY_WORST: u32 = 0;
pub const AVIF_QUALITY_BEST: u32 = 100;
pub const AVIF_QUALITY_LOSSLESS: u32 = 100;
pub const AVIF_QUANTIZER_LOSSLESS: u32 = 0;
pub const AVIF_QUANTIZER_BEST_QUALITY: u32 = 0;
pub const AVIF_QUANTIZER_WORST_QUALITY: u32 = 63;
pub const AVIF_PLANE_COUNT_YUV: u32 = 3;
pub const AVIF_SPEED_DEFAULT: i32 = -1;
pub const AVIF_SPEED_SLOWEST: u32 = 0;
pub const AVIF_SPEED_FASTEST: u32 = 10;
pub const AVIF_REPETITION_COUNT_INFINITE: i32 = -1;
pub const AVIF_REPETITION_COUNT_UNKNOWN: i32 = -2;
pub const AVIF_MAX_AV1_LAYER_COUNT: u32 = 4;
pub type avifBool = ::std::os::raw::c_int;
pub const avifPlanesFlag_AVIF_PLANES_YUV: avifPlanesFlag = 1;
pub const avifPlanesFlag_AVIF_PLANES_A: avifPlanesFlag = 2;
pub const avifPlanesFlag_AVIF_PLANES_ALL: avifPlanesFlag = 255;
pub type avifPlanesFlag = ::std::os::raw::c_uint;
pub type avifPlanesFlags = u32;
pub const avifChannelIndex_AVIF_CHAN_Y: avifChannelIndex = 0;
pub const avifChannelIndex_AVIF_CHAN_U: avifChannelIndex = 1;
pub const avifChannelIndex_AVIF_CHAN_V: avifChannelIndex = 2;
pub const avifChannelIndex_AVIF_CHAN_A: avifChannelIndex = 3;
pub type avifChannelIndex = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn avifVersion() -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn avifCodecVersions(outBuffer: *mut ::std::os::raw::c_char);
}
unsafe extern "C" {
    pub fn avifLibYUVVersion() -> ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub fn avifAlloc(size: usize) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn avifFree(p: *mut ::std::os::raw::c_void);
}
pub const avifResult_AVIF_RESULT_OK: avifResult = 0;
pub const avifResult_AVIF_RESULT_UNKNOWN_ERROR: avifResult = 1;
pub const avifResult_AVIF_RESULT_INVALID_FTYP: avifResult = 2;
pub const avifResult_AVIF_RESULT_NO_CONTENT: avifResult = 3;
pub const avifResult_AVIF_RESULT_NO_YUV_FORMAT_SELECTED: avifResult = 4;
pub const avifResult_AVIF_RESULT_REFORMAT_FAILED: avifResult = 5;
pub const avifResult_AVIF_RESULT_UNSUPPORTED_DEPTH: avifResult = 6;
pub const avifResult_AVIF_RESULT_ENCODE_COLOR_FAILED: avifResult = 7;
pub const avifResult_AVIF_RESULT_ENCODE_ALPHA_FAILED: avifResult = 8;
pub const avifResult_AVIF_RESULT_BMFF_PARSE_FAILED: avifResult = 9;
pub const avifResult_AVIF_RESULT_MISSING_IMAGE_ITEM: avifResult = 10;
pub const avifResult_AVIF_RESULT_DECODE_COLOR_FAILED: avifResult = 11;
pub const avifResult_AVIF_RESULT_DECODE_ALPHA_FAILED: avifResult = 12;
pub const avifResult_AVIF_RESULT_COLOR_ALPHA_SIZE_MISMATCH: avifResult = 13;
pub const avifResult_AVIF_RESULT_ISPE_SIZE_MISMATCH: avifResult = 14;
pub const avifResult_AVIF_RESULT_NO_CODEC_AVAILABLE: avifResult = 15;
pub const avifResult_AVIF_RESULT_NO_IMAGES_REMAINING: avifResult = 16;
pub const avifResult_AVIF_RESULT_INVALID_EXIF_PAYLOAD: avifResult = 17;
pub const avifResult_AVIF_RESULT_INVALID_IMAGE_GRID: avifResult = 18;
pub const avifResult_AVIF_RESULT_INVALID_CODEC_SPECIFIC_OPTION: avifResult = 19;
pub const avifResult_AVIF_RESULT_TRUNCATED_DATA: avifResult = 20;
pub const avifResult_AVIF_RESULT_IO_NOT_SET: avifResult = 21;
pub const avifResult_AVIF_RESULT_IO_ERROR: avifResult = 22;
pub const avifResult_AVIF_RESULT_WAITING_ON_IO: avifResult = 23;
pub const avifResult_AVIF_RESULT_INVALID_ARGUMENT: avifResult = 24;
pub const avifResult_AVIF_RESULT_NOT_IMPLEMENTED: avifResult = 25;
pub const avifResult_AVIF_RESULT_OUT_OF_MEMORY: avifResult = 26;
pub const avifResult_AVIF_RESULT_CANNOT_CHANGE_SETTING: avifResult = 27;
pub const avifResult_AVIF_RESULT_INCOMPATIBLE_IMAGE: avifResult = 28;
pub const avifResult_AVIF_RESULT_INTERNAL_ERROR: avifResult = 29;
pub const avifResult_AVIF_RESULT_ENCODE_GAIN_MAP_FAILED: avifResult = 30;
pub const avifResult_AVIF_RESULT_DECODE_GAIN_MAP_FAILED: avifResult = 31;
pub const avifResult_AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE: avifResult = 32;
pub const avifResult_AVIF_RESULT_NO_AV1_ITEMS_FOUND: avifResult = 10;
pub type avifResult = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn avifResultToString(result: avifResult) -> *const ::std::os::raw::c_char;
}
pub const avifHeaderFormat_AVIF_HEADER_DEFAULT: avifHeaderFormat = 0;
pub const avifHeaderFormat_AVIF_HEADER_FULL: avifHeaderFormat = 0;
pub type avifHeaderFormat = ::std::os::raw::c_uint;
pub type avifHeaderFormatFlags = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifROData {
    pub data: *const u8,
    pub size: usize,
}
impl Default for avifROData {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifRWData {
    pub data: *mut u8,
    pub size: usize,
}
impl Default for avifRWData {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub fn avifRWDataRealloc(raw: *mut avifRWData, newSize: usize) -> avifResult;
}
unsafe extern "C" {
    pub fn avifRWDataSet(raw: *mut avifRWData, data: *const u8, len: usize) -> avifResult;
}
unsafe extern "C" {
    pub fn avifRWDataFree(raw: *mut avifRWData);
}
unsafe extern "C" {
    pub fn avifGetExifTiffHeaderOffset(
        exif: *const u8,
        exifSize: usize,
        offset: *mut usize,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifGetExifOrientationOffset(
        exif: *const u8,
        exifSize: usize,
        offset: *mut usize,
    ) -> avifResult;
}
pub const avifPixelFormat_AVIF_PIXEL_FORMAT_NONE: avifPixelFormat = 0;
pub const avifPixelFormat_AVIF_PIXEL_FORMAT_YUV444: avifPixelFormat = 1;
pub const avifPixelFormat_AVIF_PIXEL_FORMAT_YUV422: avifPixelFormat = 2;
pub const avifPixelFormat_AVIF_PIXEL_FORMAT_YUV420: avifPixelFormat = 3;
pub const avifPixelFormat_AVIF_PIXEL_FORMAT_YUV400: avifPixelFormat = 4;
pub const avifPixelFormat_AVIF_PIXEL_FORMAT_COUNT: avifPixelFormat = 5;
pub type avifPixelFormat = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn avifPixelFormatToString(format: avifPixelFormat) -> *const ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifPixelFormatInfo {
    pub monochrome: avifBool,
    pub chromaShiftX: ::std::os::raw::c_int,
    pub chromaShiftY: ::std::os::raw::c_int,
}
unsafe extern "C" {
    pub fn avifGetPixelFormatInfo(format: avifPixelFormat, info: *mut avifPixelFormatInfo);
}
pub const avifChromaSamplePosition_AVIF_CHROMA_SAMPLE_POSITION_UNKNOWN: avifChromaSamplePosition =
    0;
pub const avifChromaSamplePosition_AVIF_CHROMA_SAMPLE_POSITION_VERTICAL: avifChromaSamplePosition =
    1;
pub const avifChromaSamplePosition_AVIF_CHROMA_SAMPLE_POSITION_COLOCATED: avifChromaSamplePosition =
    2;
pub const avifChromaSamplePosition_AVIF_CHROMA_SAMPLE_POSITION_RESERVED: avifChromaSamplePosition =
    3;
pub type avifChromaSamplePosition = ::std::os::raw::c_uint;
#[doc = "<- Y  [16..235],  UV  [16..240]  (bit depth 8) */\n/**<- Y  [64..940],  UV  [64..960]  (bit depth 10) */\n/**<- Y [256..3760], UV [256..3840] (bit depth 12)"]
pub const avifRange_AVIF_RANGE_LIMITED: avifRange = 0;
#[doc = "<- [0..255]  (bit depth 8) */\n/**<- [0..1023] (bit depth 10) */\n/**<- [0..4095] (bit depth 12)"]
pub const avifRange_AVIF_RANGE_FULL: avifRange = 1;
pub type avifRange = ::std::os::raw::c_uint;
pub const AVIF_COLOR_PRIMARIES_UNKNOWN: _bindgen_ty_1 = 0;
pub const AVIF_COLOR_PRIMARIES_BT709: _bindgen_ty_1 = 1;
pub const AVIF_COLOR_PRIMARIES_SRGB: _bindgen_ty_1 = 1;
pub const AVIF_COLOR_PRIMARIES_IEC61966_2_4: _bindgen_ty_1 = 1;
pub const AVIF_COLOR_PRIMARIES_UNSPECIFIED: _bindgen_ty_1 = 2;
pub const AVIF_COLOR_PRIMARIES_BT470M: _bindgen_ty_1 = 4;
pub const AVIF_COLOR_PRIMARIES_BT470BG: _bindgen_ty_1 = 5;
pub const AVIF_COLOR_PRIMARIES_BT601: _bindgen_ty_1 = 6;
pub const AVIF_COLOR_PRIMARIES_SMPTE240: _bindgen_ty_1 = 7;
pub const AVIF_COLOR_PRIMARIES_GENERIC_FILM: _bindgen_ty_1 = 8;
pub const AVIF_COLOR_PRIMARIES_BT2020: _bindgen_ty_1 = 9;
pub const AVIF_COLOR_PRIMARIES_BT2100: _bindgen_ty_1 = 9;
pub const AVIF_COLOR_PRIMARIES_XYZ: _bindgen_ty_1 = 10;
pub const AVIF_COLOR_PRIMARIES_SMPTE431: _bindgen_ty_1 = 11;
pub const AVIF_COLOR_PRIMARIES_SMPTE432: _bindgen_ty_1 = 12;
pub const AVIF_COLOR_PRIMARIES_DCI_P3: _bindgen_ty_1 = 12;
pub const AVIF_COLOR_PRIMARIES_EBU3213: _bindgen_ty_1 = 22;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
pub type avifColorPrimaries = u16;
unsafe extern "C" {
    pub fn avifColorPrimariesGetValues(acp: avifColorPrimaries, outPrimaries: *mut f32);
}
unsafe extern "C" {
    pub fn avifColorPrimariesFind(
        inPrimaries: *const f32,
        outName: *mut *const ::std::os::raw::c_char,
    ) -> avifColorPrimaries;
}
pub const AVIF_TRANSFER_CHARACTERISTICS_UNKNOWN: _bindgen_ty_2 = 0;
pub const AVIF_TRANSFER_CHARACTERISTICS_BT709: _bindgen_ty_2 = 1;
pub const AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED: _bindgen_ty_2 = 2;
pub const AVIF_TRANSFER_CHARACTERISTICS_BT470M: _bindgen_ty_2 = 4;
pub const AVIF_TRANSFER_CHARACTERISTICS_BT470BG: _bindgen_ty_2 = 5;
pub const AVIF_TRANSFER_CHARACTERISTICS_BT601: _bindgen_ty_2 = 6;
pub const AVIF_TRANSFER_CHARACTERISTICS_SMPTE240: _bindgen_ty_2 = 7;
pub const AVIF_TRANSFER_CHARACTERISTICS_LINEAR: _bindgen_ty_2 = 8;
pub const AVIF_TRANSFER_CHARACTERISTICS_LOG100: _bindgen_ty_2 = 9;
pub const AVIF_TRANSFER_CHARACTERISTICS_LOG100_SQRT10: _bindgen_ty_2 = 10;
pub const AVIF_TRANSFER_CHARACTERISTICS_IEC61966: _bindgen_ty_2 = 11;
pub const AVIF_TRANSFER_CHARACTERISTICS_BT1361: _bindgen_ty_2 = 12;
pub const AVIF_TRANSFER_CHARACTERISTICS_SRGB: _bindgen_ty_2 = 13;
pub const AVIF_TRANSFER_CHARACTERISTICS_BT2020_10BIT: _bindgen_ty_2 = 14;
pub const AVIF_TRANSFER_CHARACTERISTICS_BT2020_12BIT: _bindgen_ty_2 = 15;
pub const AVIF_TRANSFER_CHARACTERISTICS_PQ: _bindgen_ty_2 = 16;
pub const AVIF_TRANSFER_CHARACTERISTICS_SMPTE2084: _bindgen_ty_2 = 16;
pub const AVIF_TRANSFER_CHARACTERISTICS_SMPTE428: _bindgen_ty_2 = 17;
pub const AVIF_TRANSFER_CHARACTERISTICS_HLG: _bindgen_ty_2 = 18;
pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
pub type avifTransferCharacteristics = u16;
unsafe extern "C" {
    pub fn avifTransferCharacteristicsGetGamma(
        atc: avifTransferCharacteristics,
        gamma: *mut f32,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifTransferCharacteristicsFindByGamma(gamma: f32) -> avifTransferCharacteristics;
}
pub const AVIF_MATRIX_COEFFICIENTS_IDENTITY: _bindgen_ty_3 = 0;
pub const AVIF_MATRIX_COEFFICIENTS_BT709: _bindgen_ty_3 = 1;
pub const AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED: _bindgen_ty_3 = 2;
pub const AVIF_MATRIX_COEFFICIENTS_FCC: _bindgen_ty_3 = 4;
pub const AVIF_MATRIX_COEFFICIENTS_BT470BG: _bindgen_ty_3 = 5;
pub const AVIF_MATRIX_COEFFICIENTS_BT601: _bindgen_ty_3 = 6;
pub const AVIF_MATRIX_COEFFICIENTS_SMPTE240: _bindgen_ty_3 = 7;
pub const AVIF_MATRIX_COEFFICIENTS_YCGCO: _bindgen_ty_3 = 8;
pub const AVIF_MATRIX_COEFFICIENTS_BT2020_NCL: _bindgen_ty_3 = 9;
pub const AVIF_MATRIX_COEFFICIENTS_BT2020_CL: _bindgen_ty_3 = 10;
pub const AVIF_MATRIX_COEFFICIENTS_SMPTE2085: _bindgen_ty_3 = 11;
pub const AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: _bindgen_ty_3 = 12;
pub const AVIF_MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL: _bindgen_ty_3 = 13;
pub const AVIF_MATRIX_COEFFICIENTS_ICTCP: _bindgen_ty_3 = 14;
pub const AVIF_MATRIX_COEFFICIENTS_YCGCO_RE: _bindgen_ty_3 = 16;
pub const AVIF_MATRIX_COEFFICIENTS_YCGCO_RO: _bindgen_ty_3 = 17;
pub const AVIF_MATRIX_COEFFICIENTS_LAST: _bindgen_ty_3 = 18;
pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
pub type avifMatrixCoefficients = u16;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifDiagnostics {
    pub error: [::std::os::raw::c_char; 256usize],
}
impl Default for avifDiagnostics {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub fn avifDiagnosticsClearError(diag: *mut avifDiagnostics);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifFraction {
    pub n: i32,
    pub d: i32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifSignedFraction {
    pub n: i32,
    pub d: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifUnsignedFraction {
    pub n: u32,
    pub d: u32,
}
unsafe extern "C" {
    pub fn avifDoubleToSignedFraction(v: f64, fraction: *mut avifSignedFraction) -> avifBool;
}
unsafe extern "C" {
    pub fn avifDoubleToUnsignedFraction(v: f64, fraction: *mut avifUnsignedFraction) -> avifBool;
}
pub const avifTransformFlag_AVIF_TRANSFORM_NONE: avifTransformFlag = 0;
pub const avifTransformFlag_AVIF_TRANSFORM_PASP: avifTransformFlag = 1;
pub const avifTransformFlag_AVIF_TRANSFORM_CLAP: avifTransformFlag = 2;
pub const avifTransformFlag_AVIF_TRANSFORM_IROT: avifTransformFlag = 4;
pub const avifTransformFlag_AVIF_TRANSFORM_IMIR: avifTransformFlag = 8;
pub type avifTransformFlag = ::std::os::raw::c_uint;
pub type avifTransformFlags = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifPixelAspectRatioBox {
    pub hSpacing: u32,
    pub vSpacing: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifCleanApertureBox {
    pub widthN: u32,
    pub widthD: u32,
    pub heightN: u32,
    pub heightD: u32,
    pub horizOffN: u32,
    pub horizOffD: u32,
    pub vertOffN: u32,
    pub vertOffD: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifImageRotation {
    pub angle: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifImageMirror {
    pub axis: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifCropRect {
    pub x: u32,
    pub y: u32,
    pub width: u32,
    pub height: u32,
}
unsafe extern "C" {
    pub fn avifCropRectFromCleanApertureBox(
        cropRect: *mut avifCropRect,
        clap: *const avifCleanApertureBox,
        imageW: u32,
        imageH: u32,
        diag: *mut avifDiagnostics,
    ) -> avifBool;
}
unsafe extern "C" {
    pub fn avifCleanApertureBoxFromCropRect(
        clap: *mut avifCleanApertureBox,
        cropRect: *const avifCropRect,
        imageW: u32,
        imageH: u32,
        diag: *mut avifDiagnostics,
    ) -> avifBool;
}
unsafe extern "C" {
    pub fn avifCropRectRequiresUpsampling(
        cropRect: *const avifCropRect,
        yuvFormat: avifPixelFormat,
    ) -> avifBool;
}
unsafe extern "C" {
    pub fn avifCropRectConvertCleanApertureBox(
        arg1: *mut avifCropRect,
        arg2: *const avifCleanApertureBox,
        arg3: u32,
        arg4: u32,
        arg5: avifPixelFormat,
        arg6: *mut avifDiagnostics,
    ) -> avifBool;
}
unsafe extern "C" {
    pub fn avifCleanApertureBoxConvertCropRect(
        arg1: *mut avifCleanApertureBox,
        arg2: *const avifCropRect,
        arg3: u32,
        arg4: u32,
        arg5: avifPixelFormat,
        arg6: *mut avifDiagnostics,
    ) -> avifBool;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifContentLightLevelInformationBox {
    pub maxCLL: u16,
    pub maxPALL: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifGainMap {
    pub image: *mut avifImage,
    pub gainMapMin: [avifSignedFraction; 3usize],
    pub gainMapMax: [avifSignedFraction; 3usize],
    pub gainMapGamma: [avifUnsignedFraction; 3usize],
    pub baseOffset: [avifSignedFraction; 3usize],
    pub alternateOffset: [avifSignedFraction; 3usize],
    pub baseHdrHeadroom: avifUnsignedFraction,
    pub alternateHdrHeadroom: avifUnsignedFraction,
    pub useBaseColorSpace: avifBool,
    pub altICC: avifRWData,
    pub altColorPrimaries: avifColorPrimaries,
    pub altTransferCharacteristics: avifTransferCharacteristics,
    pub altMatrixCoefficients: avifMatrixCoefficients,
    pub altYUVRange: avifRange,
    pub altDepth: u32,
    pub altPlaneCount: u32,
    pub altCLLI: avifContentLightLevelInformationBox,
}
impl Default for avifGainMap {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub fn avifGainMapCreate() -> *mut avifGainMap;
}
unsafe extern "C" {
    pub fn avifGainMapDestroy(gainMap: *mut avifGainMap);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifImageItemProperty {
    pub boxtype: [u8; 4usize],
    pub usertype: [u8; 16usize],
    pub boxPayload: avifRWData,
}
impl Default for avifImageItemProperty {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifImage {
    pub width: u32,
    pub height: u32,
    pub depth: u32,
    pub yuvFormat: avifPixelFormat,
    pub yuvRange: avifRange,
    pub yuvChromaSamplePosition: avifChromaSamplePosition,
    pub yuvPlanes: [*mut u8; 3usize],
    pub yuvRowBytes: [u32; 3usize],
    pub imageOwnsYUVPlanes: avifBool,
    pub alphaPlane: *mut u8,
    pub alphaRowBytes: u32,
    pub imageOwnsAlphaPlane: avifBool,
    pub alphaPremultiplied: avifBool,
    pub icc: avifRWData,
    pub colorPrimaries: avifColorPrimaries,
    pub transferCharacteristics: avifTransferCharacteristics,
    pub matrixCoefficients: avifMatrixCoefficients,
    pub clli: avifContentLightLevelInformationBox,
    pub transformFlags: avifTransformFlags,
    pub pasp: avifPixelAspectRatioBox,
    pub clap: avifCleanApertureBox,
    pub irot: avifImageRotation,
    pub imir: avifImageMirror,
    pub exif: avifRWData,
    pub xmp: avifRWData,
    pub properties: *mut avifImageItemProperty,
    pub numProperties: usize,
    pub gainMap: *mut avifGainMap,
}
impl Default for avifImage {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub fn avifImageCreate(
        width: u32,
        height: u32,
        depth: u32,
        yuvFormat: avifPixelFormat,
    ) -> *mut avifImage;
}
unsafe extern "C" {
    pub fn avifImageCreateEmpty() -> *mut avifImage;
}
unsafe extern "C" {
    pub fn avifImageCopy(
        dstImage: *mut avifImage,
        srcImage: *const avifImage,
        planes: avifPlanesFlags,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageSetViewRect(
        dstImage: *mut avifImage,
        srcImage: *const avifImage,
        rect: *const avifCropRect,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageDestroy(image: *mut avifImage);
}
unsafe extern "C" {
    pub fn avifImageSetProfileICC(
        image: *mut avifImage,
        icc: *const u8,
        iccSize: usize,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageSetMetadataExif(
        image: *mut avifImage,
        exif: *const u8,
        exifSize: usize,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageSetMetadataXMP(
        image: *mut avifImage,
        xmp: *const u8,
        xmpSize: usize,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageAllocatePlanes(image: *mut avifImage, planes: avifPlanesFlags) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageFreePlanes(image: *mut avifImage, planes: avifPlanesFlags);
}
unsafe extern "C" {
    pub fn avifImageStealPlanes(
        dstImage: *mut avifImage,
        srcImage: *mut avifImage,
        planes: avifPlanesFlags,
    );
}
unsafe extern "C" {
    pub fn avifImageAddOpaqueProperty(
        image: *mut avifImage,
        boxtype: *const u8,
        data: *const u8,
        dataSize: usize,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageAddUUIDProperty(
        image: *mut avifImage,
        uuid: *const u8,
        data: *const u8,
        dataSize: usize,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageScale(
        image: *mut avifImage,
        dstWidth: u32,
        dstHeight: u32,
        diag: *mut avifDiagnostics,
    ) -> avifResult;
}
pub const avifRGBFormat_AVIF_RGB_FORMAT_RGB: avifRGBFormat = 0;
pub const avifRGBFormat_AVIF_RGB_FORMAT_RGBA: avifRGBFormat = 1;
pub const avifRGBFormat_AVIF_RGB_FORMAT_ARGB: avifRGBFormat = 2;
pub const avifRGBFormat_AVIF_RGB_FORMAT_BGR: avifRGBFormat = 3;
pub const avifRGBFormat_AVIF_RGB_FORMAT_BGRA: avifRGBFormat = 4;
pub const avifRGBFormat_AVIF_RGB_FORMAT_ABGR: avifRGBFormat = 5;
pub const avifRGBFormat_AVIF_RGB_FORMAT_RGB_565: avifRGBFormat = 6;
pub const avifRGBFormat_AVIF_RGB_FORMAT_GRAY: avifRGBFormat = 7;
pub const avifRGBFormat_AVIF_RGB_FORMAT_GRAYA: avifRGBFormat = 8;
pub const avifRGBFormat_AVIF_RGB_FORMAT_AGRAY: avifRGBFormat = 9;
pub const avifRGBFormat_AVIF_RGB_FORMAT_COUNT: avifRGBFormat = 10;
pub type avifRGBFormat = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn avifRGBFormatChannelCount(format: avifRGBFormat) -> u32;
}
unsafe extern "C" {
    pub fn avifRGBFormatHasAlpha(format: avifRGBFormat) -> avifBool;
}
unsafe extern "C" {
    pub fn avifRGBFormatIsGray(format: avifRGBFormat) -> avifBool;
}
pub const avifChromaUpsampling_AVIF_CHROMA_UPSAMPLING_AUTOMATIC: avifChromaUpsampling = 0;
pub const avifChromaUpsampling_AVIF_CHROMA_UPSAMPLING_FASTEST: avifChromaUpsampling = 1;
pub const avifChromaUpsampling_AVIF_CHROMA_UPSAMPLING_BEST_QUALITY: avifChromaUpsampling = 2;
pub const avifChromaUpsampling_AVIF_CHROMA_UPSAMPLING_NEAREST: avifChromaUpsampling = 3;
pub const avifChromaUpsampling_AVIF_CHROMA_UPSAMPLING_BILINEAR: avifChromaUpsampling = 4;
pub type avifChromaUpsampling = ::std::os::raw::c_uint;
pub const avifChromaDownsampling_AVIF_CHROMA_DOWNSAMPLING_AUTOMATIC: avifChromaDownsampling = 0;
pub const avifChromaDownsampling_AVIF_CHROMA_DOWNSAMPLING_FASTEST: avifChromaDownsampling = 1;
pub const avifChromaDownsampling_AVIF_CHROMA_DOWNSAMPLING_BEST_QUALITY: avifChromaDownsampling = 2;
pub const avifChromaDownsampling_AVIF_CHROMA_DOWNSAMPLING_AVERAGE: avifChromaDownsampling = 3;
pub const avifChromaDownsampling_AVIF_CHROMA_DOWNSAMPLING_SHARP_YUV: avifChromaDownsampling = 4;
pub type avifChromaDownsampling = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifRGBImage {
    pub width: u32,
    pub height: u32,
    pub depth: u32,
    pub format: avifRGBFormat,
    pub chromaUpsampling: avifChromaUpsampling,
    pub chromaDownsampling: avifChromaDownsampling,
    pub avoidLibYUV: avifBool,
    pub ignoreAlpha: avifBool,
    pub alphaPremultiplied: avifBool,
    pub isFloat: avifBool,
    pub maxThreads: ::std::os::raw::c_int,
    pub pixels: *mut u8,
    pub rowBytes: u32,
}
impl Default for avifRGBImage {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub fn avifRGBImageSetDefaults(rgb: *mut avifRGBImage, image: *const avifImage);
}
unsafe extern "C" {
    pub fn avifRGBImagePixelSize(rgb: *const avifRGBImage) -> u32;
}
unsafe extern "C" {
    pub fn avifRGBImageAllocatePixels(rgb: *mut avifRGBImage) -> avifResult;
}
unsafe extern "C" {
    pub fn avifRGBImageFreePixels(rgb: *mut avifRGBImage);
}
unsafe extern "C" {
    pub fn avifImageRGBToYUV(image: *mut avifImage, rgb: *const avifRGBImage) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageYUVToRGB(image: *const avifImage, rgb: *mut avifRGBImage) -> avifResult;
}
unsafe extern "C" {
    pub fn avifRGBImagePremultiplyAlpha(rgb: *mut avifRGBImage) -> avifResult;
}
unsafe extern "C" {
    pub fn avifRGBImageUnpremultiplyAlpha(rgb: *mut avifRGBImage) -> avifResult;
}
unsafe extern "C" {
    pub fn avifFullToLimitedY(depth: u32, v: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn avifFullToLimitedUV(depth: u32, v: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn avifLimitedToFullY(depth: u32, v: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn avifLimitedToFullUV(depth: u32, v: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
pub const avifCodecChoice_AVIF_CODEC_CHOICE_AUTO: avifCodecChoice = 0;
pub const avifCodecChoice_AVIF_CODEC_CHOICE_AOM: avifCodecChoice = 1;
pub const avifCodecChoice_AVIF_CODEC_CHOICE_DAV1D: avifCodecChoice = 2;
pub const avifCodecChoice_AVIF_CODEC_CHOICE_LIBGAV1: avifCodecChoice = 3;
pub const avifCodecChoice_AVIF_CODEC_CHOICE_RAV1E: avifCodecChoice = 4;
pub const avifCodecChoice_AVIF_CODEC_CHOICE_SVT: avifCodecChoice = 5;
pub const avifCodecChoice_AVIF_CODEC_CHOICE_AVM: avifCodecChoice = 6;
pub type avifCodecChoice = ::std::os::raw::c_uint;
pub const avifCodecFlag_AVIF_CODEC_FLAG_CAN_DECODE: avifCodecFlag = 1;
pub const avifCodecFlag_AVIF_CODEC_FLAG_CAN_ENCODE: avifCodecFlag = 2;
pub type avifCodecFlag = ::std::os::raw::c_uint;
pub type avifCodecFlags = u32;
unsafe extern "C" {
    pub fn avifCodecName(
        choice: avifCodecChoice,
        requiredFlags: avifCodecFlags,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn avifCodecChoiceFromName(name: *const ::std::os::raw::c_char) -> avifCodecChoice;
}
pub type avifIODestroyFunc = ::std::option::Option<unsafe extern "C" fn(io: *mut avifIO)>;
pub type avifIOReadFunc = ::std::option::Option<
    unsafe extern "C" fn(
        io: *mut avifIO,
        readFlags: u32,
        offset: u64,
        size: usize,
        out: *mut avifROData,
    ) -> avifResult,
>;
pub type avifIOWriteFunc = ::std::option::Option<
    unsafe extern "C" fn(
        io: *mut avifIO,
        writeFlags: u32,
        offset: u64,
        data: *const u8,
        size: usize,
    ) -> avifResult,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifIO {
    pub destroy: avifIODestroyFunc,
    pub read: avifIOReadFunc,
    pub write: avifIOWriteFunc,
    pub sizeHint: u64,
    pub persistent: avifBool,
    pub data: *mut ::std::os::raw::c_void,
}
impl Default for avifIO {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub fn avifIOCreateMemoryReader(data: *const u8, size: usize) -> *mut avifIO;
}
unsafe extern "C" {
    pub fn avifIOCreateFileReader(filename: *const ::std::os::raw::c_char) -> *mut avifIO;
}
unsafe extern "C" {
    pub fn avifIODestroy(io: *mut avifIO);
}
pub const avifStrictFlag_AVIF_STRICT_DISABLED: avifStrictFlag = 0;
pub const avifStrictFlag_AVIF_STRICT_PIXI_REQUIRED: avifStrictFlag = 1;
pub const avifStrictFlag_AVIF_STRICT_CLAP_VALID: avifStrictFlag = 2;
pub const avifStrictFlag_AVIF_STRICT_ALPHA_ISPE_REQUIRED: avifStrictFlag = 4;
pub const avifStrictFlag_AVIF_STRICT_ENABLED: avifStrictFlag = 7;
pub type avifStrictFlag = ::std::os::raw::c_uint;
pub type avifStrictFlags = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifIOStats {
    pub colorOBUSize: usize,
    pub alphaOBUSize: usize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifDecoderData {
    _unused: [u8; 0],
}
pub const avifDecoderSource_AVIF_DECODER_SOURCE_AUTO: avifDecoderSource = 0;
pub const avifDecoderSource_AVIF_DECODER_SOURCE_PRIMARY_ITEM: avifDecoderSource = 1;
pub const avifDecoderSource_AVIF_DECODER_SOURCE_TRACKS: avifDecoderSource = 2;
pub type avifDecoderSource = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifImageTiming {
    pub timescale: u64,
    pub pts: f64,
    pub ptsInTimescales: u64,
    pub duration: f64,
    pub durationInTimescales: u64,
}
pub const avifProgressiveState_AVIF_PROGRESSIVE_STATE_UNAVAILABLE: avifProgressiveState = 0;
pub const avifProgressiveState_AVIF_PROGRESSIVE_STATE_AVAILABLE: avifProgressiveState = 1;
pub const avifProgressiveState_AVIF_PROGRESSIVE_STATE_ACTIVE: avifProgressiveState = 2;
pub type avifProgressiveState = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn avifProgressiveStateToString(
        progressiveState: avifProgressiveState,
    ) -> *const ::std::os::raw::c_char;
}
pub const avifImageContentTypeFlag_AVIF_IMAGE_CONTENT_NONE: avifImageContentTypeFlag = 0;
pub const avifImageContentTypeFlag_AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA: avifImageContentTypeFlag = 3;
pub const avifImageContentTypeFlag_AVIF_IMAGE_CONTENT_GAIN_MAP: avifImageContentTypeFlag = 4;
pub const avifImageContentTypeFlag_AVIF_IMAGE_CONTENT_ALL: avifImageContentTypeFlag = 7;
pub const avifImageContentTypeFlag_AVIF_IMAGE_CONTENT_DECODE_DEFAULT: avifImageContentTypeFlag = 3;
pub type avifImageContentTypeFlag = ::std::os::raw::c_uint;
pub type avifImageContentTypeFlags = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifDecoder {
    pub codecChoice: avifCodecChoice,
    pub maxThreads: ::std::os::raw::c_int,
    pub requestedSource: avifDecoderSource,
    pub allowProgressive: avifBool,
    pub allowIncremental: avifBool,
    pub ignoreExif: avifBool,
    pub ignoreXMP: avifBool,
    pub imageSizeLimit: u32,
    pub imageDimensionLimit: u32,
    pub imageCountLimit: u32,
    pub strictFlags: avifStrictFlags,
    pub image: *mut avifImage,
    pub imageIndex: ::std::os::raw::c_int,
    pub imageCount: ::std::os::raw::c_int,
    pub progressiveState: avifProgressiveState,
    pub imageTiming: avifImageTiming,
    pub timescale: u64,
    pub duration: f64,
    pub durationInTimescales: u64,
    pub repetitionCount: ::std::os::raw::c_int,
    pub alphaPresent: avifBool,
    pub ioStats: avifIOStats,
    pub diag: avifDiagnostics,
    pub io: *mut avifIO,
    pub data: *mut avifDecoderData,
    pub imageSequenceTrackPresent: avifBool,
    pub imageContentToDecode: avifImageContentTypeFlags,
}
impl Default for avifDecoder {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub fn avifDecoderCreate() -> *mut avifDecoder;
}
unsafe extern "C" {
    pub fn avifDecoderDestroy(decoder: *mut avifDecoder);
}
unsafe extern "C" {
    pub fn avifDecoderRead(decoder: *mut avifDecoder, image: *mut avifImage) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderReadMemory(
        decoder: *mut avifDecoder,
        image: *mut avifImage,
        data: *const u8,
        size: usize,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderReadFile(
        decoder: *mut avifDecoder,
        image: *mut avifImage,
        filename: *const ::std::os::raw::c_char,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderSetSource(decoder: *mut avifDecoder, source: avifDecoderSource)
    -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderSetIO(decoder: *mut avifDecoder, io: *mut avifIO);
}
unsafe extern "C" {
    pub fn avifDecoderSetIOMemory(
        decoder: *mut avifDecoder,
        data: *const u8,
        size: usize,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderSetIOFile(
        decoder: *mut avifDecoder,
        filename: *const ::std::os::raw::c_char,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderParse(decoder: *mut avifDecoder) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderNextImage(decoder: *mut avifDecoder) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderNthImage(decoder: *mut avifDecoder, frameIndex: u32) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderReset(decoder: *mut avifDecoder) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderIsKeyframe(decoder: *const avifDecoder, frameIndex: u32) -> avifBool;
}
unsafe extern "C" {
    pub fn avifDecoderNearestKeyframe(decoder: *const avifDecoder, frameIndex: u32) -> u32;
}
unsafe extern "C" {
    pub fn avifDecoderNthImageTiming(
        decoder: *const avifDecoder,
        frameIndex: u32,
        outTiming: *mut avifImageTiming,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifDecoderDecodedRowCount(decoder: *const avifDecoder) -> u32;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifExtent {
    pub offset: u64,
    pub size: usize,
}
unsafe extern "C" {
    pub fn avifDecoderNthImageMaxExtent(
        decoder: *const avifDecoder,
        frameIndex: u32,
        outExtent: *mut avifExtent,
    ) -> avifResult;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifEncoderData {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifCodecSpecificOptions {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct avifScalingMode {
    pub horizontal: avifFraction,
    pub vertical: avifFraction,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avifEncoder {
    pub codecChoice: avifCodecChoice,
    pub maxThreads: ::std::os::raw::c_int,
    pub speed: ::std::os::raw::c_int,
    pub keyframeInterval: ::std::os::raw::c_int,
    pub timescale: u64,
    pub repetitionCount: ::std::os::raw::c_int,
    pub extraLayerCount: u32,
    pub quality: ::std::os::raw::c_int,
    pub qualityAlpha: ::std::os::raw::c_int,
    pub minQuantizer: ::std::os::raw::c_int,
    pub maxQuantizer: ::std::os::raw::c_int,
    pub minQuantizerAlpha: ::std::os::raw::c_int,
    pub maxQuantizerAlpha: ::std::os::raw::c_int,
    pub tileRowsLog2: ::std::os::raw::c_int,
    pub tileColsLog2: ::std::os::raw::c_int,
    pub autoTiling: avifBool,
    pub scalingMode: avifScalingMode,
    pub ioStats: avifIOStats,
    pub diag: avifDiagnostics,
    pub data: *mut avifEncoderData,
    pub csOptions: *mut avifCodecSpecificOptions,
    pub headerFormat: avifHeaderFormatFlags,
    pub qualityGainMap: ::std::os::raw::c_int,
}
impl Default for avifEncoder {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub fn avifEncoderCreate() -> *mut avifEncoder;
}
unsafe extern "C" {
    pub fn avifEncoderWrite(
        encoder: *mut avifEncoder,
        image: *const avifImage,
        output: *mut avifRWData,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifEncoderDestroy(encoder: *mut avifEncoder);
}
pub const avifAddImageFlag_AVIF_ADD_IMAGE_FLAG_NONE: avifAddImageFlag = 0;
pub const avifAddImageFlag_AVIF_ADD_IMAGE_FLAG_FORCE_KEYFRAME: avifAddImageFlag = 1;
pub const avifAddImageFlag_AVIF_ADD_IMAGE_FLAG_SINGLE: avifAddImageFlag = 2;
pub type avifAddImageFlag = ::std::os::raw::c_uint;
pub type avifAddImageFlags = u32;
unsafe extern "C" {
    pub fn avifEncoderAddImage(
        encoder: *mut avifEncoder,
        image: *const avifImage,
        durationInTimescales: u64,
        addImageFlags: avifAddImageFlags,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifEncoderAddImageGrid(
        encoder: *mut avifEncoder,
        gridCols: u32,
        gridRows: u32,
        cellImages: *const *const avifImage,
        addImageFlags: avifAddImageFlags,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifEncoderFinish(encoder: *mut avifEncoder, output: *mut avifRWData) -> avifResult;
}
unsafe extern "C" {
    pub fn avifEncoderSetCodecSpecificOption(
        encoder: *mut avifEncoder,
        key: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_char,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifEncoderGetGainMapSizeBytes(encoder: *mut avifEncoder) -> usize;
}
unsafe extern "C" {
    pub fn avifImageUsesU16(image: *const avifImage) -> avifBool;
}
unsafe extern "C" {
    pub fn avifImageIsOpaque(image: *const avifImage) -> avifBool;
}
unsafe extern "C" {
    pub fn avifImagePlane(image: *const avifImage, channel: ::std::os::raw::c_int) -> *mut u8;
}
unsafe extern "C" {
    pub fn avifImagePlaneRowBytes(image: *const avifImage, channel: ::std::os::raw::c_int) -> u32;
}
unsafe extern "C" {
    pub fn avifImagePlaneWidth(image: *const avifImage, channel: ::std::os::raw::c_int) -> u32;
}
unsafe extern "C" {
    pub fn avifImagePlaneHeight(image: *const avifImage, channel: ::std::os::raw::c_int) -> u32;
}
unsafe extern "C" {
    pub fn avifPeekCompatibleFileType(input: *const avifROData) -> avifBool;
}
unsafe extern "C" {
    pub fn avifImageApplyGainMap(
        baseImage: *const avifImage,
        gainMap: *const avifGainMap,
        hdrHeadroom: f32,
        outputColorPrimaries: avifColorPrimaries,
        outputTransferCharacteristics: avifTransferCharacteristics,
        toneMappedImage: *mut avifRGBImage,
        clli: *mut avifContentLightLevelInformationBox,
        diag: *mut avifDiagnostics,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifRGBImageApplyGainMap(
        baseImage: *const avifRGBImage,
        baseColorPrimaries: avifColorPrimaries,
        baseTransferCharacteristics: avifTransferCharacteristics,
        gainMap: *const avifGainMap,
        hdrHeadroom: f32,
        outputColorPrimaries: avifColorPrimaries,
        outputTransferCharacteristics: avifTransferCharacteristics,
        toneMappedImage: *mut avifRGBImage,
        clli: *mut avifContentLightLevelInformationBox,
        diag: *mut avifDiagnostics,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifRGBImageComputeGainMap(
        baseRgbImage: *const avifRGBImage,
        baseColorPrimaries: avifColorPrimaries,
        baseTransferCharacteristics: avifTransferCharacteristics,
        altRgbImage: *const avifRGBImage,
        altColorPrimaries: avifColorPrimaries,
        altTransferCharacteristics: avifTransferCharacteristics,
        gainMap: *mut avifGainMap,
        diag: *mut avifDiagnostics,
    ) -> avifResult;
}
unsafe extern "C" {
    pub fn avifImageComputeGainMap(
        baseImage: *const avifImage,
        altImage: *const avifImage,
        gainMap: *mut avifGainMap,
        diag: *mut avifDiagnostics,
    ) -> avifResult;
}
