summaryrefslogtreecommitdiff
path: root/libavcodec/ra144dec.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2012-03-04 13:28:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-10 21:45:55 +0100
commitc3390fd56cf55259ea7665ecea6c8aeddf56e2fc (patch)
tree75bec46420b7d4a9eddbfa499af648922a8bc93c /libavcodec/ra144dec.c
parentdfc99ca04d7698b8f4101dd4f017c1b023ad95f8 (diff)
ra144: use scalarproduct_int16
The buffer holding the coefficients must be padded with 0 so as to use DSP functions that may overread. Currently, the SSE2/3 versions is an example, as they process batches of 16 bytes. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ra144dec.c')
-rw-r--r--libavcodec/ra144dec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
index b7add7f365..03ab9f58c4 100644
--- a/libavcodec/ra144dec.c
+++ b/libavcodec/ra144dec.c
@@ -34,10 +34,13 @@ static av_cold int ra144_decode_init(AVCodecContext * avctx)
RA144Context *ractx = avctx->priv_data;
ractx->avctx = avctx;
+ ff_dsputil_init(&ractx->dsp, avctx);
ractx->lpc_coef[0] = ractx->lpc_tables[0];
ractx->lpc_coef[1] = ractx->lpc_tables[1];
+ AV_ZERO128(ractx->buffer_a+BLOCKSIZE);
+
avctx->channels = 1;
avctx->channel_layout = AV_CH_LAYOUT_MONO;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;