H.264 Basic Concepts

Source: Internet
Author: User
Image , Field , Frame1 ). frame; scan images line by line 2 ). field. 3). pictue: both the field and frame can be considered as the top and bottom fields of the image respectively encoded. The macro block corresponding to the position is called a macro block pair. The top field predicts the encoded top/bottom field. The base field is generally the top field prediction code. IDR Frame and I Frame Difference :Because 264 adopts multi-frame prediction, it is possible that P after I frame under the display order will refer to the frame before I frame, so that if only I frame is found in the random access, the reference frame of the subsequent frame may be unvailable, and IDR is such a special I frame. It is defined to ensure that the subsequent P does not refer to the previous frame, random Access is safe. IDRIn fact, it is equivalent to sending a signal to the decoder to clear the reference buffer. As mentioned above, all the encoded frames before this frame cannot be referenced by the Inter. I Frame and P The concept of frame is better understood, B The frame concept is a bit vague, but only the added B Frame image quality is better, right? B How do I understand frames?Frame B has four reference modes in the MPEG-4. If both the image compression before and after the reference is recorded, the difference between the pixel value of the front image + pixel value of the back image)/2 is recorded, that is, the difference between the image and the average image. Therefore, the number of Difference values recorded is the same as that of P frames. There is only one difference, which is not increased. Because frame B is in the middle of the front and back frames, it uses the "average of the front and back frames", that is, the "median of the front and back frames", as the predicted value (what is the pixel value of frame B? If there is an error, record the difference value). In this way, the predicted value is closer to the current real B-frame value than the previous image, the difference value that needs to be recorded will be very small or even unnecessary, so we can save a lot of BITs and increase the compression ratio. In addition to compression ratio, B-frame also has some influence on image quality. Because B-frame is similar to the image before and after reference, it has an interpolation effect, which can reduce noise. Images, fields, and framesA video image can be encoded into one or more pieces. Each piece contains an integer Macro Block (MB), that is, each piece must have at least one MB, at most, each piece contains a macro block of the entire image. In short, the number of macro blocks per image is not necessarily fixed. The purpose of the design is to limit the spread and transmission of codes, so that the codes are independent of each other. The prediction of a piece cannot take the Macro Block in other pieces as the reference image, so that the prediction error in a piece won't be transmitted to other pieces. There are five different types of video encoding, except for I, P, and B, SP and Si. SP (switching P) is used for switching between different encoding streams. It contains P and/or I macro blocks. It is a required switch in the extended grade. It contains a special type of encoding macro block called si macro block. Si is also a necessary function in the extended grade.

A slice is a subset of several Mb in an encoded image. It can contain one or more slices. In a single image group, the MB size of each image is encoded according to the grating scan sequence. If each image is in only one image group, all MB in the image is encoded according to the grating scan Order (unless Aso is used, that is, the slices in the Encoding Frame can follow any decoding program ). There is also a group called flexible macro block Order (FMO), which can be used with flexible methods, map the encoding MB sequence to the allocation of MB in the decoded image by the ing between MB and the chip group, which indicates the part group of each MB.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.