Skip to main content

_VAEncSequenceParameterBufferMPEG2

Struct _VAEncSequenceParameterBufferMPEG2 

Source
#[repr(C)]
pub struct _VAEncSequenceParameterBufferMPEG2 { pub intra_period: u32, pub ip_period: u32, pub picture_width: u16, pub picture_height: u16, pub bits_per_second: u32, pub frame_rate: f32, pub aspect_ratio_information: u16, pub vbv_buffer_size: u32, pub sequence_extension: _VAEncSequenceParameterBufferMPEG2__bindgen_ty_1, pub new_gop_header: u32, pub gop_header: _VAEncSequenceParameterBufferMPEG2__bindgen_ty_2, pub va_reserved: [u32; 4], }
Expand description

\brief Sequence parameter for MPEG-2 encoding

This structure holds information for \c sequence_header() and sequence_extension().

If packed sequence headers mode is used, i.e. if the encoding pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE flag, then the driver expects two more buffers to be provided to the same \c vaRenderPicture() as this buffer:

  • a #VAEncPackedHeaderParameterBuffer with type set to VAEncPackedHeaderType::VAEncPackedHeaderSequence ;
  • a #VAEncPackedHeaderDataBuffer which holds the actual packed header data.

Fields§

§intra_period: u32

\brief Period between I frames.

§ip_period: u32

\brief Period between I/P frames.

§picture_width: u16

\brief Picture width.

A 14bits unsigned inter, the lower 12bits is horizontal_size_value, and the upper 2bits is \c horizontal_size_extension

§picture_height: u16

\brief Picture height.

A 14bits unsigned inter, the lower 12bits is vertical_size_value, and the upper 2bits is vertical_size_size_extension

§bits_per_second: u32

\brief Initial bitrate set for this sequence in CBR or VBR modes.

This field represents the initial bitrate value for this sequence if CBR or VBR mode is used, i.e. if the encoder pipeline was created with a #VAConfigAttribRateControl attribute set to either \ref VA_RC_CBR or \ref VA_RC_VBR.

bits_per_second may be derived from bit_rate.

§frame_rate: f32

\brief Frame rate

Derived from frame_rate_value, frame_rate_extension_n and frame_rate_extension_d

§aspect_ratio_information: u16

\brief Same as the element in sequence_header()

§vbv_buffer_size: u32

\brief Define the size of VBV

§sequence_extension: _VAEncSequenceParameterBufferMPEG2__bindgen_ty_1§new_gop_header: u32

\brief Flag to indicate the following GOP header are being updated

§gop_header: _VAEncSequenceParameterBufferMPEG2__bindgen_ty_2§va_reserved: [u32; 4]

\brief Reserved bytes for future use, must be zero

Trait Implementations§

Source§

impl Clone for _VAEncSequenceParameterBufferMPEG2

Source§

fn clone(&self) -> _VAEncSequenceParameterBufferMPEG2

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for _VAEncSequenceParameterBufferMPEG2

Source§

impl Default for _VAEncSequenceParameterBufferMPEG2

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.