H.264/AVC Layer Structure
H.264 的主要目標:
1)高的視頻壓縮比,當初提出的指標是比H.263,MPEG-4,約為它們的2 倍,現在都已基本實現;
2)良好的網絡親和性,即可適用于各種傳輸網絡。
為此,H.264 的功能分為兩層,即視頻編碼層(VCL)和網絡提取層(NAL)。
VCL 數據即編碼處理的輸出,它表示被壓縮編碼后的視頻數據序列。
在VCL 數據傳輸或存儲之前,這些編碼的VCL 數據,先被映射或封裝進NAL 單元中。
Video Coding Layer
A layer in H.264/AVC and HEVC that contains coded video data.
The coded video data in VCL layer will be wraped(包起來??) under NAL for transmission.
Network Abstraction Layer
The Network Abstraction Layer (NAL) is a part of the H.264/AVC and HEVC video coding standards.
The main goal of the NAL is the provision(供應) of a "network-friendly" video representation addressing "conversational(雙向的)" (video telephony: 視頻電話) and "non conversational" (storage, broadcast, or streaming) applications.
NAL has achieved a significant improvement in application flexibility relative to prior video coding standards.
NAL units
The coded video data is organized into NAL units, each of which is effectively a packet that contains an integer number of bytes.
The first byte of each H.264/AVC NAL unit is a header byte that contains an indication of the type of data in the NAL unit.
For HEVC the header was extended to two bytes.
All the remaining bytes contain payload data of the type indicated by the header. The NAL unit structure definition specifies a generic format for use in both packet-oriented and bitstream-oriented transport systems, and a series of NAL units generated by an encoder is referred to as a NAL unit stream.
H.264中NAL unit的第一個字節表示數據的類型.
nal_unit_type:
- Coded slice : 1
- IDR : 5
- SEI : 6
- SPS : 7
- PPS : 8
每個NAL 單元包括一個原始字節序列負荷(RBSP)、一組對應于視頻編碼數據的NAL 頭信息。 NAL 單元序列的結構見圖:
NAL unit 序列的結構
VCL and Non-VCL NAL Units
NAL units are classified into VCL and non-VCL NAL units.
- The VCL NAL units
The VCL NAL units contain the data that represents the values of the samples in the video pictures. - The non-VCL NAL units
The non-VCL NAL units contain any associated additional information such as parameter sets (important header data that can apply to a large number of VCL NAL units) and supplemental enhancement information (timing information and other supplemental data that may enhance usability of the decoded video signal but are not necessary for decoding the values of the samples in the video pictures).
包含圖像數據的unit屬于VCL NAL units.
SPS、PPS、和SEI 屬于Non-VCL NAL Units;
References:
https://en.wikipedia.org/wiki/Video_Coding_Layer
https://en.wikipedia.org/wiki/Network_Abstraction_Layer
http://iphome.hhi.de/wiegand/assets/pdfs/DIC_H264_07.pdf
新一代視頻壓縮編碼標準 ——H.264/AVC 畢厚杰主編