Skip to main content

Module bits

Module bits 

Source
Expand description

Reading side of the bitstream layer: an MSB-first bit reader with Exp-Golomb, and NAL unit splitting and unescaping.

The mirror of crate::bitstream. Reads past the end return zeros rather than failing, because a truncated slice is something a decoder has to survive, not something it can always detect before it has read too far — callers check BitReader::overrun at the points where it matters.

Structs§

BitReader
MSB-first reader over an RBSP (emulation prevention already removed).

Functions§

split_annexb
Split an Annex B byte stream on its start codes.
split_length_prefixed
Split a length-prefixed sample (avcC/hvcC style) into NAL units.
unescape
Remove emulation prevention bytes: every 00 00 03 becomes 00 00.