[][src]Struct rav1e::prelude::Plane

pub struct Plane<T: Pixel> {
    pub cfg: PlaneConfig,
    // some fields omitted
}

One data plane of a frame.

For example, a plane can be a Y luma plane or a U or V chroma plane.

Fields

cfg: PlaneConfig

Plane configuration.

Implementations

impl<T: Pixel> Plane<T>[src]

pub fn new(
    width: usize,
    height: usize,
    xdec: usize,
    ydec: usize,
    xpad: usize,
    ypad: usize
) -> Self
[src]

Allocates and returns a new plane.

pub fn slice(&self, po: PlaneOffset) -> PlaneSlice<T>[src]

pub fn p(&self, x: usize, y: usize) -> T[src]

Returns the pixel at the given coordinates.

pub fn data_origin(&self) -> &[T][src]

Returns plane data starting from the origin.

pub fn data_origin_mut(&mut self) -> &mut [T][src]

Returns mutable plane data starting from the origin.

pub fn copy_from_raw_u8(
    &mut self,
    source: &[u8],
    source_stride: usize,
    source_bytewidth: usize
)
[src]

Copies data into the plane from a pixel array.

pub fn downsampled(&self, frame_width: usize, frame_height: usize) -> Plane<T>[src]

pub fn iter(&self) -> PlaneIter<T>[src]

Iterates over the pixels in the plane, skipping the padding.

Trait Implementations

impl<T: Clone + Pixel> Clone for Plane<T>[src]

impl<T: Pixel> Debug for Plane<T> where
    T: Display
[src]

impl<T: Eq + Pixel> Eq for Plane<T>[src]

impl<T: PartialEq + Pixel> PartialEq<Plane<T>> for Plane<T>[src]

impl<T: Pixel> StructuralEq for Plane<T>[src]

impl<T: Pixel> StructuralPartialEq for Plane<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Plane<T> where
    T: RefUnwindSafe

impl<T> Send for Plane<T>

impl<T> Sync for Plane<T>

impl<T> Unpin for Plane<T> where
    T: Unpin

impl<T> UnwindSafe for Plane<T> where
    T: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.