[FFmpeg-cvslog] r23119 - trunk/libavcodec/mpegaudiodec.c

Michael Niedermayer michaelni
Thu May 13 21:25:19 CEST 2010


On Thu, May 13, 2010 at 02:48:38PM -0400, Alex Converse wrote:
> On Thu, May 13, 2010 at 2:06 PM, michael <subversion at mplayerhq.hu> wrote:
> > Author: michael
> > Date: Thu May 13 20:06:44 2010
> > New Revision: 23119
> >
> > Log:
> > 1.0 and the resulting exactly representable value must be marked as float as well,
> > gcc is hopelessly trash.
> >
> 
> "1.0" is a double even though it can fit in float.
> 
> The fact that after the division, the result can still fit exactly in
> a float is a special case based on the form of the divisor.

its 1 and litterally so in all cases and at compile time
see:
    in0 += SHR(in4, 1);
        t3 = in1[2*0] + SHR(in1[2*6],1);
        tmp1[ 6] = t1 - SHR(t2,1);


> 
> The compiler can't do better here if the macro is used in further
> arithmetic with doubles and with integers the situation is tenuous at
> best.
> 
> There are plenty of places where gcc screws the pooch but this is one
> optimization I would not have reasonable expectations for any good
> compiler to make without sloppy math flags or
> -fdowhatimeannotwhatisay.
> 
> Had you not exercised your prerogative to just commit this all at
> once, you could have gotten some review from those of us who regularly
> write floating point code.

we will see how many people review the code which can be done now as
well as it could have been before.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20100513/1ad6b087/attachment.pgp>



More information about the ffmpeg-cvslog mailing list