[FFmpeg-devel] [PATCH] Fix bit-exactness of MMX avg_no_rnd_pixels

David Conrad lessen42
Wed Apr 15 18:41:01 CEST 2009


Hi,

As I found in VC1, the MMX versions of avg_no_rnd_pixels are not  
identical with their C counterparts. The problem is that the C  
versions use (a+b+1)>>1 to average the interpolated pixels with the  
existing pixels, while the MMX versions use the same (a+b)>>1 used for  
interpolation.

This fixes the problem by adding an OP_AVG macro to always use (a+b 
+1)>>1 where needed.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avg_no_rnd_mmx-bitexact.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090415/02c33f26/attachment.txt>
-------------- next part --------------




More information about the ffmpeg-devel mailing list