roboto.experimental.video.annexb
Annex B framing shared by the NAL-based codecs (H.264 and H.265).
Annex B delimits NAL units with start codes; that framing is identical across H.264 and H.265 — only the NAL header layout after each start code differs (1-byte header with a 5-bit type vs. 2-byte header with a 6-bit type). This module holds the codec-independent start-code scan; the per-codec modules (h264, h265) interpret the headers.
Module Contents
NalUnit
nal_payload_bounds()
Locate every NAL unit payload as a (start, end) byte range.
Handles both 3-byte (00 00 01) and 4-byte (00 00 00 01) start codes. Zero-length units are skipped.
Parameters
data bytesReturn type
list[tuple[int, int]]