[Ffmpeg-devel] Snow motion blocks

Tuukka Toivonen tuukkat
Fri Apr 15 14:04:57 CEST 2005

On Fri, 15 Apr 2005, Michael Niedermayer wrote:

> one situation where bilinear might be supperior is very noisy video [...]

Indeed, as bilinear smoothes the image more than higher order filter
which is designed just to translate the image.

It might be useful to filter input video with some specially
designed noise-removal filter before using it for motion compensation.
Even more useful would be to remove noise before encoding (unless
there are people who like noise).

If you have SSD(x,y) (sum of squared differences, which is closely related 
to PSNR) for a reference block at integer MV (x,y) then the SSD at
(x+1/2,y) after bilinearly interpolating the reference block into half
pixel location is actually SSD(x,y)/2 + SSD(x+1,y)/2 - D(x,y)/4
where D(x,y) is the squared sum of differentials at the reference blocks...
in other words, it is the difference after subtracting the two reference
blocks at integer pixels locations. If the blocks are very similar,
D is small, but if the picture has noise, the D term is large, and
therefore SSD is much smaller and PSNR higher at the half-pixel location.

That about the mathematical explanation... details are in
(sorry for the ad :)

More information about the ffmpeg-devel mailing list