summaryrefslogtreecommitdiff
path: root/libavcodec/psymodel.c
diff options
context:
space:
mode:
authorNathan Caldwell <saintdev@gmail.com>2011-12-14 19:43:56 -0700
committerAlex Converse <alex.converse@gmail.com>2012-01-23 11:40:46 -0800
commit9b8e2a870957293898998209c6e9bed290cc9bef (patch)
tree64df91d37b8580b9b1d0b45fe91d2adf5a3846ee /libavcodec/psymodel.c
parent04af2efaae661fd48334bab52f6561450a403f20 (diff)
aacenc: Deinterleave input samples before processing.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
Diffstat (limited to 'libavcodec/psymodel.c')
-rw-r--r--libavcodec/psymodel.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c
index 49df1189e4..316076a904 100644
--- a/libavcodec/psymodel.c
+++ b/libavcodec/psymodel.c
@@ -112,19 +112,15 @@ av_cold struct FFPsyPreprocessContext* ff_psy_preprocess_init(AVCodecContext *av
return ctx;
}
-void ff_psy_preprocess(struct FFPsyPreprocessContext *ctx, const float *audio,
- float *dest, int tag, int channels)
+void ff_psy_preprocess(struct FFPsyPreprocessContext *ctx, float **audio, int channels)
{
- int ch, i;
+ int ch;
+ int frame_size = ctx->avctx->frame_size;
+
if (ctx->fstate) {
for (ch = 0; ch < channels; ch++)
- ff_iir_filter_flt(ctx->fcoeffs, ctx->fstate[tag+ch], ctx->avctx->frame_size,
- audio + ch, ctx->avctx->channels,
- dest + ch, ctx->avctx->channels);
- } else {
- for (ch = 0; ch < channels; ch++)
- for (i = 0; i < ctx->avctx->frame_size; i++)
- dest[i*ctx->avctx->channels + ch] = audio[i*ctx->avctx->channels + ch];
+ ff_iir_filter_flt(ctx->fcoeffs, ctx->fstate[ch], frame_size,
+ &audio[ch][frame_size], 1, &audio[ch][frame_size], 1);
}
}