Mercurial > libavcodec.hg
comparison mpegaudiodec.c @ 3732:2c0b93338765 libavcodec
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
author | michael |
---|---|
date | Tue, 19 Sep 2006 09:31:00 +0000 |
parents | 0da2c9abe11b |
children | 32b2da1060ea |
comparison
equal
deleted
inserted
replaced
3731:8b8773577dd9 | 3732:2c0b93338765 |
---|---|
428 table_4_3_exp[i] = -e; | 428 table_4_3_exp[i] = -e; |
429 } | 429 } |
430 for(i=0; i<512*16; i++){ | 430 for(i=0; i<512*16; i++){ |
431 int exponent= (i>>4); | 431 int exponent= (i>>4); |
432 double f= pow(i&15, 4.0 / 3.0) * pow(2, (exponent-400)*0.25 + FRAC_BITS + 5); | 432 double f= pow(i&15, 4.0 / 3.0) * pow(2, (exponent-400)*0.25 + FRAC_BITS + 5); |
433 expval_table[exponent][i&15]= lrintf(f); | 433 expval_table[exponent][i&15]= llrint(f); |
434 if((i&15)==1) | 434 if((i&15)==1) |
435 exp_table[exponent]= lrintf(f); | 435 exp_table[exponent]= llrint(f); |
436 } | 436 } |
437 | 437 |
438 for(i=0;i<7;i++) { | 438 for(i=0;i<7;i++) { |
439 float f; | 439 float f; |
440 int v; | 440 int v; |