[FFmpeg-cvslog] r25566 - trunk/libavcodec/aacpsy.c
mstorsjo
subversion
Mon Oct 25 08:15:21 CEST 2010
Author: mstorsjo
Date: Mon Oct 25 08:15:21 2010
New Revision: 25566
Log:
aacenc: Fix bug in LAME windowing where only one channel got initalized
I used the same loop counter for the inner and outer initalization loops.
This caused initalization to only run for the first channel. This in turn lead
to any channel other than the first using only short blocks.
Patch by Nathan Caldwell, saintdev at gmail
Modified:
trunk/libavcodec/aacpsy.c
Modified: trunk/libavcodec/aacpsy.c
==============================================================================
--- trunk/libavcodec/aacpsy.c Mon Oct 25 06:28:36 2010 (r25565)
+++ trunk/libavcodec/aacpsy.c Mon Oct 25 08:15:21 2010 (r25566)
@@ -195,7 +195,7 @@ static float lame_calc_attack_threshold(
* LAME psy model specific initialization
*/
static void lame_window_init(AacPsyContext *ctx, AVCodecContext *avctx) {
- int i;
+ int i, j;
for (i = 0; i < avctx->channels; i++) {
AacPsyChannel *pch = &ctx->ch[i];
@@ -205,8 +205,8 @@ static void lame_window_init(AacPsyConte
else
pch->attack_threshold = lame_calc_attack_threshold(avctx->bit_rate / avctx->channels / 1000);
- for (i = 0; i < AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS; i++)
- pch->prev_energy_subshort[i] = 10.0f;
+ for (j = 0; j < AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS; j++)
+ pch->prev_energy_subshort[j] = 10.0f;
}
}
More information about the ffmpeg-cvslog
mailing list