Hi3516a-detailed analysis of h265 Nalu type

Preface

In the firmware developed by HiSilicon hi3516a, there is an example of H265 encoding, which is involved in the application example of SAMPLE_VENC_1080P_CLASSIC (HI_VOID), so this article will analyze the types of H265 nal header and nalu.

h265 Nalu type analysis

Insert picture description here

F

F: Must be 0, which means valid; if it is 1, it means invalid.

Insert picture description here

Type

Type:6-bits NALType Determines the type of NAL. There are 32 types of VCL NAL and non-VCL NAL. 0-31 are vcl nal units; 32-63 are non-vcl nal units. VCL refers to the data stream that carries encoded data, and non-VCL is the control data stream.
Insert picture description here
The types of vcl nal units (0-31) are as follows:
Insert picture description here
The types of non-vcl nal units (32-63) are as follows:
Insert picture description here
Non- VCL NAL Type : The types of Non-VCL NAL are shown in the figure above. Parameter sets include VPS, SPS and PPS.

Delimiters (delimiters) include AUD_NUT, EOS_NUT, EOB_NUT, where AUD_NUT is used to indicate the boundary of the access unit, so it has the same TID as the VCL NAL in the access unit and is the first NAL in the access unit. EOS_NUT and EOB_NUT indicate the end of CVS and bitstream respectively. Their TID is 0, there is no payload, and only 2-Type header.
Filler Data has no effect on the decoding process. The payload is composed of a string of '11111111' and 1-Type '10000000', which is mainly used to fill SEI : supplemental enhancement informatyion, auxiliary enhancement information, and optional decoding support metadata. . In HEVC, SEI is prefix (SEI must be before all VCL NAL of Access unit) or suffix (SEI can be after VCL NAL of Access unit), and some of SEI is only valid for current Access unit, and some of its scope may be Multiple Access units or even the entire SVC. VUI is optional information in SPS. VUI does not directly affect the decoding process, but provides two aspects of information: 1. Display information of the decoded image, including information such as aspect ratio, scanning, and time sharing; 2. Limit the decoding end Some information, including tiles, MV, reference images, etc.

LayerID

LayerID: Represents the layer to which the Access unit where the NAL is located. This field is set for the continued expansion of HEVC. That is, it is currently 0, which may be used in future extensions.
Insert picture description here

TIME

Insert picture description here
Insert picture description here

H265 frame type analysis

It is different from &0x1f of 264.
265 is:
int type = (code & 0x7E)>>1;
00 00 00 01 is the NALU header, there are 6 common types:

According to H265 NALU type definition analysis:
(1) Control data flow:
The value of nuh_unit_type of 00 00 00 01 40 01 is 32, the semantics is the value of nuh_unit_type of video parameter set VPS
00 00 00 01 42 01, the semantics is sequence
The value of nuh_unit_type in the parameter set SPS 00 00 00 01 44 01 is 34, the semantics is the value of nuh_unit_type in the image parameter set PPS
00 00 00 01 4E 01 is 39, and the semantics is supplementary enhanced information SEI
Insert picture description here
Insert picture description here
VPS, SPS, PPS: of the three The structure and relationship are shown in the figure below:
Insert picture description here

(2) The data stream of the encoded data:
The value of nuh_unit_type of 00 00 00 01 26 01 is 19, and the semantics is the SS encoded data of IDR images that may have RADL images.
The value of nuh_unit_type of IDR 00 00 00 01 02 01 is 1, semantics Is the referenced post image, and is non-TSA, non-STSA SS encoded data
Insert picture description hereInsert picture description here

Reference: http://www.cnblogs.com/DwyaneTalk/p/5711430.html

Guess you like

Origin blog.csdn.net/u014470361/article/details/89541544