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

pub struct Plane<T> where
    T: Pixel
{ pub data: PlaneData<T>, pub cfg: PlaneConfig, }

One data plane of a frame.

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

Fields

data: PlaneData<T>cfg: PlaneConfig

Plane configuration.

Implementations

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

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

Allocates and returns a new plane.

pub fn from_slice(data: &[T], stride: usize) -> Plane<T>[src]

pub fn pad(&mut self, w: usize, h: usize)[src]

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

pub fn mut_slice(&mut self, po: PlaneOffset) -> PlaneMutSlice<'_, T>[src]

pub fn row_range(&self, x: isize, y: isize) -> Range<usize>[src]

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

Returns the pixel at the given coordinates.

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

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns plane data starting from the origin.

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

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[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]

Returns plane with half the resolution for width and height. Downscaled with 2x2 box filter. Padded to dimensions with frame_width and frame_height.

pub fn iter(&self) -> PlaneIter<'_, T>

Notable traits for PlaneIter<'a, T>

impl<'a, T> Iterator for PlaneIter<'a, T> where
    T: Pixel
type Item = T;
[src]

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

pub fn rows_iter(&self) -> RowsIter<'_, T>

Notable traits for RowsIter<'a, T>

impl<'a, T> Iterator for RowsIter<'a, T> where
    T: Pixel
type Item = &'a [T];
[src]

Iterates over the lines of the plane

pub fn row(&self, y: isize) -> &[T]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Return a line

Trait Implementations

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

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

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

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

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

impl<T> StructuralPartialEq for Plane<T> where
    T: Pixel
[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> Pointable for T

type Init = T

The type for initializers.

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.