pub struct InMemoryCoverFetch<'a> { /* private fields */ }Expand description
§6E-C / Task #24.2 — in-memory CoverFetch adapter.
Wraps a pre-materialized (cover_bits, costs) pair and slices
on-demand per segment. Suitable for orchestrator integrations
(Task #24.3) where the encoder’s Pass-1 cover already lives in
memory and the streaming-Viterbi memory savings come from the
STC-internal O(√n) checkpoint + back-pointer working set, not
the cover side.
Memory bound: O(n) cover (caller-provided) + O(K × w) per
segment fetch + O(num_segments × num_states × 8 B) checkpoints
inside stc_embed_streaming_segmented. For long-clip video
stego where the encoder’s full per-GOP cover materialization
is itself the OOM source, a follow-on per-GOP-replay adapter
(left as v1.1+ work) replaces the cover materialization with
repeated Pass 1 invocations bounded by the segment’s GOP range.
That follow-on requires encoder restartability at arbitrary
GOP boundaries — out of scope for v1.0 (mobile clips are
short enough that in-memory cover fits).
Implementations§
Trait Implementations§
Source§impl<'a> CoverFetch for InMemoryCoverFetch<'a>
impl<'a> CoverFetch for InMemoryCoverFetch<'a>
Source§fn total_positions(&self) -> usize
fn total_positions(&self) -> usize
n.Source§fn num_segments(&self) -> usize
fn num_segments(&self) -> usize
m.div_ceil(K) where K is
the segment size.Source§fn segment_size_in_blocks(&self) -> usize
fn segment_size_in_blocks(&self) -> usize
m doesn’t divide evenly by K.