pub struct FormatEntry {
pub descriptor: PixelDescriptor,
pub effective_bits: u8,
pub can_overshoot: bool,
}Expand description
A format a codec can produce (decode) or consume (encode).
Fields§
§descriptor: PixelDescriptorThe pixel descriptor for this format.
effective_bits: u8Effective precision bits within the container type.
Usually matches the container (u8=8, u16=16, f32=32), but can differ:
- AVIF 10-bit source decoded to u8: effective_bits = 8 (precision lost)
- JPEG f32 precise decode: effective_bits = 10 (debiased dequant)
- PNG 1-bit gray decoded to u8: effective_bits = 8 (scaled to fill range)
- Farbfeld u16: effective_bits = 16 (full range)
can_overshoot: boolWhether output values can exceed the nominal range.
JPEG f32 decode preserves IDCT ringing, producing values outside [0.0, 1.0]. Most codecs clamp to nominal range.
Trait Implementations§
Source§impl Clone for FormatEntry
impl Clone for FormatEntry
Source§fn clone(&self) -> FormatEntry
fn clone(&self) -> FormatEntry
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 FormatEntry
impl Debug for FormatEntry
impl Copy for FormatEntry
Auto Trait Implementations§
impl Freeze for FormatEntry
impl RefUnwindSafe for FormatEntry
impl Send for FormatEntry
impl Sync for FormatEntry
impl Unpin for FormatEntry
impl UnsafeUnpin for FormatEntry
impl UnwindSafe for FormatEntry
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