summaryrefslogtreecommitdiff
path: root/libavcodec/aacpsy.c
diff options
context:
space:
mode:
authorNathan Caldwell <saintdev@gmail.com>2011-06-15 02:50:25 -0600
committerAlex Converse <alex.converse@gmail.com>2011-06-29 14:28:52 -0700
commit0bc01cc9fe83fe676690fd200e7d74cdab595f15 (patch)
tree635bc129c5d29085f9e1692bdf54233e76cbe2a3 /libavcodec/aacpsy.c
parenta3e1f80e8ba28151ea5d84c15ecf454b8170aa13 (diff)
psymodel: Add channels and channel groups to the psymodel.
Diffstat (limited to 'libavcodec/aacpsy.c')
-rw-r--r--libavcodec/aacpsy.c5
1 files changed, 3 insertions, 2 deletions
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,
};