Skip to main content

Cicp

Struct Cicp 

Source
pub struct Cicp {
    pub primaries: Primaries,
    pub transfer: TransferFunction,
    pub matrix: MatrixCoefficients,
    pub full_range: bool,
}

Fields§

§primaries: Primaries§transfer: TransferFunction§matrix: MatrixCoefficients§full_range: bool

Implementations§

Source§

impl Cicp

Source

pub const fn srgb() -> Self

sRGB: BT.709 primaries, sRGB transfer, BT.709 matrix, full range. This is the encoder’s working color space (full-range BT.709 RGB→YCbCr).

Source

pub const fn bt709() -> Self

BT.709 video: BT.709 primaries/transfer/matrix, full range.

Source

pub const fn bt2020_pq() -> Self

BT.2020 PQ (HDR10): BT.2020 primaries, PQ transfer, BT.2020 NCL matrix.

Source

pub const fn unspecified() -> Self

Source

pub fn nclx_payload(&self) -> Vec<u8>

The nclx payload for a HEIF colr box (without the box header): color_type (‘nclx’) + the four CICP fields. The full_range_flag occupies the top bit of the final byte; the low 7 bits are reserved zero.

Trait Implementations§

Source§

impl Clone for Cicp

Source§

fn clone(&self) -> Cicp

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Cicp

Source§

impl Debug for Cicp

Source§

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

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

impl Default for Cicp

Source§

fn default() -> Self

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

impl Eq for Cicp

Source§

impl PartialEq for Cicp

Source§

fn eq(&self, other: &Cicp) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Cicp

Auto Trait Implementations§

§

impl Freeze for Cicp

§

impl RefUnwindSafe for Cicp

§

impl Send for Cicp

§

impl Sync for Cicp

§

impl Unpin for Cicp

§

impl UnsafeUnpin for Cicp

§

impl UnwindSafe for Cicp

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.