[−][src]Struct av_metrics::video::Plane
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]
T: Pixel,
pub fn new(
width: usize,
height: usize,
xdec: usize,
ydec: usize,
xpad: usize,
ypad: usize
) -> Plane<T>
[src]
width: usize,
height: usize,
xdec: usize,
ydec: usize,
xpad: usize,
ypad: usize
) -> Plane<T>
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]
[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]
&mut self,
source: &[u8],
source_stride: usize,
source_bytewidth: usize
)
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.
pub fn rows_iter(&self) -> RowsIter<T>
[src]
Iterates over the lines of the plane
Trait Implementations
impl<T> Clone for Plane<T> where
T: Pixel + Clone,
[src]
T: Pixel + Clone,
impl<T> Debug for Plane<T> where
T: Pixel + Display,
[src]
T: Pixel + Display,
impl<T> Eq for Plane<T> where
T: Pixel + Eq,
[src]
T: Pixel + Eq,
impl<T> PartialEq<Plane<T>> for Plane<T> where
T: Pixel + PartialEq<T>,
[src]
T: Pixel + PartialEq<T>,
impl<T> StructuralEq for Plane<T> where
T: Pixel,
[src]
T: Pixel,
impl<T> StructuralPartialEq for Plane<T> where
T: Pixel,
[src]
T: Pixel,
Auto Trait Implementations
impl<T> RefUnwindSafe for Plane<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Plane<T>
impl<T> Sync for Plane<T>
impl<T> Unpin for Plane<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Plane<T> where
T: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,