Skip to main content

media_codec_vpx_sys/opt/rustwide/workdir/generated/
vpx.rs

1/* automatically generated by rust-bindgen 0.72.0 */
2
3pub const VPX_IMAGE_ABI_VERSION: u32 = 5;
4pub const VPX_IMG_FMT_PLANAR: u32 = 256;
5pub const VPX_IMG_FMT_UV_FLIP: u32 = 512;
6pub const VPX_IMG_FMT_HAS_ALPHA: u32 = 1024;
7pub const VPX_IMG_FMT_HIGHBITDEPTH: u32 = 2048;
8pub const VPX_PLANE_PACKED: u32 = 0;
9pub const VPX_PLANE_Y: u32 = 0;
10pub const VPX_PLANE_U: u32 = 1;
11pub const VPX_PLANE_V: u32 = 2;
12pub const VPX_PLANE_ALPHA: u32 = 3;
13pub const VPX_CODEC_ABI_VERSION: u32 = 9;
14pub const VPX_CODEC_CAP_DECODER: u32 = 1;
15pub const VPX_CODEC_CAP_ENCODER: u32 = 2;
16pub const VPX_CODEC_CAP_HIGHBITDEPTH: u32 = 4;
17pub const VPX_TPL_ABI_VERSION: u32 = 4;
18pub const VPX_EXT_RATECTRL_ABI_VERSION: u32 = 10;
19pub const VPX_RC_MAX_STATIC_GF_GROUP_LENGTH: u32 = 250;
20pub const VPX_RC_MAX_REF_FRAMES: u32 = 4;
21pub const VPX_DEFAULT_Q: i32 = -1;
22pub const VPX_DEFAULT_RDMULT: i32 = -1;
23pub const VPX_TS_MAX_PERIODICITY: u32 = 16;
24pub const VPX_TS_MAX_LAYERS: u32 = 5;
25pub const VPX_MAX_LAYERS: u32 = 12;
26pub const VPX_SS_MAX_LAYERS: u32 = 5;
27pub const VPX_SS_DEFAULT_LAYERS: u32 = 1;
28pub const VPX_ENCODER_ABI_VERSION: u32 = 37;
29pub const VPX_CODEC_CAP_PSNR: u32 = 65536;
30pub const VPX_CODEC_CAP_OUTPUT_PARTITION: u32 = 131072;
31pub const VPX_CODEC_USE_PSNR: u32 = 65536;
32pub const VPX_CODEC_USE_OUTPUT_PARTITION: u32 = 131072;
33pub const VPX_CODEC_USE_HIGHBITDEPTH: u32 = 262144;
34pub const VPX_FRAME_IS_KEY: u32 = 1;
35pub const VPX_FRAME_IS_DROPPABLE: u32 = 2;
36pub const VPX_FRAME_IS_INVISIBLE: u32 = 4;
37pub const VPX_FRAME_IS_FRAGMENT: u32 = 8;
38pub const VPX_ERROR_RESILIENT_DEFAULT: u32 = 1;
39pub const VPX_ERROR_RESILIENT_PARTITIONS: u32 = 2;
40pub const VPX_EFLAG_FORCE_KF: u32 = 1;
41pub const VPX_DL_REALTIME: u32 = 1;
42pub const VPX_DL_GOOD_QUALITY: u32 = 1000000;
43pub const VPX_DL_BEST_QUALITY: u32 = 0;
44pub const VP8_EFLAG_NO_REF_LAST: u32 = 65536;
45pub const VP8_EFLAG_NO_REF_GF: u32 = 131072;
46pub const VP8_EFLAG_NO_REF_ARF: u32 = 2097152;
47pub const VP8_EFLAG_NO_UPD_LAST: u32 = 262144;
48pub const VP8_EFLAG_NO_UPD_GF: u32 = 4194304;
49pub const VP8_EFLAG_NO_UPD_ARF: u32 = 8388608;
50pub const VP8_EFLAG_FORCE_GF: u32 = 524288;
51pub const VP8_EFLAG_FORCE_ARF: u32 = 16777216;
52pub const VP8_EFLAG_NO_UPD_ENTROPY: u32 = 1048576;
53pub const VPX_MAXIMUM_WORK_BUFFERS: u32 = 8;
54pub const VP9_MAXIMUM_REF_BUFFERS: u32 = 8;
55pub const VPX_DECODER_ABI_VERSION: u32 = 12;
56pub const VPX_CODEC_CAP_PUT_SLICE: u32 = 65536;
57pub const VPX_CODEC_CAP_PUT_FRAME: u32 = 131072;
58pub const VPX_CODEC_CAP_POSTPROC: u32 = 262144;
59pub const VPX_CODEC_CAP_ERROR_CONCEALMENT: u32 = 524288;
60pub const VPX_CODEC_CAP_INPUT_FRAGMENTS: u32 = 1048576;
61pub const VPX_CODEC_CAP_FRAME_THREADING: u32 = 2097152;
62pub const VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER: u32 = 4194304;
63pub const VPX_CODEC_USE_POSTPROC: u32 = 65536;
64pub const VPX_CODEC_USE_ERROR_CONCEALMENT: u32 = 131072;
65pub const VPX_CODEC_USE_INPUT_FRAGMENTS: u32 = 262144;
66pub const VPX_CODEC_USE_FRAME_THREADING: u32 = 524288;
67#[repr(u32)]
68#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
69pub enum vpx_img_fmt {
70    VPX_IMG_FMT_NONE = 0,
71    VPX_IMG_FMT_YV12 = 769,
72    VPX_IMG_FMT_I420 = 258,
73    VPX_IMG_FMT_I422 = 261,
74    VPX_IMG_FMT_I444 = 262,
75    VPX_IMG_FMT_I440 = 263,
76    VPX_IMG_FMT_NV12 = 265,
77    VPX_IMG_FMT_I42016 = 2306,
78    VPX_IMG_FMT_I42216 = 2309,
79    VPX_IMG_FMT_I44416 = 2310,
80    VPX_IMG_FMT_I44016 = 2311,
81}
82pub use self::vpx_img_fmt as vpx_img_fmt_t;
83#[repr(u32)]
84#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
85pub enum vpx_color_space {
86    VPX_CS_UNKNOWN = 0,
87    VPX_CS_BT_601 = 1,
88    VPX_CS_BT_709 = 2,
89    VPX_CS_SMPTE_170 = 3,
90    VPX_CS_SMPTE_240 = 4,
91    VPX_CS_BT_2020 = 5,
92    VPX_CS_RESERVED = 6,
93    VPX_CS_SRGB = 7,
94}
95pub use self::vpx_color_space as vpx_color_space_t;
96#[repr(u32)]
97#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
98pub enum vpx_color_range {
99    VPX_CR_STUDIO_RANGE = 0,
100    VPX_CR_FULL_RANGE = 1,
101}
102pub use self::vpx_color_range as vpx_color_range_t;
103#[repr(C)]
104#[derive(Debug, Copy, Clone)]
105pub struct vpx_image {
106    pub fmt: vpx_img_fmt_t,
107    pub cs: vpx_color_space_t,
108    pub range: vpx_color_range_t,
109    pub w: ::std::os::raw::c_uint,
110    pub h: ::std::os::raw::c_uint,
111    pub bit_depth: ::std::os::raw::c_uint,
112    pub d_w: ::std::os::raw::c_uint,
113    pub d_h: ::std::os::raw::c_uint,
114    pub r_w: ::std::os::raw::c_uint,
115    pub r_h: ::std::os::raw::c_uint,
116    pub x_chroma_shift: ::std::os::raw::c_uint,
117    pub y_chroma_shift: ::std::os::raw::c_uint,
118    pub planes: [*mut ::std::os::raw::c_uchar; 4usize],
119    pub stride: [::std::os::raw::c_int; 4usize],
120    pub bps: ::std::os::raw::c_int,
121    pub user_priv: *mut ::std::os::raw::c_void,
122    pub img_data: *mut ::std::os::raw::c_uchar,
123    pub img_data_owner: ::std::os::raw::c_int,
124    pub self_allocd: ::std::os::raw::c_int,
125    pub fb_priv: *mut ::std::os::raw::c_void,
126}
127pub type vpx_image_t = vpx_image;
128#[repr(C)]
129#[derive(Debug, Copy, Clone)]
130pub struct vpx_image_rect {
131    pub x: ::std::os::raw::c_uint,
132    pub y: ::std::os::raw::c_uint,
133    pub w: ::std::os::raw::c_uint,
134    pub h: ::std::os::raw::c_uint,
135}
136pub type vpx_image_rect_t = vpx_image_rect;
137#[repr(u32)]
138#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
139pub enum vpx_codec_err_t {
140    VPX_CODEC_OK = 0,
141    VPX_CODEC_ERROR = 1,
142    VPX_CODEC_MEM_ERROR = 2,
143    VPX_CODEC_ABI_MISMATCH = 3,
144    VPX_CODEC_INCAPABLE = 4,
145    VPX_CODEC_UNSUP_BITSTREAM = 5,
146    VPX_CODEC_UNSUP_FEATURE = 6,
147    VPX_CODEC_CORRUPT_FRAME = 7,
148    VPX_CODEC_INVALID_PARAM = 8,
149    VPX_CODEC_LIST_END = 9,
150}
151pub type vpx_codec_caps_t = ::std::os::raw::c_long;
152pub type vpx_codec_flags_t = ::std::os::raw::c_long;
153#[repr(C)]
154#[derive(Debug, Copy, Clone)]
155pub struct vpx_codec_iface {
156    _unused: [u8; 0],
157}
158pub type vpx_codec_iface_t = vpx_codec_iface;
159#[repr(C)]
160#[derive(Debug, Copy, Clone)]
161pub struct vpx_codec_priv {
162    _unused: [u8; 0],
163}
164pub type vpx_codec_priv_t = vpx_codec_priv;
165pub type vpx_codec_iter_t = *const ::std::os::raw::c_void;
166#[repr(C)]
167#[derive(Copy, Clone)]
168pub struct vpx_codec_ctx {
169    pub name: *const ::std::os::raw::c_char,
170    pub iface: *const vpx_codec_iface,
171    pub err: vpx_codec_err_t,
172    pub err_detail: *const ::std::os::raw::c_char,
173    pub init_flags: vpx_codec_flags_t,
174    pub config: vpx_codec_ctx__bindgen_ty_1,
175    pub priv_: *mut vpx_codec_priv_t,
176}
177#[repr(C)]
178#[derive(Copy, Clone)]
179pub union vpx_codec_ctx__bindgen_ty_1 {
180    pub dec: *const vpx_codec_dec_cfg,
181    pub enc: *const vpx_codec_enc_cfg,
182    pub raw: *const ::std::os::raw::c_void,
183}
184pub type vpx_codec_ctx_t = vpx_codec_ctx;
185#[repr(u32)]
186#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
187pub enum vpx_bit_depth {
188    VPX_BITS_8 = 8,
189    VPX_BITS_10 = 10,
190    VPX_BITS_12 = 12,
191}
192pub use self::vpx_bit_depth as vpx_bit_depth_t;
193#[repr(u32)]
194#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
195pub enum vp8_com_control_id {
196    VP8_SET_REFERENCE = 1,
197    VP8_COPY_REFERENCE = 2,
198    VP8_SET_POSTPROC = 3,
199    VP9_GET_REFERENCE = 128,
200    VP8_COMMON_CTRL_ID_MAX = 129,
201    VP8_DECODER_CTRL_ID_START = 256,
202}
203#[repr(u32)]
204#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
205pub enum vp8_postproc_level {
206    VP8_NOFILTERING = 0,
207    VP8_DEBLOCK = 1,
208    VP8_DEMACROBLOCK = 2,
209    VP8_ADDNOISE = 4,
210    VP8_MFQE = 8,
211}
212#[repr(C)]
213#[derive(Debug, Copy, Clone)]
214pub struct vp8_postproc_cfg {
215    pub post_proc_flag: ::std::os::raw::c_int,
216    pub deblocking_level: ::std::os::raw::c_int,
217    pub noise_level: ::std::os::raw::c_int,
218}
219pub type vp8_postproc_cfg_t = vp8_postproc_cfg;
220#[repr(u32)]
221#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
222pub enum vpx_ref_frame_type {
223    VP8_LAST_FRAME = 1,
224    VP8_GOLD_FRAME = 2,
225    VP8_ALTR_FRAME = 4,
226}
227pub use self::vpx_ref_frame_type as vpx_ref_frame_type_t;
228#[repr(C)]
229#[derive(Debug, Copy, Clone)]
230pub struct vpx_ref_frame {
231    pub frame_type: vpx_ref_frame_type_t,
232    pub img: vpx_image_t,
233}
234pub type vpx_ref_frame_t = vpx_ref_frame;
235#[repr(C)]
236#[derive(Debug, Copy, Clone)]
237pub struct vp9_ref_frame {
238    pub idx: ::std::os::raw::c_int,
239    pub img: vpx_image_t,
240}
241pub type vp9_ref_frame_t = vp9_ref_frame;
242#[repr(C)]
243#[derive(Debug, Copy, Clone)]
244pub struct VpxTplBlockStats {
245    pub row: i16,
246    pub col: i16,
247    pub intra_cost: i64,
248    pub inter_cost: i64,
249    pub mv_r: i16,
250    pub mv_c: i16,
251    pub srcrf_rate: i64,
252    pub srcrf_dist: i64,
253    pub inter_pred_err: i64,
254    pub intra_pred_err: i64,
255    pub ref_frame_index: ::std::os::raw::c_int,
256}
257#[repr(C)]
258#[derive(Debug, Copy, Clone)]
259pub struct VpxTplFrameStats {
260    pub frame_width: ::std::os::raw::c_int,
261    pub frame_height: ::std::os::raw::c_int,
262    pub num_blocks: ::std::os::raw::c_int,
263    pub block_stats_list: *mut VpxTplBlockStats,
264}
265#[repr(C)]
266#[derive(Debug, Copy, Clone)]
267pub struct VpxTplGopStats {
268    pub size: ::std::os::raw::c_int,
269    pub frame_stats_list: *mut VpxTplFrameStats,
270}
271#[repr(u32)]
272#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
273pub enum vpx_rc_type {
274    VPX_RC_NONE = 0,
275    VPX_RC_QP = 1,
276    VPX_RC_GOP = 2,
277    VPX_RC_RDMULT = 4,
278    VPX_RC_GOP_QP = 3,
279    VPX_RC_GOP_QP_RDMULT = 7,
280}
281pub use self::vpx_rc_type as vpx_rc_type_t;
282#[repr(u32)]
283#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
284pub enum vpx_ext_rc_mode {
285    VPX_RC_QMODE = 0,
286    VPX_RC_VBR = 1,
287    VPX_RC_CQ = 2,
288}
289pub use self::vpx_ext_rc_mode as vpx_ext_rc_mode_t;
290#[repr(i32)]
291#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
292pub enum vpx_rc_frame_update_type {
293    VPX_RC_INVALID_UPDATE_TYPE = -1,
294    VPX_RC_KF_UPDATE = 0,
295    VPX_RC_LF_UPDATE = 1,
296    VPX_RC_GF_UPDATE = 2,
297    VPX_RC_ARF_UPDATE = 3,
298    VPX_RC_OVERLAY_UPDATE = 4,
299    VPX_RC_MID_OVERLAY_UPDATE = 5,
300    VPX_RC_USE_BUF_FRAME = 6,
301}
302pub use self::vpx_rc_frame_update_type as vpx_rc_frame_update_type_t;
303#[repr(i32)]
304#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
305pub enum vpx_rc_ref_name {
306    VPX_RC_INVALID_REF_FRAME = -1,
307    VPX_RC_INTRA_FRAME = 0,
308    VPX_RC_LAST_FRAME = 1,
309    VPX_RC_GOLDEN_FRAME = 2,
310    VPX_RC_ALTREF_FRAME = 3,
311}
312pub use self::vpx_rc_ref_name as vpx_rc_ref_name_t;
313pub type vpx_rc_model_t = *mut ::std::os::raw::c_void;
314#[repr(C)]
315#[derive(Debug, Copy, Clone)]
316pub struct vpx_rc_encodeframe_decision {
317    pub q_index: ::std::os::raw::c_int,
318    pub rdmult: ::std::os::raw::c_int,
319}
320pub type vpx_rc_encodeframe_decision_t = vpx_rc_encodeframe_decision;
321#[repr(C)]
322#[derive(Debug, Copy, Clone)]
323pub struct vpx_rc_encodeframe_info {
324    pub frame_type: ::std::os::raw::c_int,
325    pub show_index: ::std::os::raw::c_int,
326    pub coding_index: ::std::os::raw::c_int,
327    pub gop_index: ::std::os::raw::c_int,
328    pub ref_frame_coding_indexes: [::std::os::raw::c_int; 3usize],
329    pub ref_frame_valid_list: [::std::os::raw::c_int; 3usize],
330    pub gop_size: ::std::os::raw::c_int,
331    pub use_alt_ref: ::std::os::raw::c_int,
332}
333pub type vpx_rc_encodeframe_info_t = vpx_rc_encodeframe_info;
334#[repr(C)]
335#[derive(Debug, Copy, Clone)]
336pub struct vpx_rc_encodeframe_result {
337    pub bit_count: i64,
338    pub actual_encoding_qindex: ::std::os::raw::c_int,
339}
340pub type vpx_rc_encodeframe_result_t = vpx_rc_encodeframe_result;
341#[repr(u32)]
342#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
343pub enum vpx_rc_status {
344    VPX_RC_OK = 0,
345    VPX_RC_ERROR = 1,
346}
347pub use self::vpx_rc_status as vpx_rc_status_t;
348#[repr(C)]
349#[derive(Debug, Copy, Clone)]
350pub struct vpx_rc_frame_stats {
351    pub frame: f64,
352    pub weight: f64,
353    pub intra_error: f64,
354    pub coded_error: f64,
355    pub sr_coded_error: f64,
356    pub frame_noise_energy: f64,
357    pub pcnt_inter: f64,
358    pub pcnt_motion: f64,
359    pub pcnt_second_ref: f64,
360    pub pcnt_neutral: f64,
361    pub pcnt_intra_low: f64,
362    pub pcnt_intra_high: f64,
363    pub intra_skip_pct: f64,
364    pub intra_smooth_pct: f64,
365    pub inactive_zone_rows: f64,
366    pub inactive_zone_cols: f64,
367    pub MVr: f64,
368    pub mvr_abs: f64,
369    pub MVc: f64,
370    pub mvc_abs: f64,
371    pub MVrv: f64,
372    pub MVcv: f64,
373    pub mv_in_out_count: f64,
374    pub duration: f64,
375    pub count: f64,
376    pub new_mv_count: f64,
377}
378pub type vpx_rc_frame_stats_t = vpx_rc_frame_stats;
379#[repr(C)]
380#[derive(Debug, Copy, Clone)]
381pub struct vpx_rc_firstpass_stats {
382    pub frame_stats: *mut vpx_rc_frame_stats_t,
383    pub num_frames: ::std::os::raw::c_int,
384}
385pub type vpx_rc_firstpass_stats_t = vpx_rc_firstpass_stats;
386#[repr(C)]
387#[derive(Debug, Copy, Clone)]
388pub struct vpx_rc_config {
389    pub frame_width: ::std::os::raw::c_int,
390    pub frame_height: ::std::os::raw::c_int,
391    pub show_frame_count: ::std::os::raw::c_int,
392    pub max_gf_interval: ::std::os::raw::c_int,
393    pub min_gf_interval: ::std::os::raw::c_int,
394    pub target_bitrate_kbps: ::std::os::raw::c_int,
395    pub frame_rate_num: ::std::os::raw::c_int,
396    pub frame_rate_den: ::std::os::raw::c_int,
397    pub rc_mode: vpx_ext_rc_mode_t,
398    pub overshoot_percent: ::std::os::raw::c_int,
399    pub undershoot_percent: ::std::os::raw::c_int,
400    pub min_base_q_index: ::std::os::raw::c_int,
401    pub max_base_q_index: ::std::os::raw::c_int,
402    pub base_qp: ::std::os::raw::c_int,
403}
404pub type vpx_rc_config_t = vpx_rc_config;
405#[repr(C)]
406#[derive(Debug, Copy, Clone)]
407pub struct vpx_rc_ref_frame {
408    pub index: [::std::os::raw::c_int; 4usize],
409    pub name: [vpx_rc_ref_name_t; 4usize],
410}
411pub type vpx_rc_ref_frame_t = vpx_rc_ref_frame;
412#[repr(C)]
413#[derive(Debug, Copy, Clone)]
414pub struct vpx_rc_gop_decision {
415    pub gop_coding_frames: ::std::os::raw::c_int,
416    pub use_alt_ref: ::std::os::raw::c_int,
417    pub use_key_frame: ::std::os::raw::c_int,
418    pub update_type: [vpx_rc_frame_update_type_t; 252usize],
419    pub update_ref_index: [::std::os::raw::c_int; 252usize],
420    pub ref_frame_list: [vpx_rc_ref_frame_t; 252usize],
421}
422pub type vpx_rc_gop_decision_t = vpx_rc_gop_decision;
423#[repr(C)]
424#[derive(Debug, Copy, Clone)]
425pub struct vpx_rc_key_frame_decision {
426    pub key_frame_show_index: ::std::os::raw::c_int,
427    pub key_frame_group_size: ::std::os::raw::c_int,
428}
429pub type vpx_rc_key_frame_decision_t = vpx_rc_key_frame_decision;
430pub type vpx_rc_create_model_cb_fn_t = ::std::option::Option<
431    unsafe extern "C" fn(
432        priv_: *mut ::std::os::raw::c_void,
433        ratectrl_config: *const vpx_rc_config_t,
434        rate_ctrl_model_ptr: *mut vpx_rc_model_t,
435    ) -> vpx_rc_status_t,
436>;
437pub type vpx_rc_send_firstpass_stats_cb_fn_t = ::std::option::Option<
438    unsafe extern "C" fn(rate_ctrl_model: vpx_rc_model_t, first_pass_stats: *const vpx_rc_firstpass_stats_t) -> vpx_rc_status_t,
439>;
440pub type vpx_rc_send_tpl_gop_stats_cb_fn_t =
441    ::std::option::Option<unsafe extern "C" fn(rate_ctrl_model: vpx_rc_model_t, tpl_gop_stats: *const VpxTplGopStats) -> vpx_rc_status_t>;
442pub type vpx_rc_get_encodeframe_decision_cb_fn_t = ::std::option::Option<
443    unsafe extern "C" fn(
444        rate_ctrl_model: vpx_rc_model_t,
445        frame_gop_index: ::std::os::raw::c_int,
446        frame_decision: *mut vpx_rc_encodeframe_decision_t,
447    ) -> vpx_rc_status_t,
448>;
449pub type vpx_rc_update_encodeframe_result_cb_fn_t = ::std::option::Option<
450    unsafe extern "C" fn(rate_ctrl_model: vpx_rc_model_t, encode_frame_result: *const vpx_rc_encodeframe_result_t) -> vpx_rc_status_t,
451>;
452pub type vpx_rc_get_key_frame_decision_cb_fn_t = ::std::option::Option<
453    unsafe extern "C" fn(rate_ctrl_model: vpx_rc_model_t, key_frame_decision: *mut vpx_rc_key_frame_decision_t) -> vpx_rc_status_t,
454>;
455pub type vpx_rc_get_gop_decision_cb_fn_t =
456    ::std::option::Option<unsafe extern "C" fn(rate_ctrl_model: vpx_rc_model_t, gop_decision: *mut vpx_rc_gop_decision_t) -> vpx_rc_status_t>;
457pub type vpx_rc_get_frame_rdmult_cb_fn_t = ::std::option::Option<
458    unsafe extern "C" fn(
459        rate_ctrl_model: vpx_rc_model_t,
460        frame_info: *const vpx_rc_encodeframe_info_t,
461        rdmult: *mut ::std::os::raw::c_int,
462    ) -> vpx_rc_status_t,
463>;
464pub type vpx_rc_delete_model_cb_fn_t = ::std::option::Option<unsafe extern "C" fn(rate_ctrl_model: vpx_rc_model_t) -> vpx_rc_status_t>;
465#[repr(C)]
466#[derive(Debug, Copy, Clone)]
467pub struct vpx_rc_funcs {
468    pub rc_type: vpx_rc_type_t,
469    pub create_model: vpx_rc_create_model_cb_fn_t,
470    pub send_firstpass_stats: vpx_rc_send_firstpass_stats_cb_fn_t,
471    pub send_tpl_gop_stats: vpx_rc_send_tpl_gop_stats_cb_fn_t,
472    pub get_encodeframe_decision: vpx_rc_get_encodeframe_decision_cb_fn_t,
473    pub update_encodeframe_result: vpx_rc_update_encodeframe_result_cb_fn_t,
474    pub get_key_frame_decision: vpx_rc_get_key_frame_decision_cb_fn_t,
475    pub get_gop_decision: vpx_rc_get_gop_decision_cb_fn_t,
476    pub get_frame_rdmult: vpx_rc_get_frame_rdmult_cb_fn_t,
477    pub delete_model: vpx_rc_delete_model_cb_fn_t,
478    pub rate_ctrl_log_path: *const ::std::os::raw::c_char,
479    pub priv_: *mut ::std::os::raw::c_void,
480}
481pub type vpx_rc_funcs_t = vpx_rc_funcs;
482#[repr(C)]
483#[derive(Debug, Copy, Clone)]
484pub struct vpx_fixed_buf {
485    pub buf: *mut ::std::os::raw::c_void,
486    pub sz: usize,
487}
488pub type vpx_fixed_buf_t = vpx_fixed_buf;
489pub type vpx_codec_pts_t = i64;
490pub type vpx_codec_frame_flags_t = u32;
491pub type vpx_codec_er_flags_t = u32;
492#[repr(u32)]
493#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
494pub enum vpx_codec_cx_pkt_kind {
495    VPX_CODEC_CX_FRAME_PKT = 0,
496    VPX_CODEC_STATS_PKT = 1,
497    VPX_CODEC_FPMB_STATS_PKT = 2,
498    VPX_CODEC_PSNR_PKT = 3,
499    VPX_CODEC_CUSTOM_PKT = 256,
500}
501#[repr(C)]
502#[derive(Copy, Clone)]
503pub struct vpx_codec_cx_pkt {
504    pub kind: vpx_codec_cx_pkt_kind,
505    pub data: vpx_codec_cx_pkt__bindgen_ty_1,
506}
507#[repr(C)]
508#[derive(Copy, Clone)]
509pub union vpx_codec_cx_pkt__bindgen_ty_1 {
510    pub frame: vpx_codec_cx_pkt__bindgen_ty_1__bindgen_ty_1,
511    pub twopass_stats: vpx_fixed_buf_t,
512    pub firstpass_mb_stats: vpx_fixed_buf_t,
513    pub psnr: vpx_codec_cx_pkt__bindgen_ty_1_vpx_psnr_pkt,
514    pub raw: vpx_fixed_buf_t,
515    pub pad: [::std::os::raw::c_char; 124usize],
516}
517#[repr(C)]
518#[derive(Debug, Copy, Clone)]
519pub struct vpx_codec_cx_pkt__bindgen_ty_1__bindgen_ty_1 {
520    pub buf: *mut ::std::os::raw::c_void,
521    pub sz: usize,
522    pub pts: vpx_codec_pts_t,
523    pub duration: ::std::os::raw::c_ulong,
524    pub flags: vpx_codec_frame_flags_t,
525    pub partition_id: ::std::os::raw::c_int,
526    pub width: [::std::os::raw::c_uint; 5usize],
527    pub height: [::std::os::raw::c_uint; 5usize],
528    pub spatial_layer_encoded: [u8; 5usize],
529}
530#[repr(C)]
531#[derive(Debug, Copy, Clone)]
532pub struct vpx_codec_cx_pkt__bindgen_ty_1_vpx_psnr_pkt {
533    pub samples: [::std::os::raw::c_uint; 4usize],
534    pub sse: [u64; 4usize],
535    pub psnr: [f64; 4usize],
536}
537pub type vpx_codec_cx_pkt_t = vpx_codec_cx_pkt;
538pub type vpx_codec_enc_output_cx_pkt_cb_fn_t =
539    ::std::option::Option<unsafe extern "C" fn(pkt: *mut vpx_codec_cx_pkt_t, user_data: *mut ::std::os::raw::c_void)>;
540#[repr(C)]
541#[derive(Debug, Copy, Clone)]
542pub struct vpx_codec_enc_output_cx_cb_pair {
543    pub output_cx_pkt: vpx_codec_enc_output_cx_pkt_cb_fn_t,
544    pub user_priv: *mut ::std::os::raw::c_void,
545}
546pub type vpx_codec_priv_output_cx_pkt_cb_pair_t = vpx_codec_enc_output_cx_cb_pair;
547#[repr(C)]
548#[derive(Debug, Copy, Clone)]
549pub struct vpx_rational {
550    pub num: ::std::os::raw::c_int,
551    pub den: ::std::os::raw::c_int,
552}
553pub type vpx_rational_t = vpx_rational;
554#[repr(u32)]
555#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
556pub enum vpx_enc_pass {
557    VPX_RC_ONE_PASS = 0,
558    VPX_RC_FIRST_PASS = 1,
559    VPX_RC_LAST_PASS = 2,
560}
561#[repr(u32)]
562#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
563pub enum vpx_rc_mode {
564    VPX_VBR = 0,
565    VPX_CBR = 1,
566    VPX_CQ = 2,
567    VPX_Q = 3,
568}
569impl vpx_kf_mode {
570    pub const VPX_KF_DISABLED: vpx_kf_mode = vpx_kf_mode::VPX_KF_FIXED;
571}
572#[repr(u32)]
573#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
574pub enum vpx_kf_mode {
575    VPX_KF_FIXED = 0,
576    VPX_KF_AUTO = 1,
577}
578pub type vpx_enc_frame_flags_t = ::std::os::raw::c_long;
579#[repr(C)]
580#[derive(Debug, Copy, Clone)]
581pub struct vpx_codec_enc_cfg {
582    pub g_usage: ::std::os::raw::c_uint,
583    pub g_threads: ::std::os::raw::c_uint,
584    pub g_profile: ::std::os::raw::c_uint,
585    pub g_w: ::std::os::raw::c_uint,
586    pub g_h: ::std::os::raw::c_uint,
587    pub g_bit_depth: vpx_bit_depth_t,
588    pub g_input_bit_depth: ::std::os::raw::c_uint,
589    pub g_timebase: vpx_rational,
590    pub g_error_resilient: vpx_codec_er_flags_t,
591    pub g_pass: vpx_enc_pass,
592    pub g_lag_in_frames: ::std::os::raw::c_uint,
593    pub rc_dropframe_thresh: ::std::os::raw::c_uint,
594    pub rc_resize_allowed: ::std::os::raw::c_uint,
595    pub rc_scaled_width: ::std::os::raw::c_uint,
596    pub rc_scaled_height: ::std::os::raw::c_uint,
597    pub rc_resize_up_thresh: ::std::os::raw::c_uint,
598    pub rc_resize_down_thresh: ::std::os::raw::c_uint,
599    pub rc_end_usage: vpx_rc_mode,
600    pub rc_twopass_stats_in: vpx_fixed_buf_t,
601    pub rc_firstpass_mb_stats_in: vpx_fixed_buf_t,
602    pub rc_target_bitrate: ::std::os::raw::c_uint,
603    pub rc_min_quantizer: ::std::os::raw::c_uint,
604    pub rc_max_quantizer: ::std::os::raw::c_uint,
605    pub rc_undershoot_pct: ::std::os::raw::c_uint,
606    pub rc_overshoot_pct: ::std::os::raw::c_uint,
607    pub rc_buf_sz: ::std::os::raw::c_uint,
608    pub rc_buf_initial_sz: ::std::os::raw::c_uint,
609    pub rc_buf_optimal_sz: ::std::os::raw::c_uint,
610    pub rc_2pass_vbr_bias_pct: ::std::os::raw::c_uint,
611    pub rc_2pass_vbr_minsection_pct: ::std::os::raw::c_uint,
612    pub rc_2pass_vbr_maxsection_pct: ::std::os::raw::c_uint,
613    pub rc_2pass_vbr_corpus_complexity: ::std::os::raw::c_uint,
614    pub kf_mode: vpx_kf_mode,
615    pub kf_min_dist: ::std::os::raw::c_uint,
616    pub kf_max_dist: ::std::os::raw::c_uint,
617    pub ss_number_layers: ::std::os::raw::c_uint,
618    pub ss_enable_auto_alt_ref: [::std::os::raw::c_int; 5usize],
619    pub ss_target_bitrate: [::std::os::raw::c_uint; 5usize],
620    pub ts_number_layers: ::std::os::raw::c_uint,
621    pub ts_target_bitrate: [::std::os::raw::c_uint; 5usize],
622    pub ts_rate_decimator: [::std::os::raw::c_uint; 5usize],
623    pub ts_periodicity: ::std::os::raw::c_uint,
624    pub ts_layer_id: [::std::os::raw::c_uint; 16usize],
625    pub layer_target_bitrate: [::std::os::raw::c_uint; 12usize],
626    pub temporal_layering_mode: ::std::os::raw::c_int,
627    pub use_vizier_rc_params: ::std::os::raw::c_int,
628    pub active_wq_factor: vpx_rational_t,
629    pub err_per_mb_factor: vpx_rational_t,
630    pub sr_default_decay_limit: vpx_rational_t,
631    pub sr_diff_factor: vpx_rational_t,
632    pub kf_err_per_mb_factor: vpx_rational_t,
633    pub kf_frame_min_boost_factor: vpx_rational_t,
634    pub kf_frame_max_boost_first_factor: vpx_rational_t,
635    pub kf_frame_max_boost_subs_factor: vpx_rational_t,
636    pub kf_max_total_boost_factor: vpx_rational_t,
637    pub gf_max_total_boost_factor: vpx_rational_t,
638    pub gf_frame_max_boost_factor: vpx_rational_t,
639    pub zm_factor: vpx_rational_t,
640    pub rd_mult_inter_qp_fac: vpx_rational_t,
641    pub rd_mult_arf_qp_fac: vpx_rational_t,
642    pub rd_mult_key_qp_fac: vpx_rational_t,
643}
644pub type vpx_codec_enc_cfg_t = vpx_codec_enc_cfg;
645#[repr(C)]
646#[derive(Debug, Copy, Clone)]
647pub struct vpx_svc_parameters {
648    pub max_quantizers: [::std::os::raw::c_int; 12usize],
649    pub min_quantizers: [::std::os::raw::c_int; 12usize],
650    pub scaling_factor_num: [::std::os::raw::c_int; 12usize],
651    pub scaling_factor_den: [::std::os::raw::c_int; 12usize],
652    pub speed_per_layer: [::std::os::raw::c_int; 12usize],
653    pub temporal_layering_mode: ::std::os::raw::c_int,
654    pub loopfilter_ctrl: [::std::os::raw::c_int; 12usize],
655}
656pub type vpx_svc_extra_cfg_t = vpx_svc_parameters;
657pub type vpx_enc_deadline_t = ::std::os::raw::c_ulong;
658#[repr(u32)]
659#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
660pub enum vp8e_enc_control_id {
661    VP8E_SET_ROI_MAP = 8,
662    VP8E_SET_ACTIVEMAP = 9,
663    VP8E_SET_SCALEMODE = 11,
664    VP8E_SET_CPUUSED = 13,
665    VP8E_SET_ENABLEAUTOALTREF = 14,
666    VP8E_SET_NOISE_SENSITIVITY = 15,
667    VP8E_SET_SHARPNESS = 16,
668    VP8E_SET_STATIC_THRESHOLD = 17,
669    VP8E_SET_TOKEN_PARTITIONS = 18,
670    VP8E_GET_LAST_QUANTIZER = 19,
671    VP8E_GET_LAST_QUANTIZER_64 = 20,
672    VP8E_SET_ARNR_MAXFRAMES = 21,
673    VP8E_SET_ARNR_STRENGTH = 22,
674    VP8E_SET_ARNR_TYPE = 23,
675    VP8E_SET_TUNING = 24,
676    VP8E_SET_CQ_LEVEL = 25,
677    VP8E_SET_MAX_INTRA_BITRATE_PCT = 26,
678    VP8E_SET_FRAME_FLAGS = 27,
679    VP9E_SET_MAX_INTER_BITRATE_PCT = 28,
680    VP9E_SET_GF_CBR_BOOST_PCT = 29,
681    VP8E_SET_TEMPORAL_LAYER_ID = 30,
682    VP8E_SET_SCREEN_CONTENT_MODE = 31,
683    VP9E_SET_LOSSLESS = 32,
684    VP9E_SET_TILE_COLUMNS = 33,
685    VP9E_SET_TILE_ROWS = 34,
686    VP9E_SET_FRAME_PARALLEL_DECODING = 35,
687    VP9E_SET_AQ_MODE = 36,
688    VP9E_SET_FRAME_PERIODIC_BOOST = 37,
689    VP9E_SET_NOISE_SENSITIVITY = 38,
690    VP9E_SET_SVC = 39,
691    VP9E_SET_ROI_MAP = 40,
692    VP9E_SET_SVC_PARAMETERS = 41,
693    VP9E_SET_SVC_LAYER_ID = 42,
694    VP9E_SET_TUNE_CONTENT = 43,
695    VP9E_GET_SVC_LAYER_ID = 44,
696    VP9E_REGISTER_CX_CALLBACK = 45,
697    VP9E_SET_COLOR_SPACE = 46,
698    VP9E_SET_MIN_GF_INTERVAL = 48,
699    VP9E_SET_MAX_GF_INTERVAL = 49,
700    VP9E_GET_ACTIVEMAP = 50,
701    VP9E_SET_COLOR_RANGE = 51,
702    VP9E_SET_SVC_REF_FRAME_CONFIG = 52,
703    VP9E_SET_RENDER_SIZE = 53,
704    VP9E_SET_TARGET_LEVEL = 54,
705    VP9E_SET_ROW_MT = 55,
706    VP9E_GET_LEVEL = 56,
707    VP9E_SET_ALT_REF_AQ = 57,
708    VP8E_SET_GF_CBR_BOOST_PCT = 58,
709    VP9E_ENABLE_MOTION_VECTOR_UNIT_TEST = 59,
710    VP9E_SET_SVC_INTER_LAYER_PRED = 60,
711    VP9E_SET_SVC_FRAME_DROP_LAYER = 61,
712    VP9E_GET_SVC_REF_FRAME_CONFIG = 62,
713    VP9E_SET_SVC_GF_TEMPORAL_REF = 63,
714    VP9E_SET_SVC_SPATIAL_LAYER_SYNC = 64,
715    VP9E_SET_TPL = 65,
716    VP9E_SET_POSTENCODE_DROP = 66,
717    VP9E_SET_DELTA_Q_UV = 67,
718    VP9E_SET_DISABLE_OVERSHOOT_MAXQ_CBR = 68,
719    VP9E_SET_DISABLE_LOOPFILTER = 69,
720    VP9E_SET_EXTERNAL_RATE_CONTROL = 70,
721    VP9E_SET_RTC_EXTERNAL_RATECTRL = 71,
722    VP9E_GET_LOOPFILTER_LEVEL = 72,
723    VP9E_GET_LAST_QUANTIZER_SVC_LAYERS = 73,
724    VP8E_SET_RTC_EXTERNAL_RATECTRL = 74,
725    VP9E_SET_QUANTIZER_ONE_PASS = 75,
726    VP9E_SET_KEY_FRAME_FILTERING = 76,
727}
728#[repr(u32)]
729#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
730pub enum vpx_scaling_mode_1d {
731    VP8E_NORMAL = 0,
732    VP8E_FOURFIVE = 1,
733    VP8E_THREEFIVE = 2,
734    VP8E_ONETWO = 3,
735}
736pub use self::vpx_scaling_mode_1d as VPX_SCALING_MODE;
737#[repr(u32)]
738#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
739pub enum vp9e_temporal_layering_mode {
740    VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING = 0,
741    VP9E_TEMPORAL_LAYERING_MODE_BYPASS = 1,
742    VP9E_TEMPORAL_LAYERING_MODE_0101 = 2,
743    VP9E_TEMPORAL_LAYERING_MODE_0212 = 3,
744}
745pub use self::vp9e_temporal_layering_mode as VP9E_TEMPORAL_LAYERING_MODE;
746#[repr(C)]
747#[derive(Debug, Copy, Clone)]
748pub struct vpx_roi_map {
749    pub enabled: u8,
750    pub roi_map: *mut ::std::os::raw::c_uchar,
751    pub rows: ::std::os::raw::c_uint,
752    pub cols: ::std::os::raw::c_uint,
753    pub delta_q: [::std::os::raw::c_int; 8usize],
754    pub delta_lf: [::std::os::raw::c_int; 8usize],
755    pub skip: [::std::os::raw::c_int; 8usize],
756    pub ref_frame: [::std::os::raw::c_int; 8usize],
757    pub static_threshold: [::std::os::raw::c_uint; 4usize],
758}
759pub type vpx_roi_map_t = vpx_roi_map;
760#[repr(C)]
761#[derive(Debug, Copy, Clone)]
762pub struct vpx_active_map {
763    pub active_map: *mut ::std::os::raw::c_uchar,
764    pub rows: ::std::os::raw::c_uint,
765    pub cols: ::std::os::raw::c_uint,
766}
767pub type vpx_active_map_t = vpx_active_map;
768#[repr(C)]
769#[derive(Debug, Copy, Clone)]
770pub struct vpx_scaling_mode {
771    pub h_scaling_mode: VPX_SCALING_MODE,
772    pub v_scaling_mode: VPX_SCALING_MODE,
773}
774pub type vpx_scaling_mode_t = vpx_scaling_mode;
775#[repr(u32)]
776#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
777pub enum vp8e_token_partitions {
778    VP8_ONE_TOKENPARTITION = 0,
779    VP8_TWO_TOKENPARTITION = 1,
780    VP8_FOUR_TOKENPARTITION = 2,
781    VP8_EIGHT_TOKENPARTITION = 3,
782}
783#[repr(u32)]
784#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
785pub enum vp9e_tune_content {
786    VP9E_CONTENT_DEFAULT = 0,
787    VP9E_CONTENT_SCREEN = 1,
788    VP9E_CONTENT_FILM = 2,
789    VP9E_CONTENT_INVALID = 3,
790}
791#[repr(u32)]
792#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
793pub enum vp8e_tuning {
794    VP8_TUNE_PSNR = 0,
795    VP8_TUNE_SSIM = 1,
796}
797#[repr(C)]
798#[derive(Debug, Copy, Clone)]
799pub struct vpx_svc_layer_id {
800    pub spatial_layer_id: ::std::os::raw::c_int,
801    pub temporal_layer_id: ::std::os::raw::c_int,
802    pub temporal_layer_id_per_spatial: [::std::os::raw::c_int; 5usize],
803}
804pub type vpx_svc_layer_id_t = vpx_svc_layer_id;
805#[repr(C)]
806#[derive(Debug, Copy, Clone)]
807pub struct vpx_svc_ref_frame_config {
808    pub lst_fb_idx: [::std::os::raw::c_int; 5usize],
809    pub gld_fb_idx: [::std::os::raw::c_int; 5usize],
810    pub alt_fb_idx: [::std::os::raw::c_int; 5usize],
811    pub update_buffer_slot: [::std::os::raw::c_int; 5usize],
812    pub update_last: [::std::os::raw::c_int; 5usize],
813    pub update_golden: [::std::os::raw::c_int; 5usize],
814    pub update_alt_ref: [::std::os::raw::c_int; 5usize],
815    pub reference_last: [::std::os::raw::c_int; 5usize],
816    pub reference_golden: [::std::os::raw::c_int; 5usize],
817    pub reference_alt_ref: [::std::os::raw::c_int; 5usize],
818    pub duration: [i64; 5usize],
819}
820pub type vpx_svc_ref_frame_config_t = vpx_svc_ref_frame_config;
821#[repr(u32)]
822#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
823pub enum SVC_LAYER_DROP_MODE {
824    CONSTRAINED_LAYER_DROP = 0,
825    LAYER_DROP = 1,
826    FULL_SUPERFRAME_DROP = 2,
827    CONSTRAINED_FROM_ABOVE_DROP = 3,
828}
829#[repr(C)]
830#[derive(Debug, Copy, Clone)]
831pub struct vpx_svc_frame_drop {
832    pub framedrop_thresh: [::std::os::raw::c_int; 5usize],
833    pub framedrop_mode: SVC_LAYER_DROP_MODE,
834    pub max_consec_drop: ::std::os::raw::c_int,
835}
836pub type vpx_svc_frame_drop_t = vpx_svc_frame_drop;
837#[repr(C)]
838#[derive(Debug, Copy, Clone)]
839pub struct vpx_svc_spatial_layer_sync {
840    pub spatial_layer_sync: [::std::os::raw::c_int; 5usize],
841    pub base_layer_intra_only: ::std::os::raw::c_int,
842}
843pub type vpx_svc_spatial_layer_sync_t = vpx_svc_spatial_layer_sync;
844impl vp8_dec_control_id {
845    pub const VP8D_SET_DECRYPTOR: vp8_dec_control_id = vp8_dec_control_id::VPXD_SET_DECRYPTOR;
846}
847#[repr(u32)]
848#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
849pub enum vp8_dec_control_id {
850    VP8D_GET_LAST_REF_UPDATES = 256,
851    VP8D_GET_FRAME_CORRUPTED = 257,
852    VP8D_GET_LAST_REF_USED = 258,
853    VPXD_SET_DECRYPTOR = 259,
854    VP9D_GET_FRAME_SIZE = 260,
855    VP9D_GET_DISPLAY_SIZE = 261,
856    VP9D_GET_BIT_DEPTH = 262,
857    VP9_SET_BYTE_ALIGNMENT = 263,
858    VP9_INVERT_TILE_DECODE_ORDER = 264,
859    VP9_SET_SKIP_LOOP_FILTER = 265,
860    VP9_DECODE_SVC_SPATIAL_LAYER = 266,
861    VPXD_GET_LAST_QUANTIZER = 267,
862    VP9D_SET_ROW_MT = 268,
863    VP9D_SET_LOOP_FILTER_OPT = 269,
864    VP8_DECODER_CTRL_ID_MAX = 270,
865}
866pub type vpx_decrypt_cb = ::std::option::Option<
867    unsafe extern "C" fn(
868        decrypt_state: *mut ::std::os::raw::c_void,
869        input: *const ::std::os::raw::c_uchar,
870        output: *mut ::std::os::raw::c_uchar,
871        count: ::std::os::raw::c_int,
872    ),
873>;
874#[repr(C)]
875#[derive(Debug, Copy, Clone)]
876pub struct vpx_decrypt_init {
877    pub decrypt_cb: vpx_decrypt_cb,
878    pub decrypt_state: *mut ::std::os::raw::c_void,
879}
880#[repr(C)]
881#[derive(Debug, Copy, Clone)]
882pub struct vpx_codec_frame_buffer {
883    pub data: *mut u8,
884    pub size: usize,
885    pub priv_: *mut ::std::os::raw::c_void,
886}
887pub type vpx_codec_frame_buffer_t = vpx_codec_frame_buffer;
888pub type vpx_get_frame_buffer_cb_fn_t = ::std::option::Option<
889    unsafe extern "C" fn(priv_: *mut ::std::os::raw::c_void, min_size: usize, fb: *mut vpx_codec_frame_buffer_t) -> ::std::os::raw::c_int,
890>;
891pub type vpx_release_frame_buffer_cb_fn_t =
892    ::std::option::Option<unsafe extern "C" fn(priv_: *mut ::std::os::raw::c_void, fb: *mut vpx_codec_frame_buffer_t) -> ::std::os::raw::c_int>;
893#[repr(C)]
894#[derive(Debug, Copy, Clone)]
895pub struct vpx_codec_stream_info {
896    pub sz: ::std::os::raw::c_uint,
897    pub w: ::std::os::raw::c_uint,
898    pub h: ::std::os::raw::c_uint,
899    pub is_kf: ::std::os::raw::c_uint,
900}
901pub type vpx_codec_stream_info_t = vpx_codec_stream_info;
902#[repr(C)]
903#[derive(Debug, Copy, Clone)]
904pub struct vpx_codec_dec_cfg {
905    pub threads: ::std::os::raw::c_uint,
906    pub w: ::std::os::raw::c_uint,
907    pub h: ::std::os::raw::c_uint,
908}
909pub type vpx_codec_dec_cfg_t = vpx_codec_dec_cfg;
910pub type vpx_codec_put_frame_cb_fn_t = ::std::option::Option<unsafe extern "C" fn(user_priv: *mut ::std::os::raw::c_void, img: *const vpx_image_t)>;
911pub type vpx_codec_put_slice_cb_fn_t = ::std::option::Option<
912    unsafe extern "C" fn(
913        user_priv: *mut ::std::os::raw::c_void,
914        img: *const vpx_image_t,
915        valid: *const vpx_image_rect_t,
916        update: *const vpx_image_rect_t,
917    ),
918>;
919unsafe extern "C" {
920    pub fn vpx_img_alloc(
921        img: *mut vpx_image_t,
922        fmt: vpx_img_fmt_t,
923        d_w: ::std::os::raw::c_uint,
924        d_h: ::std::os::raw::c_uint,
925        align: ::std::os::raw::c_uint,
926    ) -> *mut vpx_image_t;
927    pub fn vpx_img_wrap(
928        img: *mut vpx_image_t,
929        fmt: vpx_img_fmt_t,
930        d_w: ::std::os::raw::c_uint,
931        d_h: ::std::os::raw::c_uint,
932        stride_align: ::std::os::raw::c_uint,
933        img_data: *mut ::std::os::raw::c_uchar,
934    ) -> *mut vpx_image_t;
935    pub fn vpx_img_set_rect(
936        img: *mut vpx_image_t,
937        x: ::std::os::raw::c_uint,
938        y: ::std::os::raw::c_uint,
939        w: ::std::os::raw::c_uint,
940        h: ::std::os::raw::c_uint,
941    ) -> ::std::os::raw::c_int;
942    pub fn vpx_img_flip(img: *mut vpx_image_t);
943    pub fn vpx_img_free(img: *mut vpx_image_t);
944    pub fn vpx_codec_version() -> ::std::os::raw::c_int;
945    pub fn vpx_codec_version_str() -> *const ::std::os::raw::c_char;
946    pub fn vpx_codec_version_extra_str() -> *const ::std::os::raw::c_char;
947    pub fn vpx_codec_build_config() -> *const ::std::os::raw::c_char;
948    pub fn vpx_codec_iface_name(iface: *const vpx_codec_iface) -> *const ::std::os::raw::c_char;
949    pub fn vpx_codec_err_to_string(err: vpx_codec_err_t) -> *const ::std::os::raw::c_char;
950    pub fn vpx_codec_error(ctx: *const vpx_codec_ctx_t) -> *const ::std::os::raw::c_char;
951    pub fn vpx_codec_error_detail(ctx: *const vpx_codec_ctx_t) -> *const ::std::os::raw::c_char;
952    pub fn vpx_codec_destroy(ctx: *mut vpx_codec_ctx_t) -> vpx_codec_err_t;
953    pub fn vpx_codec_get_caps(iface: *const vpx_codec_iface) -> vpx_codec_caps_t;
954    pub fn vpx_codec_control_(ctx: *mut vpx_codec_ctx_t, ctrl_id: ::std::os::raw::c_int, ...) -> vpx_codec_err_t;
955    pub fn vpx_codec_enc_init_ver(
956        ctx: *mut vpx_codec_ctx_t,
957        iface: *const vpx_codec_iface,
958        cfg: *const vpx_codec_enc_cfg_t,
959        flags: vpx_codec_flags_t,
960        ver: ::std::os::raw::c_int,
961    ) -> vpx_codec_err_t;
962    pub fn vpx_codec_enc_init_multi_ver(
963        ctx: *mut vpx_codec_ctx_t,
964        iface: *const vpx_codec_iface,
965        cfg: *mut vpx_codec_enc_cfg_t,
966        num_enc: ::std::os::raw::c_int,
967        flags: vpx_codec_flags_t,
968        dsf: *mut vpx_rational_t,
969        ver: ::std::os::raw::c_int,
970    ) -> vpx_codec_err_t;
971    pub fn vpx_codec_enc_config_default(
972        iface: *const vpx_codec_iface,
973        cfg: *mut vpx_codec_enc_cfg_t,
974        usage: ::std::os::raw::c_uint,
975    ) -> vpx_codec_err_t;
976    pub fn vpx_codec_enc_config_set(ctx: *mut vpx_codec_ctx_t, cfg: *const vpx_codec_enc_cfg_t) -> vpx_codec_err_t;
977    pub fn vpx_codec_get_global_headers(ctx: *mut vpx_codec_ctx_t) -> *mut vpx_fixed_buf_t;
978    pub fn vpx_codec_encode(
979        ctx: *mut vpx_codec_ctx_t,
980        img: *const vpx_image_t,
981        pts: vpx_codec_pts_t,
982        duration: ::std::os::raw::c_ulong,
983        flags: vpx_enc_frame_flags_t,
984        deadline: vpx_enc_deadline_t,
985    ) -> vpx_codec_err_t;
986    pub fn vpx_codec_set_cx_data_buf(
987        ctx: *mut vpx_codec_ctx_t,
988        buf: *const vpx_fixed_buf_t,
989        pad_before: ::std::os::raw::c_uint,
990        pad_after: ::std::os::raw::c_uint,
991    ) -> vpx_codec_err_t;
992    pub fn vpx_codec_get_cx_data(ctx: *mut vpx_codec_ctx_t, iter: *mut vpx_codec_iter_t) -> *const vpx_codec_cx_pkt_t;
993    pub fn vpx_codec_get_preview_frame(ctx: *mut vpx_codec_ctx_t) -> *const vpx_image_t;
994    pub fn vpx_codec_vp8_cx() -> *const vpx_codec_iface;
995    pub fn vpx_codec_vp9_cx() -> *const vpx_codec_iface;
996    pub fn vpx_codec_vp8_dx() -> *const vpx_codec_iface;
997    pub fn vpx_codec_vp9_dx() -> *const vpx_codec_iface;
998    pub fn vpx_codec_dec_init_ver(
999        ctx: *mut vpx_codec_ctx_t,
1000        iface: *const vpx_codec_iface,
1001        cfg: *const vpx_codec_dec_cfg_t,
1002        flags: vpx_codec_flags_t,
1003        ver: ::std::os::raw::c_int,
1004    ) -> vpx_codec_err_t;
1005    pub fn vpx_codec_peek_stream_info(
1006        iface: *const vpx_codec_iface,
1007        data: *const u8,
1008        data_sz: ::std::os::raw::c_uint,
1009        si: *mut vpx_codec_stream_info_t,
1010    ) -> vpx_codec_err_t;
1011    pub fn vpx_codec_get_stream_info(ctx: *mut vpx_codec_ctx_t, si: *mut vpx_codec_stream_info_t) -> vpx_codec_err_t;
1012    pub fn vpx_codec_decode(
1013        ctx: *mut vpx_codec_ctx_t,
1014        data: *const u8,
1015        data_sz: ::std::os::raw::c_uint,
1016        user_priv: *mut ::std::os::raw::c_void,
1017        deadline: ::std::os::raw::c_long,
1018    ) -> vpx_codec_err_t;
1019    pub fn vpx_codec_get_frame(ctx: *mut vpx_codec_ctx_t, iter: *mut vpx_codec_iter_t) -> *mut vpx_image_t;
1020    pub fn vpx_codec_register_put_frame_cb(
1021        ctx: *mut vpx_codec_ctx_t,
1022        cb: vpx_codec_put_frame_cb_fn_t,
1023        user_priv: *mut ::std::os::raw::c_void,
1024    ) -> vpx_codec_err_t;
1025    pub fn vpx_codec_register_put_slice_cb(
1026        ctx: *mut vpx_codec_ctx_t,
1027        cb: vpx_codec_put_slice_cb_fn_t,
1028        user_priv: *mut ::std::os::raw::c_void,
1029    ) -> vpx_codec_err_t;
1030    pub fn vpx_codec_set_frame_buffer_functions(
1031        ctx: *mut vpx_codec_ctx_t,
1032        cb_get: vpx_get_frame_buffer_cb_fn_t,
1033        cb_release: vpx_release_frame_buffer_cb_fn_t,
1034        cb_priv: *mut ::std::os::raw::c_void,
1035    ) -> vpx_codec_err_t;
1036}