#[non_exhaustive]pub enum HdrOutputFormat {
LinearFloat,
LinearF16,
Srgb8,
}Expand description
Output format for HDR reconstruction.
Mirrors libultrahdr’s three supported decode outputs:
LinearFloat↔UHDR_IMG_FMT_64bppRGBAHalfFloatsemantically (same linear-light content), but at f32 precision instead of f16. Use when downstream wants float math.LinearF16↔UHDR_IMG_FMT_64bppRGBAHalfFloatexactly. Use for direct compositor / GPU-texture handoff.Srgb8↔UHDR_IMG_FMT_32bppRGBA8888with sRGB transfer. Use when downstream wants SDR (display_boost = 1.0 typical).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LinearFloat
Linear f32 RGBA where 1.0 = SDR white (203 nits). Range [0, ~display_boost].
16 bytes/pixel (RgbaF32).
LinearF16
Linear f16 (IEEE 754 half-precision) RGBA where 1.0 = SDR white.
8 bytes/pixel (RgbaF16). Mirrors libultrahdr’s
UHDR_IMG_FMT_64bppRGBAHalfFloat.
Srgb8
sRGB 8-bit (SDR output, no HDR boost). 4 bytes/pixel (Rgba8).
Trait Implementations§
Source§impl Clone for HdrOutputFormat
impl Clone for HdrOutputFormat
Source§fn clone(&self) -> HdrOutputFormat
fn clone(&self) -> HdrOutputFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HdrOutputFormat
impl Debug for HdrOutputFormat
Source§impl PartialEq for HdrOutputFormat
impl PartialEq for HdrOutputFormat
impl Copy for HdrOutputFormat
impl Eq for HdrOutputFormat
impl StructuralPartialEq for HdrOutputFormat
Auto Trait Implementations§
impl Freeze for HdrOutputFormat
impl RefUnwindSafe for HdrOutputFormat
impl Send for HdrOutputFormat
impl Sync for HdrOutputFormat
impl Unpin for HdrOutputFormat
impl UnsafeUnpin for HdrOutputFormat
impl UnwindSafe for HdrOutputFormat
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