简体   繁体   中英

Do H264 P&B frames contain pixels values?

From what I understand, the I-frames are the ones containing the actual pixels values, and the P&B frames just contain some kind of indicators on how to construct the next frames from the already decoded frames.

With that being said, shouldn't I get a completely blue video, if I've only changed the I-frames to be completely blue pictures?

Thank you!

No frames contain pixel values. After the DCT, the image is transformed and recorded in the frequency domain. B/P frames must reference something. Even if it uninitiated memory. The result of decoding in this case will be determined by the values in this memory, called the decoded picture buffer. A zeroed out DPB will be displayed as green (assumening YUV). It will not be completely green after applying the residuals from a intraframe, you will see some elements of the frame information.

No. When decoding P- and B-frames, the decoding first does a prediction based on earlier frames, but on top of this it adds a so called residual which is encoded in the P- and B-frames. It's not plain pixel values, but the difference between the prediction and the intended picture.

If the reference frames is changed to a plain color, the residual still alters color of pixels. It won't necessarily resemble the original picture much though, as it only is the difference to the original expected prediction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM