diff options
author | Diego Biurrun | 2009-07-08 21:36:33 +0000 |
---|---|---|
committer | Diego Biurrun | 2009-07-08 21:36:33 +0000 |
commit | c8f47d8b79b7ac82cd2bff6ffcc9d5168ad7e571 (patch) | |
tree | cbb26f2f7fe72e5d10d34b5881099e66cf9afad8 /libavcodec/aacpsy.c | |
parent | 99d61d340ce9b3fee4924c6719d9bf40f1766d42 (diff) |
cosmetics: Remove unnecessary {} around if/for blocks;
move statements after if/for to the next line.
Originally committed as revision 19378 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacpsy.c')
-rw-r--r-- | libavcodec/aacpsy.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index e1c449ebf4..f7e73403e9 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -140,9 +140,8 @@ static av_cold int psy_3gpp_init(FFPsyContext *ctx) { start = 0; for (g = 0; g < ctx->num_bands[j]; g++) { minscale = ath(ctx->avctx->sample_rate * start / 1024.0, ATH_ADD); - for (i = 1; i < ctx->bands[j][g]; i++) { + for (i = 1; i < ctx->bands[j][g]; i++) minscale = fminf(minscale, ath(ctx->avctx->sample_rate * (start + i) / 1024.0 / 2.0, ATH_ADD)); - } coeffs->ath[g] = minscale - minath; start += ctx->bands[j][g]; } @@ -283,19 +282,16 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel, //modify thresholds - spread, threshold in quiet - 5.4.3 "Spreaded Energy Calculation" for (w = 0; w < wi->num_windows*16; w += 16) { Psy3gppBand *band = &pch->band[w]; - for (g = 1; g < num_bands; g++) { + for (g = 1; g < num_bands; g++) band[g].thr = FFMAX(band[g].thr, band[g-1].thr * coeffs->spread_low[g-1]); - } - for (g = num_bands - 2; g >= 0; g--) { + for (g = num_bands - 2; g >= 0; g--) band[g].thr = FFMAX(band[g].thr, band[g+1].thr * coeffs->spread_hi [g]); - } for (g = 0; g < num_bands; g++) { band[g].thr_quiet = FFMAX(band[g].thr, coeffs->ath[g]); - if (wi->num_windows != 8 && wi->window_type[1] != EIGHT_SHORT_SEQUENCE) { + if (wi->num_windows != 8 && wi->window_type[1] != EIGHT_SHORT_SEQUENCE) band[g].thr_quiet = fmaxf(PSY_3GPP_RPEMIN*band[g].thr_quiet, fminf(band[g].thr_quiet, PSY_3GPP_RPELEV*pch->prev_band[w+g].thr_quiet)); - } band[g].thr = FFMAX(band[g].thr, band[g].thr_quiet * 0.25); ctx->psy_bands[channel*PSY_MAX_BANDS+w+g].threshold = band[g].thr; |