[FFmpeg-devel] swscale merge
Michael Niedermayer
michaelni at gmx.at
Thu Jun 30 06:41:08 CEST 2011
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 ?
:)
you still dont want me to review your patches before you push them ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110630/6c6d1273/attachment.asc>
More information about the ffmpeg-devel
mailing list