Struct dav1d::Picture

source ·
pub struct Picture { /* private fields */ }
Expand description

A decoded frame.

Implementations§

source§

impl Picture

source

pub fn stride(&self, component: PlanarImageComponent) -> u32

Stride in pixels of the component for the decoded frame.

source

pub fn plane_data_ptr(&self, component: PlanarImageComponent) -> *mut c_void

Raw pointer to the data of the component for the decoded frame.

source

pub fn plane_data_geometry(&self, component: PlanarImageComponent) -> (u32, u32)

Plane geometry of the component for the decoded frame.

This returns the stride and height.

source

pub fn plane(&self, component: PlanarImageComponent) -> Plane

Plane data of the component for the decoded frame.

source

pub fn bit_depth(&self) -> usize

Bit depth of the plane data.

This returns 8 or 16 for the underlying integer type used for the plane data.

Check Picture::bits_per_component for the number of bits that are used.

source

pub fn bits_per_component(&self) -> Option<BitsPerComponent>

Bits used per component of the plane data.

Check Picture::bit_depth for the number of storage bits.

source

pub fn width(&self) -> u32

Width of the frame.

source

pub fn height(&self) -> u32

Height of the frame.

source

pub fn pixel_layout(&self) -> PixelLayout

Pixel layout of the frame.

source

pub fn timestamp(&self) -> Option<i64>

Timestamp of the frame.

This is the same timestamp as the one provided to Decoder::send_data.

source

pub fn duration(&self) -> i64

Duration of the frame.

This is the same duration as the one provided to Decoder::send_data or 0 if none was provided.

source

pub fn offset(&self) -> i64

Offset of the frame.

This is the same offset as the one provided to Decoder::send_data or -1 if none was provided.

source

pub fn color_primaries(&self) -> ColorPrimaries

Chromaticity coordinates of the source colour primaries.

source

pub fn transfer_characteristic(&self) -> TransferCharacteristic

Transfer characteristics function.

source

pub fn matrix_coefficients(&self) -> MatrixCoefficients

Matrix coefficients used in deriving luma and chroma signals from the green, blue and red or X, Y and Z primaries.

source

pub fn color_range(&self) -> YUVRange

YUV color range.

source

pub fn chroma_location(&self) -> ChromaLocation

Sample position for subsampled chroma.

Trait Implementations§

source§

impl Clone for Picture

source§

fn clone(&self) -> Picture

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Picture

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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> 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,

§

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>,

§

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>,

§

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.