comparison aacpsy.c @ 11728:907ac02ef561 libavcodec

aacenc: Fix psy logic. Set band info before determining scalefactors. Use the look ahead for windowing decision.
author alexc
date Fri, 14 May 2010 16:49:11 +0000
parents 7dd2a45249a9
children 2e7db647fef8
comparison
equal deleted inserted replaced
11727:0c98bdb71f48 11728:907ac02ef561
193 int switch_to_eight = 0; 193 int switch_to_eight = 0;
194 float sum = 0.0, sum2 = 0.0; 194 float sum = 0.0, sum2 = 0.0;
195 int attack_n = 0; 195 int attack_n = 0;
196 for (i = 0; i < 8; i++) { 196 for (i = 0; i < 8; i++) {
197 for (j = 0; j < 128; j++) { 197 for (j = 0; j < 128; j++) {
198 v = iir_filter(audio[(i*128+j)*ctx->avctx->channels], pch->iir_state); 198 v = iir_filter(la[(i*128+j)*ctx->avctx->channels], pch->iir_state);
199 sum += v*v; 199 sum += v*v;
200 } 200 }
201 s[i] = sum; 201 s[i] = sum;
202 sum2 += sum; 202 sum2 += sum;
203 } 203 }