Struct ctru_sys::Y2RU_ColorCoefficients
source · #[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
impl Clone for Y2RU_ColorCoefficients
source§fn clone(&self) -> Y2RU_ColorCoefficients
fn clone(&self) -> Y2RU_ColorCoefficients
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Y2RU_ColorCoefficients
impl Debug for Y2RU_ColorCoefficients
source§impl Default for Y2RU_ColorCoefficients
impl Default for Y2RU_ColorCoefficients
source§fn default() -> Y2RU_ColorCoefficients
fn default() -> Y2RU_ColorCoefficients
Returns the “default value” for a type. Read more