pub type VAMacroblockParameterBufferMPEG2 = _VAMacroblockParameterBufferMPEG2;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
-pub struct _VAPictureH264 {
+pub struct VAPictureH264 {
pub picture_id: VASurfaceID,
pub frame_idx: u32,
pub flags: u32,
pub BottomFieldOrderCnt: i32,
pub va_reserved: [u32; 4usize],
}
-pub type VAPictureH264 = _VAPictureH264;
+
+/// H.264 Picture Parameter Buffer
+///
+/// For each picture, and before any slice data, a single
+/// picture parameter buffer must be send.
#[repr(C)]
#[derive(Copy, Clone)]
-pub struct _VAPictureParameterBufferH264 {
+pub struct VAPictureParameterBufferH264 {
pub CurrPic: VAPictureH264,
pub ReferenceFrames: [VAPictureH264; 16usize],
pub picture_width_in_mbs_minus1: u16,
}
}
}
-impl Default for _VAPictureParameterBufferH264 {
+impl Default for VAPictureParameterBufferH264 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
}
}
}
-pub type VAPictureParameterBufferH264 = _VAPictureParameterBufferH264;
+/// H.264 Inverse Quantization Matrix Buffer
+///
+/// Fill scaling lists with the default value (16) if they are not available.
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
-pub struct _VAIQMatrixBufferH264 {
+pub struct VAIQMatrixBufferH264 {
pub ScalingList4x4: [[u8; 16usize]; 6usize],
pub ScalingList8x8: [[u8; 64usize]; 2usize],
pub va_reserved: [u32; 4usize],
}
-impl Default for _VAIQMatrixBufferH264 {
+impl Default for VAIQMatrixBufferH264 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
}
}
}
-pub type VAIQMatrixBufferH264 = _VAIQMatrixBufferH264;
+/// H.264 Slice Parameter Buffer
+///
+/// For each picture before each slice data buffer, a single
+/// slice parameter buffer must be send.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
-pub struct _VASliceParameterBufferH264 {
+pub struct VASliceParameterBufferH264 {
+ /// Number of bytes in the slice data buffer for this slice
pub slice_data_size: u32,
pub slice_data_offset: u32,
pub slice_data_flag: u32,
+ /// Bit offset from NAL Header Unit to the begining of slice_data().
+ ///
+ /// This bit offset is relative to and includes the NAL unit byte
+ /// and represents the number of bits parsed in the slice_header()
+ /// after the removal of any emulation prevention bytes in
+ /// there. However, the slice data buffer passed to the hardware is
+ /// the original bitstream, thus including any emulation prevention
+ /// bytes.
pub slice_data_bit_offset: u16,
pub first_mb_in_slice: u16,
pub slice_type: u8,
pub direct_spatial_mv_pred_flag: u8,
+ /// H264/AVC syntax element
+ ///
+ /// if num_ref_idx_active_override_flag equals 0, host decoder should
+ /// set its value to num_ref_idx_l0_default_active_minus1.
pub num_ref_idx_l0_active_minus1: u8,
+ /// H264/AVC syntax element
+ ///
+ /// if num_ref_idx_active_override_flag equals 0, host decoder should
+ /// set its value to num_ref_idx_l1_default_active_minus1.
pub num_ref_idx_l1_active_minus1: u8,
pub cabac_init_idc: u8,
pub slice_qp_delta: i8,
pub chroma_offset_l1: [[i16; 2usize]; 32usize],
pub va_reserved: [u32; 4usize],
}
-pub type VASliceParameterBufferH264 = _VASliceParameterBufferH264;
pub mod VAEncPictureType {
pub type Type = ::std::os::raw::c_uint;
pub const VAEncPictureTypeIntra: Type = 0;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
-pub struct _VAImageFormat {
+pub struct VAImageFormat {
pub fourcc: u32,
pub byte_order: u32,
pub bits_per_pixel: u32,
pub alpha_mask: u32,
pub va_reserved: [u32; 4usize],
}
-pub type VAImageFormat = _VAImageFormat;
pub type VAImageID = VAGenericID;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
-pub struct _VAImage {
+pub struct VAImage {
pub image_id: VAImageID,
pub format: VAImageFormat,
pub buf: VABufferID,
pub component_order: [i8; 4usize],
pub va_reserved: [u32; 4usize],
}
-pub type VAImage = _VAImage;
extern "C" {
pub fn vaMaxNumImageFormats(dpy: VADisplay) -> ::std::os::raw::c_int;
}