pub struct VuiConfig { /* private fields */ }Expand description
H.264 VUI configuration for signaling color space to decoders.
This struct groups all VUI color-related fields together for convenience.
Use VuiConfig::bt709() or similar constructors for common presets.
§Example
use openh264::encoder::{EncoderConfig, VuiConfig};
let config = EncoderConfig::new()
.vui(VuiConfig::bt709().full_range(true)); // HD BT.709 with full rangeImplementations§
Source§impl VuiConfig
impl VuiConfig
Sourcepub const fn bt709() -> Self
pub const fn bt709() -> Self
BT.709 with limited range (default for HD content).
This is the standard for HD television and most video content.
Sourcepub const fn bt709_full() -> Self
pub const fn bt709_full() -> Self
BT.709 with full range (for PC/computer graphics content).
Sourcepub const fn srgb() -> Self
pub const fn srgb() -> Self
sRGB with full range (ideal for desktop/web content).
Uses BT.709 primaries but with sRGB transfer function.
Sourcepub const fn color_primaries(self, value: ColorPrimaries) -> Self
pub const fn color_primaries(self, value: ColorPrimaries) -> Self
Set the color primaries.
Sourcepub const fn transfer_characteristics(
self,
value: TransferCharacteristics,
) -> Self
pub const fn transfer_characteristics( self, value: TransferCharacteristics, ) -> Self
Set the transfer characteristics.
Sourcepub const fn matrix_coefficients(self, value: MatrixCoefficients) -> Self
pub const fn matrix_coefficients(self, value: MatrixCoefficients) -> Self
Set the matrix coefficients.
Sourcepub const fn full_range(self, value: bool) -> Self
pub const fn full_range(self, value: bool) -> Self
Set full range mode.
Trait Implementations§
impl Copy for VuiConfig
impl Eq for VuiConfig
impl StructuralPartialEq for VuiConfig
Auto Trait Implementations§
impl Freeze for VuiConfig
impl RefUnwindSafe for VuiConfig
impl Send for VuiConfig
impl Sync for VuiConfig
impl Unpin for VuiConfig
impl UnsafeUnpin for VuiConfig
impl UnwindSafe for VuiConfig
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
Mutably borrows from an owned value. Read more