From 0bc01cc9fe83fe676690fd200e7d74cdab595f15 Mon Sep 17 00:00:00 2001 From: Nathan Caldwell Date: Wed, 15 Jun 2011 02:50:25 -0600 Subject: psymodel: Add channels and channel groups to the psymodel. --- libavcodec/aacpsy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libavcodec/aacpsy.c') diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index cf8f7eb914..79d708439c 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -627,7 +627,7 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel, } /* 5.6.1.3.2 "Calculation of the desired perceptual entropy" */ - ctx->pe[channel] = pe; + ctx->ch[channel].entropy = pe; desired_bits = calc_bit_demand(pctx, pe, ctx->bitres.bits, ctx->bitres.size, wi->num_windows == 8); desired_pe = PSY_3GPP_BITS_TO_PE(desired_bits); /* NOTE: PE correction is kept simple. During initial testing it had very @@ -731,7 +731,7 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel, for (w = 0; w < wi->num_windows*16; w += 16) { for (g = 0; g < num_bands; g++) { AacPsyBand *band = &pch->band[w+g]; - FFPsyBand *psy_band = &ctx->psy_bands[channel*PSY_MAX_BANDS+w+g]; + FFPsyBand *psy_band = &ctx->ch[channel].psy_bands[w+g]; psy_band->threshold = band->thr; psy_band->energy = band->energy; @@ -921,5 +921,6 @@ const FFPsyModel ff_aac_psy_model = .init = psy_3gpp_init, .window = psy_lame_window, .analyze = psy_3gpp_analyze, + .analyze_group = NULL, .end = psy_3gpp_end, }; -- cgit v1.2.3