Skip to main content

Module range_decoder

Module range_decoder 

Source
Expand description

Range decoder primitives for the Opus codec.

This module implements the bit-exact range decoder described in RFC 6716 §4.1 (docs/audio/opus/rfc6716-opus.txt). The implementation is clean-room: every routine is transcribed from the prose and pseudocode equations in the RFC; no external library source was consulted.

The range decoder is the SHARED entropy primitive that both the SILK and CELT layers of Opus invoke for every coded symbol. The [oxideav-celt] crate carries its own copy of the same primitive; each crate owns its copy until a shared low-level primitive crate exists in the workspace. The two copies are independent clean-room transcriptions of the same RFC sections and are expected to be behaviourally identical.

The following routines are wired up:

Structs§

RangeDecoder
Bit-exact CELT/SILK range decoder state per RFC 6716 §4.1.