#[cfg(any(feature = "alloc", feature = "std"))]
use crate::prelude::Vec;
#[non_exhaustive]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TransferPointEncoding {
Bits8,
Bits10,
Bits12,
}
#[non_exhaustive]
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, PartialEq)]
pub enum TransferCurve {
Luminance(Vec<f32>),
Rgb {
red: Vec<f32>,
green: Vec<f32>,
blue: Vec<f32>,
},
}
#[non_exhaustive]
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, PartialEq)]
pub struct DisplayIdTransferCharacteristic {
pub encoding: TransferPointEncoding,
pub curve: TransferCurve,
}
#[cfg(any(feature = "alloc", feature = "std"))]
impl DisplayIdTransferCharacteristic {
pub fn new(encoding: TransferPointEncoding, curve: TransferCurve) -> Self {
Self { encoding, curve }
}
}