pub struct Ffv1Config {
pub version: Ffv1Version,
pub width: u32,
pub height: u32,
pub colorspace: Ffv1Colorspace,
pub chroma_type: Ffv1ChromaType,
pub bits_per_raw_sample: u8,
pub num_h_slices: u32,
pub num_v_slices: u32,
pub ec: bool,
pub state_transition_delta: Vec<i16>,
pub range_coder_mode: bool,
}Expand description
FFV1 configuration record.
Contains all parameters needed to initialize the encoder or decoder. In a container, this is stored as codec extradata (the “configuration record”).
Fields§
§version: Ffv1VersionFFV1 version.
width: u32Frame width in pixels.
height: u32Frame height in pixels.
colorspace: Ffv1ColorspaceColorspace.
chroma_type: Ffv1ChromaTypeChroma subsampling (only meaningful for YCbCr).
bits_per_raw_sample: u8Bits per raw sample (8, 10, 12, or 16).
num_h_slices: u32Number of horizontal slices.
num_v_slices: u32Number of vertical slices.
ec: boolError correction enabled (CRC32 per slice, v3+ only).
state_transition_delta: Vec<i16>Range coder state transition table index (0 = default).
range_coder_mode: boolWhether to use range coder (true) or Golomb-Rice (false). For v3 this is always true.
Implementations§
Source§impl Ffv1Config
impl Ffv1Config
Sourcepub fn num_slices(&self) -> u32
pub fn num_slices(&self) -> u32
Total number of slices.
Sourcepub fn max_sample_value(&self) -> i32
pub fn max_sample_value(&self) -> i32
Maximum sample value for the configured bit depth.
Sourcepub fn plane_count(&self) -> usize
pub fn plane_count(&self) -> usize
Number of planes for this configuration.
Sourcepub fn plane_dimensions(&self, plane_index: usize) -> (u32, u32)
pub fn plane_dimensions(&self, plane_index: usize) -> (u32, u32)
Get the dimensions for a given plane index.
Sourcepub fn validate(&self) -> CodecResult<()>
pub fn validate(&self) -> CodecResult<()>
Validate the configuration.
Trait Implementations§
Source§impl Clone for Ffv1Config
impl Clone for Ffv1Config
Source§fn clone(&self) -> Ffv1Config
fn clone(&self) -> Ffv1Config
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Ffv1Config
impl Debug for Ffv1Config
Auto Trait Implementations§
impl Freeze for Ffv1Config
impl RefUnwindSafe for Ffv1Config
impl Send for Ffv1Config
impl Sync for Ffv1Config
impl Unpin for Ffv1Config
impl UnsafeUnpin for Ffv1Config
impl UnwindSafe for Ffv1Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more