changeset 2532:b7511e7dabb7 libavcodec

cast to uint32 as the table is uint32_t, this also worksaround a gcc or libc bug related to frexp()
author michael
date Wed, 02 Mar 2005 20:46:06 +0000
parents eed7d92a1dfc
children 06985f4138e3
files mpegaudiodec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Tue Mar 01 06:14:45 2005 +0000
+++ b/mpegaudiodec.c	Wed Mar 02 20:46:06 2005 +0000
@@ -417,7 +417,7 @@
             int e, m;
             f = pow((double)(i/4), 4.0 / 3.0) * pow(2, (i&3)*0.25);
             fm = frexp(f, &e);
-            m = FIXHR(fm*0.5);
+            m = (uint32_t)(fm*(1LL<<31) + 0.5);
             e+= FRAC_BITS - 31 + 5;
 
             /* normalized to FRAC_BITS */