[FFmpeg-cvslog] r24227 - trunk/libavcodec/aacsbr.c
alexc
subversion
Tue Jul 13 02:49:30 CEST 2010
Author: alexc
Date: Tue Jul 13 02:49:30 2010
New Revision: 24227
Log:
aacsbr: Eliminate double precision arithmetic.
Modified:
trunk/libavcodec/aacsbr.c
Modified: trunk/libavcodec/aacsbr.c
==============================================================================
--- trunk/libavcodec/aacsbr.c Mon Jul 12 23:36:41 2010 (r24226)
+++ trunk/libavcodec/aacsbr.c Tue Jul 13 02:49:30 2010 (r24227)
@@ -1580,7 +1580,7 @@ static void sbr_gain_calc(AACContext *ac
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
+ (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;
More information about the ffmpeg-cvslog
mailing list