Http://hi.baidu.com/learned/blog/item/202df5038c5a1b89d43f7c95.html
Introduction
AVC/H.264 is one of the latest video encoding formats defined by the MPEG-4 standard, which has the highest technical content and represents the latest technical level.
AVC/H.264 video encoding was finalized by two organizations, namely iso mpeg and itu vceg, on April 9, 264.
The AVC/H.264 standard is developed by Joint Video Team (JVT) from MPEG and VCEG experts.
:
ISO (International Organization for Standardization) International Standards Organization, which develops international production and quality standards;
MPEG (Moving Pictures Experts Group) Motion Image Expert Group;
International Telecommunication Union (ITU;
The Video Coding Experts Group video coding Expert Group, one of the sub-agencies of the United Nations, developed the H.263 format widely used in video conferencing software.
From the mpeg perspective, this standard is called the MPEG-4 part10 (ISO 14496-10), from the ITU perspective, it is called H.264 (ITU document number ). As the standard "official name", advanced video coding (AVC) is determined by a copy of the video in the audio format of Advanced Audio Coding (AAC.
AVC/H. 264 profiles
AVC/H.264 specifies a variety of different profiles: the lowest profile, major profile, extended profile, and high-end profile (these profiles are also divided into several levels ).
-The lowest profile, also known as baseline profile, supports I/P frames and only supports progressive and cavlc;
-Extended profile supports I/P/B/SP/Si frames and only supports progressive and cavlc frames;
-The main profile provides I/P/B frames, supports both progressive and interlaced frames, and also supports cavlc and cabac;
-High Profile (also called frext) added 8x8 internal prediction, custom quantization, lossless video encoding, and more YUV formats (for example,) based on the main profile ).
It may only be possible to know which profiles or functions will become the mainstream of DVDRip in the future, but I guess it will be main or high profile, which includes the following features:
Cavlc/cabac
AVC/h. 264 for the entropy coding (entropy coding) sets two more advanced functions than MPEG-4 ASP, context-Adaptive Variable Length Coding (cavlc, Adaptive Variable Length Encoding) and context-adaptive binary arithmetic coding (cabac, adaptive binary arithmetic encoding ). Cabac is AVC/h. the default 264 mode. Compared with the cavlc (also called UVLC), cabac is a more powerful compression method that can reduce the bit rate by 10-15% (especially in the case of high bit rate ). Cabac
(Similarly, cavlc) is a lossless code that does not damage the image, but it reduces the encoding and decoding speed.
Loop/Deblocking Filter
Loopfiltering plays a role in the encoding process, unlike preprocessing (such as using avisynth to act on the input end) and post-processing (using a decoder to act on the final output. It acts on the encoding of each frame, but before that, it will be used as a reference for the next frame. This solution avoids the appearance of color blocks, especially when the bit rate is low. However, this will reduce the encoding and decoding speed.
Variable block sizes/macroblock partitions (variable block size/microblock segmentation)
Unlike MPEG-4 ASP (with only inter4v/4mv, block size can change between 16x16 and 8x8), AVC/h. 264 increase the accuracy of dynamic search to 4x4 (including steps similar to 8x4 ). The block size is adaptive and variable. An excellent encoder intelligently selects the most effective block size for each microblock.
Multiple reference frames (Multiple reference frames)
Unlike MPEG-4 ASP (which can only be referenced from the previous frame), AVC/h. 264 can choose more than one frame for internal action search, that is, the encoder can choose the previous frame (like the MPEG-4 ASP), or add more front frame for reference. This is precisely because (for example, P frames may refer to the frames before the last I frame ),
New types of frames produce an IDR frame. We can understand it as an I frame that does not allow reference to the front of the subsequent frame. If multiple reference frames are used, the encoding and decoding speed will be slowed down, and encoding, decoding, and cutting can only start from IDR frames.
:
I am afraid it is not easy to understand according to the original article. Here, the translator will explain the IDR frame with his own understanding. For example, in a video, the following frame exists: I p B p I p B...
If the video contains multiple reference frames, the blue P frame is the same as the I frame (red) before the video, it may also refer to the P frame (green) Before I frame, because the scene before and after I frame may have a great contrast or even a fundamental difference, therefore, the p frame reference to the frame before the I frame will not only make no sense, but will cause many problems.
Therefore, a new type of frame is introduced, that is, IDR frame. If this video uses multiple reference frames and IDR frames, the sequence of frames will change to this: I p B p idr p B... Because the IDR frame prohibits the next frame from referencing the previous frame, the blue P frame will not reference the green P frame this time.
Weighted Prediction (weight prediction)
Weight prediction is to apply the weight on the reference frame. I'm afraid I don't quite understand this, but I will understand it more. In a gradient scenario (for example, when the screen gradually turns black), the subsequent frames are not only darker than the previous frames, but are similar in other places, so weight prediction plays a role in these areas. It should be noted that weight prediction does not apply to cross gradient (for example, gradient from one scene to another.
Rate Distortion optimisation (rdo, evaluation change optimization)
Rdo enables the encoder to select the most effective encoding method when encountering multiple different options. Rdo is not a function developed by AVC/H.264 experts, but it is the first decision method used by H.264 reference software. Other encoders can also use rdo. For example, rdo has been used in the Xvid vhq mode.
Current AVC/H.264 Problems
If you sneer at the existing AVC tool, you must have discovered some AVC problems:
-Compatibility: currently, different AVC tools support different containers ):
. MP4: MP4 is the AVC container specified by the MPGE-4 standard (ISO 14496-15. Currently, its encoders include Nero, Sorenson, envivio, and moonlight.
. Mpg: MPG is the AVC container specified by the MPEG-2 standard (ISO 13818-1, amd3. Currently, the encoders that support it are mainconcept and moonlight. (The blu-ray BD-ROM also uses this container, see the http://www.blu-ray.com for details)
. Avi: using AVI as a container is not standard and may cause incompatibility issues. The use of AVI may impede the use of some AVC functions, damage the playback quality, or reduce the decoding speed. Currently, the encoder supporting Avi includes VSS, x264 (supported by both mencoder and x264 VFW), and mpegable.
. 264/. h264: The Source image is usually referenced by the encoder output as an example. (X264 in mencoder can also be output. 264, and mp4creator can be output from Demux in .mp4)