pub enum ProgressiveMode {
Single,
QuantizedAcFullAc,
DcVlfLfAc,
}Expand description
Progressive encoding mode for VarDCT.
Progressive encoding splits AC coefficients across multiple passes by reducing precision. Decoders can render a coarse preview after early passes, improving user experience for web delivery.
The shift mechanism works by right-shifting quantized coefficients before encoding in early passes. The decoder left-shifts and accumulates, so the final result is exact (lossless reconstruction of the quantized coefficients).
Variants§
Single
Single pass (default). No progressive rendering.
QuantizedAcFullAc
2-pass quantized progressive.
- Pass 0: All AC coefficients right-shifted by 1 bit (coarse)
- Pass 1: Residual at full precision
Provides quick 2x-downsampled preview, then full quality refinement.
DcVlfLfAc
3-pass progressive (DC/VLF → LF → Full AC).
- Pass 0: All AC coefficients right-shifted by 2 bits (very coarse, 8x downsample hint)
- Pass 1: Residual right-shifted by 1 bit (medium, 4x downsample hint)
- Pass 2: Final residual at full precision
Provides staged refinement: blurry preview → sharper → final.
Trait Implementations§
Source§impl Clone for ProgressiveMode
impl Clone for ProgressiveMode
Source§fn clone(&self) -> ProgressiveMode
fn clone(&self) -> ProgressiveMode
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 ProgressiveMode
impl Debug for ProgressiveMode
Source§impl Default for ProgressiveMode
impl Default for ProgressiveMode
Source§fn default() -> ProgressiveMode
fn default() -> ProgressiveMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for ProgressiveMode
impl PartialEq for ProgressiveMode
impl Copy for ProgressiveMode
impl Eq for ProgressiveMode
impl StructuralPartialEq for ProgressiveMode
Auto Trait Implementations§
impl Freeze for ProgressiveMode
impl RefUnwindSafe for ProgressiveMode
impl Send for ProgressiveMode
impl Sync for ProgressiveMode
impl Unpin for ProgressiveMode
impl UnsafeUnpin for ProgressiveMode
impl UnwindSafe for ProgressiveMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more