[Ffmpeg-devel] [Ffmpeg-devel-old] [patch] bug fix in mc_block

Michael Niedermayer michaelni
Sun Apr 17 11:30:29 CEST 2005


Hi

On Saturday 16 April 2005 22:55, Yartrebo wrote:
> I've noticed that mc_block does not clip values to the 0-255 range but
> instead allows wrap around. For a normal non-animated and clean source
> file (coast_guard_cif), the bitrate loss is about .2% (coming only from
> edge motion blocks).
>
> The worst case I could find was using mc_block for all blocks, and using
> my Caillou clip [cartoon with about half of an average frame being
> white]. The bug caused a bitrate bloat of about 225%!!! Not only that,
> but psnr was reduced by about 1.00.
>
> By not clipping values, they can sometimes overflow or underflow, which
> completely ruins motion compensation for that block.
>
> This is probably why my 'simple' linear interpolation algorithm worked
> so well before, since linear interpolation cannot cause overflow even
> without clipping.
>
> My attached patch fixes the overflow bug.

applied, and please include any regression test checksum changes in your 
patches too in the future


>
> I'm also attaching a patch for AUTHORS, since I neglected to send such a
> file for my previous patches.

ok, but that patch is for MPlayer/main/AUTHORS ...

[...]
-- 
Michael

"nothing is evil in the beginning. Even Sauron was not so." -- Elrond





More information about the ffmpeg-devel mailing list