pub struct FrameHeader {Show 30 fields
pub frame_type: FrameType,
pub encoding: Encoding,
pub xyb_encoded: bool,
pub flags: u64,
pub do_ycbcr: bool,
pub jpeg_upsampling: [u8; 3],
pub upsampling: u32,
pub ec_upsampling: Vec<u32>,
pub group_size_shift: u32,
pub x_qm_scale: u32,
pub b_qm_scale: u32,
pub num_passes: u32,
pub x0: i32,
pub y0: i32,
pub width: u32,
pub height: u32,
pub blend_mode: BlendMode,
pub ec_blend_modes: Vec<BlendMode>,
pub blend_source: u32,
pub alpha_blend_channel: u32,
pub save_as_reference: u32,
pub save_before_ct: bool,
pub name: String,
pub have_animation: bool,
pub have_timecodes: bool,
pub duration: u32,
pub timecode: u32,
pub is_last: bool,
pub gaborish: bool,
pub epf_iters: u32,
}Expand description
Frame header structure.
Used by both VarDCT and Modular encoding paths. Fields are parameterized
to cover both modes. Use lossy() or lossless() constructors for defaults.
Fields§
§frame_type: FrameTypeFrame type.
encoding: EncodingEncoding method.
xyb_encoded: boolWhether the image metadata has xyb_encoded=true. Controls whether do_ycbcr is written (only when false).
flags: u64Frame flags (e.g., SKIP_ADAPTIVE_LF_SMOOTHING=0x80, ENABLE_NOISE=0x01).
do_ycbcr: boolWhether the frame uses YCbCr color transform (only written when !xyb_encoded).
jpeg_upsampling: [u8; 3]JPEG upsampling mode for chroma (only for VarDCT + YCbCr).
upsampling: u32Upsampling factor (1, 2, 4, or 8).
ec_upsampling: Vec<u32>Extra channel upsampling factors.
group_size_shift: u32Group size shift (Modular only: 0=128, 1=256, 2=512, 3=1024).
x_qm_scale: u32X channel quant matrix scale (VarDCT only, 3 bits, range 0-7).
b_qm_scale: u32B channel quant matrix scale (VarDCT only, 3 bits, range 0-7).
num_passes: u32Number of passes (1-10).
x0: i32X offset for cropped frames.
y0: i32Y offset for cropped frames.
width: u32Frame width (0 = full image width).
height: u32Frame height (0 = full image height).
blend_mode: BlendModeBlending information for the main frame.
ec_blend_modes: Vec<BlendMode>Per-extra-channel blending modes.
blend_source: u32Source reference frame for blending (0-3).
alpha_blend_channel: u32Alpha channel to use for blending.
save_as_reference: u32Whether frame is saved for reference.
save_before_ct: boolWhether to save before color transform.
name: StringFrame name.
have_animation: boolWhether the file header signals animation (have_animation=true). When true, duration/timecode fields are written for normal frames.
have_timecodes: boolWhether the file header signals have_timecodes.
duration: u32Duration in ticks (for animation).
timecode: u32Timecode (if have_timecodes).
is_last: boolWhether this is the last frame.
gaborish: boolEnable gaborish (Gabor-like blur in decoder loop filter).
epf_iters: u32Number of EPF (Edge-Preserving Filter) iterations (0-3).
Implementations§
Source§impl FrameHeader
impl FrameHeader
Sourcepub fn lossy() -> Self
pub fn lossy() -> Self
Creates a frame header for a lossy VarDCT frame with default parameters.
Defaults: xyb_encoded=true, flags=SKIP_ADAPTIVE_LF_SMOOTHING (0x80), gaborish=true, epf_iters=2.
Trait Implementations§
Source§impl Clone for FrameHeader
impl Clone for FrameHeader
Source§fn clone(&self) -> FrameHeader
fn clone(&self) -> FrameHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more