put_bits(&s->pb, 4, chan_el_counter[tag]++);
for (ch = 0; ch < chans; ch++)
coeffs[ch] = cpe->ch[ch].coeffs;
- s->psy.model->analyze_group(&s->psy, start_ch, coeffs, wi);
+ s->psy.model->analyze(&s->psy, start_ch, coeffs, wi);
for (ch = 0; ch < chans; ch++) {
s->cur_channel = start_ch * 2 + ch;
s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
/**
* Calculate band thresholds as suggested in 3GPP TS26.403
*/
-static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
- const float *coefs, const FFPsyWindowInfo *wi)
+static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
+ const float *coefs, const FFPsyWindowInfo *wi)
{
AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
AacPsyChannel *pch = &pctx->ch[channel];
memcpy(pch->prev_band, pch->band, sizeof(pch->band));
}
-static void psy_3gpp_analyze_group(FFPsyContext *ctx, int channel,
+static void psy_3gpp_analyze(FFPsyContext *ctx, int channel,
const float **coeffs, const FFPsyWindowInfo *wi)
{
int ch;
FFPsyChannelGroup *group = ff_psy_find_group(ctx, channel);
for (ch = 0; ch < group->num_ch; ch++)
- psy_3gpp_analyze(ctx, channel + ch, coeffs[ch], &wi[ch]);
+ psy_3gpp_analyze_channel(ctx, channel + ch, coeffs[ch], &wi[ch]);
}
static av_cold void psy_3gpp_end(FFPsyContext *apc)
.init = psy_3gpp_init,
.window = psy_lame_window,
.analyze = psy_3gpp_analyze,
- .analyze_group = psy_3gpp_analyze_group,
.end = psy_3gpp_end,
};
FFPsyWindowInfo (*window)(FFPsyContext *ctx, const int16_t *audio, const int16_t *la, int channel, int prev_type);
/**
- * Perform psychoacoustic analysis and set band info (threshold, energy) for a single channel.
- *
- * @param ctx model context
- * @param channel audio channel number
- * @param coeffs pointer to the transformed coefficients
- * @param wi window information
- */
- void (*analyze)(FFPsyContext *ctx, int channel, const float *coeffs, const FFPsyWindowInfo *wi);
-
- /**
* Perform psychoacoustic analysis and set band info (threshold, energy) for a group of channels.
*
* @param ctx model context
* @param coeffs array of pointers to the transformed coefficients
* @param wi window information for the channels in the group
*/
- void (*analyze_group)(FFPsyContext *ctx, int channel, const float **coeffs, const FFPsyWindowInfo *wi);
+ void (*analyze)(FFPsyContext *ctx, int channel, const float **coeffs, const FFPsyWindowInfo *wi);
void (*end) (FFPsyContext *apc);
} FFPsyModel;