pub struct EvcDecoder { /* private fields */ }Expand description
Public-but-internal type that callers normally see via the Decoder
trait. Wraps the per-stream parameter-set cache, the round-9 DPB and
the POC-ordered output queue.
Implementations§
Source§impl EvcDecoder
impl EvcDecoder
pub fn new() -> Self
Sourcepub fn apply_luma_inverse_mapping_spec_faithful(
&self,
pic: &mut YuvPicture,
pps_dra_aps_id: Option<u8>,
) -> Result<bool>
pub fn apply_luma_inverse_mapping_spec_faithful( &self, pic: &mut YuvPicture, pps_dra_aps_id: Option<u8>, ) -> Result<bool>
Round-181 — apply §8.9.3 (Inverse mapping process for a luma
sample) to the picture’s luma plane using the round-151 spec-faithful
DRA state, returning true if the mapping was applied and false
if the cache slot for pps_dra_aps_id was empty (no-op).
The pipeline is:
- Look up
(DraSyntax, DraDerived)forpps_dra_aps_idindra_syntax_aps. Skip the apply if absent. - Clone the derived state and run the §7.4.7 off-by-one
reconciliation via
dra::fill_inv_luma_scales_range_zeroso range 0 carries a non-degenerateInvLumaScales[0]/DraOffsets[0]. This is the interpretation flagged in the r174 docs gap; the original cache entry is unchanged. - Apply
dra::apply_luma_inverse_mapping_u8over the picture’syplane in-place, which iterates §8.9.5 → eq. 1374-1376 per sample.
8-bit only — YuvPicture stores samples as u8, matching the
only bit_depth_luma_minus8 == 0 case we currently materialise.
This method is independent of the legacy round-148
dra::apply_dra path used by Self::apply_post_filters.
Callers who want the spec-faithful §8.9.3 must invoke this method
explicitly; the post-filter wiring stays on the round-148 path so
existing fixtures don’t shift.
Trait Implementations§
Source§impl Decoder for EvcDecoder
impl Decoder for EvcDecoder
fn codec_id(&self) -> &CodecId
Source§fn send_packet(&mut self, packet: &Packet) -> Result<()>
fn send_packet(&mut self, packet: &Packet) -> Result<()>
receive_frame in a loop afterwards.Source§fn receive_frame(&mut self) -> Result<Frame>
fn receive_frame(&mut self) -> Result<Frame>
Error::NeedMore when the
decoder needs another packet.Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
receive_frame will drain buffered
frames and eventually return Error::Eof.Source§fn receive_arena_frame(&mut self) -> Result<Arc<FrameInner>, Error>
fn receive_arena_frame(&mut self) -> Result<Arc<FrameInner>, Error>
arena::sync::Frame. Read moreSource§fn reset(&mut self) -> Result<(), Error>
fn reset(&mut self) -> Result<(), Error>
Source§fn set_execution_context(&mut self, _ctx: &ExecutionContext)
fn set_execution_context(&mut self, _ctx: &ExecutionContext)
send_packet. Default no-op; codecs that want to run
slice-/GOP-/tile-parallel override this to capture the budget.
Ignoring the hint is always safe — callers must still work with
a decoder that runs serial.