#[repr(C)]
pub struct Y2RU_ColorCoefficients { pub rgb_Y: u16_, pub r_V: u16_, pub g_V: u16_, pub g_U: u16_, pub b_U: u16_, pub r_offset: u16_, pub g_offset: u16_, pub b_offset: u16_, }
Expand description

Coefficients of the YUV->RGB conversion formula.

A set of coefficients configuring the RGB to YUV conversion. Coefficients 0-4 are unsigned 2.8 fixed pointer numbers representing entries on the conversion matrix, while coefficient 5-7 are signed 11.5 fixed point numbers added as offsets to the RGB result.

The overall conversion process formula is: R = trunc((rgb_Y * Y + r_V * V) + 0.75 + r_offset) G = trunc((rgb_Y * Y - g_U * U - g_V * V) + 0.75 + g_offset) B = trunc((rgb_Y * Y + b_U * U ) + 0.75 + b_offset)

Fields§

§rgb_Y: u16_

< RGB per unit Y.

§r_V: u16_

< Red per unit V.

§g_V: u16_

< Green per unit V.

§g_U: u16_

< Green per unit U.

§b_U: u16_

< Blue per unit U.

§r_offset: u16_

< Red offset.

§g_offset: u16_

< Green offset.

§b_offset: u16_

< Blue offset.

Trait Implementations§

source§

impl Clone for Y2RU_ColorCoefficients

source§

fn clone(&self) -> Y2RU_ColorCoefficients

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Y2RU_ColorCoefficients

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Y2RU_ColorCoefficients

source§

fn default() -> Y2RU_ColorCoefficients

Returns the “default value” for a type. Read more
source§

impl Copy for Y2RU_ColorCoefficients

Auto Trait Implementations§

§

impl RefUnwindSafe for Y2RU_ColorCoefficients

§

impl Send for Y2RU_ColorCoefficients

§

impl Sync for Y2RU_ColorCoefficients

§

impl Unpin for Y2RU_ColorCoefficients

§

impl UnwindSafe for Y2RU_ColorCoefficients

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.