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

David Conrad lessen42
Wed Apr 15 21:10:32 CEST 2009


On Apr 15, 2009, at 1:27 PM, Michael Niedermayer wrote:

> On Wed, Apr 15, 2009 at 12:41:01PM -0400, David Conrad wrote:
>> 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.
>
> probably ok

Applied.



More information about the ffmpeg-devel mailing list