Expand description
Decoder that will remove NAL header bytes and Emulation Prevention byte values from encoded NAL Units, to produce the Raw Byte Sequence Payload (RBSP).
The following byte sequences are not allowed to appear in a framed H264 bitstream,
0x000x000x000x000x000x010x000x000x020x000x000x03
therefore if these byte sequences do appear in the raw bitstream, an ‘escaping’ mechanism
(called ‘emulation prevention’ in the spec) is applied by adding a 0x03 byte between the
second and third bytes in the above sequence, resulting in the following encoded versions,
0x000x000x030x000x000x000x030x010x000x000x030x020x000x000x030x03
The ByteReader type will accept byte sequences that have had this encoding applied, and will
yield byte sequences where the encoding is removed (i.e. the decoder will replace instances of
the sequence 0x00 0x00 0x03 with 0x00 0x00).
Structs§
- BitReader
- Reads H.264 bitstream syntax elements from an RBSP representation (no NAL header byte or emulation prevention three bytes).
- Byte
Reader BufReadadapter which returns RBSP from NAL bytes.
Enums§
Traits§
- BitRead
- Numeric
- This trait extends many common integer types (both unsigned and signed) with a few trivial methods so that they can be used with the bitstream handling traits.
- Primitive
- A trait intended for simple fixed-length primitives (such as ints and floats) which allows them to be read and written to streams of different endiannesses verbatim.
Functions§
- decode_
nal - Returns RBSP from a NAL by removing the NAL header and
emulation-prevention-threebytes.