Mercurial > libavcodec.hg
diff mpegaudiodec.c @ 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 | e25782262d7d |
children | ac78b35aa838 |
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 */