pub struct ComponentCoefficients {
pub id: u8,
pub blocks: Vec<[i16; 64]>,
}Expand description
Quantized DCT coefficients for a single component (Y, Cb, or Cr).
Each element of blocks is one 8×8 DCT block, stored in the JPEG zigzag
scan order:
- Index 0: DC coefficient (top-left of the frequency matrix).
- Indices 1–63: AC coefficients in zigzag order.
The values are the quantized coefficients exactly as they appear in the JPEG bitstream. They have not been dequantized; multiply by the quantization table to recover the pre-quantized DCT values.
Fields§
§id: u8Component identifier as written in the JPEG SOF marker.
blocks: Vec<[i16; 64]>All 8×8 blocks for this component, in raster scan order (left-to-right,
top-to-bottom). Each block contains exactly 64 i16 values.
Trait Implementations§
Source§impl Clone for ComponentCoefficients
impl Clone for ComponentCoefficients
Source§fn clone(&self) -> ComponentCoefficients
fn clone(&self) -> ComponentCoefficients
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 moreAuto Trait Implementations§
impl Freeze for ComponentCoefficients
impl RefUnwindSafe for ComponentCoefficients
impl Send for ComponentCoefficients
impl Sync for ComponentCoefficients
impl Unpin for ComponentCoefficients
impl UnsafeUnpin for ComponentCoefficients
impl UnwindSafe for ComponentCoefficients
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