I know that motion estimation has to do with calculating motion vectors, but where does motion compensation come into play. Can't we just do it with motion vectors, since, we are still calculating the differences in the displacement of the blocks in the reference and the target frames.
Motion compensation is the use of the motion estimation information to achieve compression. If you can describe the motion, then you only have to describe the changes that occur after compensating for that motion.
I used this article as a primer. Basically the first involves how you determine what movement is happening and the other is then used to determine what information changed after the movement and to describe what changes need to occur for playback.
My understanding of their differences:
- It is to generate the motion vector(s).
- It's in the encoder only, since decoder only consumes the motion vector data.
- It's using existing motion vector(s) information, along with the reference image(s), to generate a predicted microblock. (The predicted block will be added to the residue block to generate a decoded microblock.)
- This generation step can be a simple x/y translation of the single reference block. But it could be more complex when dealing with multiple reference frames/blocks or field based coding.
- For example, in H.264, you can have two MVs with different weight, thus the compensation step to generate a predicted block would be like
PB = w1*RB1 + w2*RB2.
- It's in the decoder. But since there's a mini-decoder in the encoder. So the encoder has this component as well.