[FFmpeg-devel] swscale merge

Ronald S. Bultje rsbultje at gmail.com
Thu Jun 30 06:56:43 CEST 2011


Hi,

On Wed, Jun 29, 2011 at 9:41 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
>
> On Wed, Jun 29, 2011 at 08:56:13PM -0700, Ronald S. Bultje wrote:
>> Hi,
>>
>> On Wed, Jun 29, 2011 at 8:23 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> [...]
>> > +    for (i = 0; i < width; i++)
>> > +        dst[i] = (FFMIN(dst[i],30189)*19077 - 39057361)>>14;
>> >                                ^^^^^
>> > clips the 32bit values incorrectly
>>
>> Fixed (roughly).
>>
>
>> >                                                       ^^^^^
>> > overflows
>>
>> No.
>
> it does overflow, look:
> commit e0b8fff6c7a293e35079ba1931bd19372686b3f6
> Author: Ronald S. Bultje <rsbultje at gmail.com>
> Date:   Wed Jun 29 21:04:45 2011 -0700
> ...
>  for (i = 0; i < width; i++)
> -        dst[i] = (FFMIN(dst[i],30189)*19077 - 39057361)>>14;
> +        dst[i] = (FFMIN(dst[i],30189<<4)*19077 - (39057361<<4))>>14;
>  }
>
> (30189<<4)*19077 = 9214648848
> 1<<32            = 4294967296
>
> did i forget to say, you will add this bug when you fix the other ?
> :)

Fixes again.

> you still dont want me to review your patches before you push them ?

You've never complained about post-commit review, so I won't make an
issue out of it either.

Thanks,
Ronald


More information about the ffmpeg-devel mailing list