summaryrefslogtreecommitdiff
path: root/libavcodec/aacsbr.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-07-13 00:49:30 +0000
committerAlex Converse <alex.converse@gmail.com>2010-07-13 00:49:30 +0000
commitafa4248e4ec0327992ed0ee8bb27f9d297a89a32 (patch)
tree506bdef6f9c5134a8b68e37484c2b4e4169754b9 /libavcodec/aacsbr.c
parent1ac6da39889159b2d9de5d782dff3cf06b9d5d50 (diff)
downloadffmpeg-afa4248e4ec0327992ed0ee8bb27f9d297a89a32.tar.gz
aacsbr: Eliminate double precision arithmetic.
Originally committed as revision 24227 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacsbr.c')
-rw-r--r--libavcodec/aacsbr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index ca5c52cce3..050305a3fe 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -1580,7 +1580,7 @@ static void sbr_gain_calc(AACContext *ac, SpectralBandReplication *sbr,
sum[1] += sbr->e_curr[e][m];
}
gain_max = limgain[sbr->bs_limiter_gains] * sqrtf((FLT_EPSILON + sum[0]) / (FLT_EPSILON + sum[1]));
- gain_max = FFMIN(100000, gain_max);
+ gain_max = FFMIN(100000.f, gain_max);
for (m = sbr->f_tablelim[k] - sbr->kx[1]; m < sbr->f_tablelim[k + 1] - sbr->kx[1]; m++) {
float q_m_max = sbr->q_m[e][m] * gain_max / sbr->gain[e][m];
sbr->q_m[e][m] = FFMIN(sbr->q_m[e][m], q_m_max);
@@ -1594,7 +1594,7 @@ static void sbr_gain_calc(AACContext *ac, SpectralBandReplication *sbr,
+ (delta && !sbr->s_m[e][m]) * sbr->q_m[e][m] * sbr->q_m[e][m];
}
gain_boost = sqrtf((FLT_EPSILON + sum[0]) / (FLT_EPSILON + sum[1]));
- gain_boost = FFMIN(1.584893192, gain_boost);
+ gain_boost = FFMIN(1.584893192f, gain_boost);
for (m = sbr->f_tablelim[k] - sbr->kx[1]; m < sbr->f_tablelim[k + 1] - sbr->kx[1]; m++) {
sbr->gain[e][m] *= gain_boost;
sbr->q_m[e][m] *= gain_boost;