[FFmpeg-devel] [PATCH 5/9] x86: simple_idct10_template: fix overflow in pass

Michael Niedermayer michael at niedermayer.cc
Tue Oct 13 15:43:57 CEST 2015

On Tue, Oct 13, 2015 at 01:33:07PM +0200, Christophe Gisquet wrote:
> Hi,
> 2015-10-13 13:10 GMT+02:00 Michael Niedermayer <michael at niedermayer.cc>:
> > hmm, iam a bit concerned that adding the rounder (which effectively is
> > 0.5) causes a overflow, that would if iam not mistaken imlpy that
> > things are very close to overflowing already without it
> It's true, but the immediate cause here is the input coeffs
> overflowing (ie, once the rounder is added, a positive value is seen
> as a negative one to pmaddwd).

have you tried using saturating additions for the rounder ?

> Otherwise, your concern is basically whether 32bits arithmetics is
> enough: then simple_idct may also overflows on x86_32.


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151013/b0b8d739/attachment.sig>

More information about the ffmpeg-devel mailing list