当前位置:网站首页>H. 264 concept

H. 264 concept

2022-06-11 18:17:00 Chenxiaoshuai HH

One 、H.264 Concept

H.264 By ITU-T Video expert group and ISO/IEC A joint group of motion picture experts (JVT,Joint Video Team) Proposed Video codec standard for highly compressed data .

Two 、H.264 Data format

H.264 By ** Video coding layer (VCL) and Network adaptation layer (NAL)** form .

①VCL:H264 code / The core of compression , Mainly responsible for encoding video data / Compress , Re segmentation .

②NAL The basic unit of a layer is NALU( Network abstraction layer unit )
blog.csdnimg.cn/25b161a63ce74813a55a1b090a51d6ea.png)
NALU = NALU header + NALU payload
(1) General structure :
 Insert picture description here
RBSP: Raw data ( It could be encoded video data , It could also be other data ), Add... For alignment “0”
bits .

(2)NALU The head of the (8bit)
 Insert picture description here
(3)nalu The type of
![ Insert picture description here ](https://img-

3、 ... and 、VCL How to manage H.264 Video data

① Compress : forecast ( Intra prediction and inter prediction )–>DCT Change and quantification –> Bitstream coding .
② Segmentation data , Mainly for the third step .“ section (slice)”、“ Macroblock (macroblock)” Is in VCL The concept of , On the one hand, improve coding efficiency and reduce coding rate , On the other hand, improve the flexibility of network transmission .
③ Package as NAL.
VCL Finally, it will be packaged as NAL.

Four 、NAL The data structure of the header

 Insert picture description here
 Insert picture description here
 Insert picture description here

5、 ... and 、H.264 Bitstream structure

H.264 = start_code + NALU
(start_code:00000001 or 000001)
 Insert picture description here
 Insert picture description here

6、 ... and 、H.264 Three frames

Most video compression , All the frames are classified , Mainly divided into I frame 、P frame 、B frame , These are not H264 Unique , We just H264 Let's talk about these categories .

①I frame :Intra-coded picture, Represents a keyframe , Full intra compression . Compressing this frame does not require reference to other frames .

②P frame :Predicted picture, Forward prediction frame , To compress this frame, you need to refer to the previous one I/P Frame as reference , Do motion estimation , In order to get a comparison I Larger compression ratio of frames .

③B frame :Bi-predictive picture, Two way prediction frame . Compressing this frame not only refers to the previous I/P frame , You also need to refer to the following one P frame , Perform bidirectional motion estimation , In some cases, a ratio of P Higher compression ratio of frames .

Compression ratio :B > P > I
image quality :I > P > B ( Because the motion vector obtained from motion estimation will be quantized , Loss introduced . And P、B The frame may refer to other P frame ( chain ), Thus, it is easier to cause error accumulation and error drift .)

7、 ... and 、 Decode timestamp and display timestamp

 Insert picture description here

原网站

版权声明
本文为[Chenxiaoshuai HH]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206111800115220.html