Skip to main content

refinement_coded

Function refinement_coded 

Source
pub fn refinement_coded(
    st: &mut StripeState,
    settings: &CaptureSettings,
    d: &HwFrameDecision,
    quality: EncoderQuality,
    bytes: usize,
    bound: bool,
    capped: bool,
)
Expand description

What a full-frame frame decided as d left in st’s ledger once coded in bytes, the encoder now reporting quality: its refined blocks are clean where the rate control’s quality index put them at the target (BlockLedger::refinement_coded) and, where a rate binds the session (bound, as plan_refinement takes it), the pace follows the rate control (RefinePace); a frame held whole at the paint-over quality, or the region’s cleanup having run its course, cleans the region, and a key frame at the rate control’s own leaves it unclean. A frame coded under a capped constant quality’s binding peak (capped, FrameEncoder::coded_capped) leaves the blocks it coded coarse and cleans nothing; one coded without it takes the blocks it refreshed (HwFrameDecision::refresh) off the coarse ones and paces the refresh against the peak’s frame budget (ledger::RefreshPace), where it came out at all (bytes above 0). The last block owed the paint-over (BlockLedger::spent, plan_refinement) refreshed, the cleanup falls due again.