[][src]Struct gfwx::color_transform::ColorTransformProgram

pub struct ColorTransformProgram { /* fields omitted */ }

Methods

impl ColorTransformProgram[src]

pub fn new() -> Self[src]

pub fn yuv444_to_yuv444() -> Self[src]

Stores input as yuv444. Does not perform any color transforms, just flags second and third channels as chroma channels. Decompressed output also will be in yuv44.

pub fn rgb_to_yuv() -> Self[src]

Stores rgb data as approximated YUV444 (real order is UYV). performs the following: R -= G (chroma); B -= G (chroma); G += (R + B) / 4 (luma)

pub fn bgr_to_a710() -> Self[src]

Stores bgr data as approximated a710. performs the following: R -= G (chroma); B -= (G * 2 + R) / 2 (chroma); G += (B * 2 + R * 3) / 8 (luma)

pub fn rgb_to_a710() -> Self[src]

Stores rgb data as approximated a710. performs the following: R -= G (chroma); B -= (G * 2 + R) / 2 (chroma); G += (B * 2 + R * 3) / 8 (luma)

pub fn decode(
    buffer: &mut impl Read,
    is_chroma: &mut [bool]
) -> Result<Self, DecompressError>
[src]

pub fn add_channel_transform(
    &mut self,
    channel_transform: ChannelTransform
) -> &mut Self
[src]

pub fn is_channel_has_transform(&self, channel: usize) -> bool[src]

pub fn iter(&self) -> impl DoubleEndedIterator<Item = &ChannelTransform>[src]

pub fn encode(
    &self,
    channels: usize,
    buffer: &mut impl Write
) -> Result<Vec<bool>>
[src]

pub fn transform_and_to_planar<T>(
    &self,
    image: &[T],
    header: &Header,
    aux: &mut [i16]
) where
    T: Into<i16> + Copy
[src]

pub fn transform<T>(&self, image: &[T], header: &Header, aux: &mut [i16]) where
    T: Into<i16> + Copy
[src]

pub fn detransform_and_to_interleaved<T>(
    &self,
    aux: &mut [i16],
    header: &Header,
    channel_size: usize,
    image: &mut [T]
) where
    T: NumCast
[src]

pub fn detransform<T>(
    &self,
    aux: &mut [i16],
    header: &Header,
    channel_size: usize,
    image: &mut [T]
) where
    T: NumCast
[src]

Trait Implementations

impl Clone for ColorTransformProgram[src]

impl Debug for ColorTransformProgram[src]

impl Default for ColorTransformProgram[src]

impl PartialEq<ColorTransformProgram> for ColorTransformProgram[src]

impl StructuralPartialEq for ColorTransformProgram[src]

Auto Trait Implementations

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.