[−][src]Enum yuv::convert::RGBConvert
Enum containing concrete type of converter used.
Use RGBConvert::new
to create a new instance.
Variants of this enum are indivdually optimized for specific color spaces. You can either call RGBConvert::to_rgb()
for convenient method, or
match on the enum, and use ToRGB
trait with each of the variants to make Rust generate optimized functions for each.
Variants
Matrix(Matrix<T>)
Converter YCbCr color spaces
Copy(Copy<T>)
No conversion
IdentityScale(IdentityScale<T>)
Scale numbers from 10/12-bit to 16-bit, and/or from studio range to full range. All channels use Y range.
Implementations
impl RGBConvert<u8>
[src]
pub fn new(range: Range, matrix: MatrixCoefficients) -> Result<Self, Error>
[src]
Use RGBConvert::<u8>::new()
to call this method, because there's also a u16
version
impl RGBConvert<u16>
[src]
pub fn new(
range: Range,
matrix: MatrixCoefficients,
depth: Depth
) -> Result<Self, Error>
[src]
range: Range,
matrix: MatrixCoefficients,
depth: Depth
) -> Result<Self, Error>
Use RGBConvert::<u16>::new()
to call this method, because there's also a u8
version
impl<T> RGBConvert<T> where
Matrix<T>: ToRGB<T, T>,
IdentityScale<T>: ToRGB<T, T>,
[src]
Matrix<T>: ToRGB<T, T>,
IdentityScale<T>: ToRGB<T, T>,
pub fn to_rgb(&self, px: YUV<T>) -> RGB<T>
[src]
Convert a single YUV pixel to an RGB pixel.
This method has a match
internally, which may or may not be the fastest way to do this (dependin on optimizer).
If you want to have optimal code, use variants of this enum
individually. They all implement ToRGB
trait.
Trait Implementations
impl<T: Clone> Clone for RGBConvert<T>
[src]
fn clone(&self) -> RGBConvert<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug> Debug for RGBConvert<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for RGBConvert<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for RGBConvert<T> where
T: Send,
T: Send,
impl<T> Sync for RGBConvert<T> where
T: Sync,
T: Sync,
impl<T> Unpin for RGBConvert<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for RGBConvert<T> where
T: UnwindSafe,
T: 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>,