comparison aacdec.c @ 12154:8a50de6cf3f1 libavcodec

aacdec: Eliminate the use of doubles in decode_cce().
author alexc
date Mon, 12 Jul 2010 21:36:10 +0000
parents 862dd5062000
children 7f8b11d9c831
comparison
equal deleted inserted replaced
12153:862dd5062000 12154:8a50de6cf3f1
1502 int gain = 0; 1502 int gain = 0;
1503 float gain_cache = 1.; 1503 float gain_cache = 1.;
1504 if (c) { 1504 if (c) {
1505 cge = coup->coupling_point == AFTER_IMDCT ? 1 : get_bits1(gb); 1505 cge = coup->coupling_point == AFTER_IMDCT ? 1 : get_bits1(gb);
1506 gain = cge ? get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60: 0; 1506 gain = cge ? get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60: 0;
1507 gain_cache = pow(scale, -gain); 1507 gain_cache = powf(scale, -gain);
1508 } 1508 }
1509 if (coup->coupling_point == AFTER_IMDCT) { 1509 if (coup->coupling_point == AFTER_IMDCT) {
1510 coup->gain[c][0] = gain_cache; 1510 coup->gain[c][0] = gain_cache;
1511 } else { 1511 } else {
1512 for (g = 0; g < sce->ics.num_window_groups; g++) { 1512 for (g = 0; g < sce->ics.num_window_groups; g++) {
1519 t = gain += t; 1519 t = gain += t;
1520 if (sign) { 1520 if (sign) {
1521 s -= 2 * (t & 0x1); 1521 s -= 2 * (t & 0x1);
1522 t >>= 1; 1522 t >>= 1;
1523 } 1523 }
1524 gain_cache = pow(scale, -t) * s; 1524 gain_cache = powf(scale, -t) * s;
1525 } 1525 }
1526 } 1526 }
1527 coup->gain[c][idx] = gain_cache; 1527 coup->gain[c][idx] = gain_cache;
1528 } 1528 }
1529 } 1529 }