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
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