#[repr(u32)]pub enum ColorSpace {
Invalid = 0,
Srgb = 1,
Rec601Ntsc = 2,
Rec601NtscFullRange = 3,
Rec601Pal = 4,
Rec601PalFullRange = 5,
Rec709 = 6,
Rec2020 = 7,
Rec2100 = 8,
Passthrough = 9,
DoNotCare = 4_294_967_294,
UnknownOrdinal_(u32),
}Expand description
Expresses the color space used to interpret video pixel values.
This list has a separate entry for each variant of a color space standard.
For this reason, should we ever add support for the RGB variant of 709, for example, we’d add a separate entry to this list for that variant. Similarly for the RGB variants of 2020 or 2100. Similarly for the YcCbcCrc variant of 2020. Similarly for the ICtCp variant of 2100.
See ImageFormatIsSupportedColorSpaceForPixelFormat() for whether a
combination of PixelFormat and ColorSpace is potentially supported.
Generally, a ColorSpace is not supported for any PixelFormat whose
bits-per-sample isn’t compatible with the color space’s spec, nor for any
PixelFormat which is a mismatch in terms of RGB vs. YUV.
The “limited range” in comments below refers to where black and white are defined to be (and simimlar for chroma), but should not be interpreted as guaranteeing that there won’t be values outside the nominal “limited range”. In other words, “limited range” doesn’t necessarily mean there won’t be any values below black or above white, or outside the “limited” chroma range. For “full range”, black is 0 and white is the max possible/permitted numeric value (and similar for chroma).
Variants§
Invalid = 0
Srgb = 1
Rec601Ntsc = 2
Rec601NtscFullRange = 3
Rec601Pal = 4
Rec601PalFullRange = 5
Rec709 = 6
Rec2020 = 7
Rec2100 = 8
Passthrough = 9
DoNotCare = 4_294_967_294
UnknownOrdinal_(u32)
Trait Implementations§
Source§impl Clone for ColorSpace
impl Clone for ColorSpace
Source§fn clone(&self) -> ColorSpace
fn clone(&self) -> ColorSpace
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ColorSpace
impl Debug for ColorSpace
Source§impl<'a, ___E> Encode<ColorSpace, ___E> for &'a ColorSpacewhere
___E: ?Sized,
impl<'a, ___E> Encode<ColorSpace, ___E> for &'a ColorSpacewhere
___E: ?Sized,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<ColorSpace>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<ColorSpace>, _: (), ) -> Result<(), EncodeError>
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<___E> Encode<ColorSpace, ___E> for ColorSpacewhere
___E: ?Sized,
impl<___E> Encode<ColorSpace, ___E> for ColorSpacewhere
___E: ?Sized,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<ColorSpace>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<ColorSpace>, _: (), ) -> Result<(), EncodeError>
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl From<ColorSpace> for ColorSpace
impl From<ColorSpace> for ColorSpace
Source§fn from(wire: ColorSpace) -> ColorSpace
fn from(wire: ColorSpace) -> ColorSpace
Source§impl From<ColorSpace> for ColorSpace
impl From<ColorSpace> for ColorSpace
Source§fn from(natural: ColorSpace) -> ColorSpace
fn from(natural: ColorSpace) -> ColorSpace
Source§impl From<u32> for ColorSpace
impl From<u32> for ColorSpace
Source§fn from(value: u32) -> ColorSpace
fn from(value: u32) -> ColorSpace
Source§impl FromWire<ColorSpace> for ColorSpace
impl FromWire<ColorSpace> for ColorSpace
Source§fn from_wire(wire: ColorSpace) -> ColorSpace
fn from_wire(wire: ColorSpace) -> ColorSpace
§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl FromWireRef<ColorSpace> for ColorSpace
impl FromWireRef<ColorSpace> for ColorSpace
Source§fn from_wire_ref(wire: &ColorSpace) -> ColorSpace
fn from_wire_ref(wire: &ColorSpace) -> ColorSpace
Source§impl Hash for ColorSpace
impl Hash for ColorSpace
Source§impl Ord for ColorSpace
impl Ord for ColorSpace
Source§fn cmp(&self, other: &ColorSpace) -> Ordering
fn cmp(&self, other: &ColorSpace) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ColorSpace
impl PartialEq for ColorSpace
Source§fn eq(&self, other: &ColorSpace) -> bool
fn eq(&self, other: &ColorSpace) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ColorSpace
impl PartialOrd for ColorSpace
impl Copy for ColorSpace
impl Eq for ColorSpace
impl StructuralPartialEq for ColorSpace
Auto Trait Implementations§
impl Freeze for ColorSpace
impl RefUnwindSafe for ColorSpace
impl Send for ColorSpace
impl Sync for ColorSpace
impl Unpin for ColorSpace
impl UnsafeUnpin for ColorSpace
impl UnwindSafe for ColorSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
§impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
§fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]