1

I understand that B frames either find the motion vector of the best matching block from either the past or the future reference frame. And P frames finds the motion vector of the best matching block from the previous reference frame. So how can B frames result in less overhead and better compression compared to P frames?

0

1 Answer 1

4

Presumably you're talking about MPEG compression, or some variant such as MPEG 4 part 10 (aka H.264).

In this case, prediction in a B-frame doesn't just choose the better of a preceding or following frame. Rather, it does a linear interpolation between blocks from the two frames, then encodes the difference from that.

You frequently see relatively linear transformations between frames, and when this happens, the linear interpolation used with B frames can give a significantly better prediction of the current block than either the preceding or subsequent frame could have individually.

6
  • I am trying to understand bidirectional prediction in general. I have read that the prediction error occurs less in case since B frames have more options to refer to. Does this mean using future frames as reference provides greater accuracy compared to past frames? Sorry for the ignorance but I am trying to first understand the wisdom behind using bidirectional prediction.
    – Sara
    Feb 12, 2015 at 5:01
  • @Sara: It mostly means that using data from two frames instead of one improves accuracy (or can improve accuracy, anyway). Having them "surround" the data you want to predict does help though (especially, as mentioned in the answer, when you have a relatively linear transformation between frames). Feb 12, 2015 at 5:03
  • @Sara B-frames reference the past and the future. If the intermediate B-frame was a linear function of the past reference frame and the future reference frame, it could be essentially empty; it only has to code the difference between the interpolated frame and the real thing.
    – hobbs
    Feb 12, 2015 at 6:25
  • @hobbs: Not quite--it would also have to encode the references to the macro-blocks in the reference frames. Feb 12, 2015 at 6:29
  • @JerryCoffin depends on the details of the format. You could imagine it to be super simple like MPEG-2. But in any case I'm hand-waving here :)
    – hobbs
    Feb 12, 2015 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.