[FFmpeg-devel] [PATCH] Use more appropriate types when decoding vorbisfloats
Michael Niedermayer
michaelni
Sat Jul 24 03:01:05 CEST 2010
On Fri, Jul 23, 2010 at 11:45:08PM +0100, M?ns Rullg?rd wrote:
> Alex Converse <alex.converse at gmail.com> writes:
>
> > Reduces object code by 56 bytes on x86_64
> >
> > Index: libavcodec/vorbis_dec.c
> > ===================================================================
> > --- libavcodec/vorbis_dec.c (revision 24471)
> > +++ libavcodec/vorbis_dec.c (working copy)
> > @@ -178,11 +178,11 @@
> >
> > static float vorbisfloat2float(uint_fast32_t val)
> > {
> > - double mant = val & 0x1fffff;
> > - long exp = (val & 0x7fe00000L) >> 21;
> > + float mant = val & 0x1fffff;
> > + int exp = (val & 0x7fe00000L) >> 21;
> > if (val & 0x80000000)
> > mant = -mant;
> > - return ldexp(mant, exp - 20 - 768);
> > + return ldexpf(mant, exp - 20 - 768);
> > }
>
> I bet at least two BSDs are missing the f version of ldexp, but we can
> deal with that.
should be 4 bsds now given their average reproduction rate
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Thouse who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100724/aa46c108/attachment.pgp>
More information about the ffmpeg-devel
mailing list