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#
- class roboto.experimental.video.annexb.NalUnit#
One NAL unit split out of Annex B-framed data.
- data: bytes#
header included, start code excluded.
- Type:
The unit’s bytes
- type: int#
nal_unit_typefrom the unit’s header (codec-specific layout).
- roboto.experimental.video.annexb.nal_payload_bounds(data)#
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 (bytes)
- Return type:
list[tuple[int, int]]