AVC Advanced Video Coding, alias h264
SODB String Of Data Bits
RBSP Raw Byte Sequence Payload
RBSP = SODB + (RBSP Trailing Bits for alignment)
EBSP Encapsulated Byte Sequence Payload
EBSP = RBSP inserted 0x03 to avoid being treated as startcode of a NALU
Raw data
... 0xXX, 0x00, 0x00, 0xXX, ...
Encoded data
... 0xXX, 0x00, 0x00, 0x03, 0xXX, ...
NALUHeader
forbidden_zero_bit, 1bit
nal_ref_idc, 2bits
nal_unit_type, 5bits, equals NALUHeader & 0x1F
NALU Network Abstraction Layer Unit
NALU = NALUHeader + EBSP
startcode
0x00, 0x00, 0x01 Following NALU is a slice in one picture frame
0x00, 0x00, 0x00, 0x01 Following NALU is a picture frame, SPS, PPS, etc
AU Access Units
A complete picture frame containing several NALUs
SPS Sequence Parameter Set nal_unit_type == 7
From an SPS, we can get width and height of the picture
PPS Picture Parameter Set nal_unit_type == 8
IDR Instantaneous Decoding Refresh nal_unit_type == 5
SEI Supplemental Enhancement Information nal_unit_type == 6
1 byte payloadType + 1 byte payloadSize
payloadType
0x00: buffering_period
0x01: pic_timing
0x02: pan_scan_rect
0x03: filler_payload
0x04: user_data_registered_itu_t_t35
0x05: user_data_unregistered
16 bytes: uuid_iso_iec_11578
payloadSize - 16: user_data_payload_byte
0x06: recovery_point
rbsp trailing bits
AnnexB
use startcode
AVCC
use NALU length, reuse EBSP
RTP
in AVCC, not AnnexB?
refer to:
https://www.cnblogs.com/ssyfj/p/14624498.html
https://blog.csdn.net/y601500359/article/details/80943990