Struct openh264::formats::YUVSlices

source ·
pub struct YUVSlices<'a> { /* private fields */ }
Expand description

Convenience wrapper if you already have YUV-sliced data from some other place.

Implementations§

source§

impl<'a> YUVSlices<'a>

source

pub fn new( yuv: (&'a [u8], &'a [u8], &'a [u8]), dimensions: (usize, usize), strides: (usize, usize, usize) ) -> Self

Creates a new YUV slice.

Trait Implementations§

source§

impl<'a> YUVSource for YUVSlices<'a>

source§

fn dimensions(&self) -> (usize, usize)

Size of the image as (w, h).
source§

fn strides(&self) -> (usize, usize, usize)

YUV strides as (y, u, v). Read more
source§

fn y(&self) -> &[u8]

Y buffer, should be of size dimension.1 * strides.0.
source§

fn u(&self) -> &[u8]

U buffer, should be of size dimension.1 * strides.1.
source§

fn v(&self) -> &[u8]

V buffer, should be of size dimension.1 * strides.2.
source§

fn dimensions_i32(&self) -> (i32, i32)

Size of the image as (w, h).
source§

fn strides_i32(&self) -> (i32, i32, i32)

YUV strides as (y, u, v). Read more
source§

fn estimate_rgb_u8_size(&self) -> usize

Estimates how many bytes you’ll need to store this YUV in an &[u8] RGB array. Read more
source§

fn estimate_rgba_u8_size(&self) -> usize

Estimates how many bytes you’ll need to store this YUV in an &[u8] RGBA array. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for YUVSlices<'a>

§

impl<'a> RefUnwindSafe for YUVSlices<'a>

§

impl<'a> Send for YUVSlices<'a>

§

impl<'a> Sync for YUVSlices<'a>

§

impl<'a> Unpin for YUVSlices<'a>

§

impl<'a> UnwindSafe for YUVSlices<'a>

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> Same for T

§

type Output = T

Should always be Self
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.