#[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 duplicate 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
impl Copy for Y2RU_ColorCoefficients
Auto Trait Implementations§
impl Freeze for Y2RU_ColorCoefficients
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 Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)