Browse Source

use correct rounding functions

this should fix a floating point exception on some systems
lets hope these arent missing anywhere, if so another solution must be found

Originally committed as revision 6290 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 19 years ago
parent
commit
39e1b5cf8e
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/mpegaudiodec.c

+ 2
- 2
libavcodec/mpegaudiodec.c View File

@@ -430,9 +430,9 @@ static int decode_init(AVCodecContext * avctx)
for(i=0; i<512*16; i++){
int exponent= (i>>4);
double f= pow(i&15, 4.0 / 3.0) * pow(2, (exponent-400)*0.25 + FRAC_BITS + 5);
expval_table[exponent][i&15]= lrintf(f);
expval_table[exponent][i&15]= llrint(f);
if((i&15)==1)
exp_table[exponent]= lrintf(f);
exp_table[exponent]= llrint(f);
}

for(i=0;i<7;i++) {


Loading…
Cancel
Save