summaryrefslogtreecommitdiff
path: root/libavcodec/takdec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-01-16 17:30:19 +0100
committerDiego Biurrun <diego@biurrun.de>2014-06-22 06:20:15 -0700
commit9a9e2f1c8aa4539a261625145e5c1f46a8106ac2 (patch)
tree8df94d9ee621e07b5e5f9aad954cc68d92105e88 /libavcodec/takdec.c
parentca1e36a8e4cd416142487071dbca734567bdaddf (diff)
dsputil: Split audio operations off into a separate context
Diffstat (limited to 'libavcodec/takdec.c')
-rw-r--r--libavcodec/takdec.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 0d2dcbbdb2..b0e84ea3c0 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -28,8 +28,8 @@
#include "libavutil/internal.h"
#include "libavutil/samplefmt.h"
#include "tak.h"
+#include "audiodsp.h"
#include "avcodec.h"
-#include "dsputil.h"
#include "internal.h"
#include "unary.h"
@@ -45,7 +45,7 @@ typedef struct MCDParam {
typedef struct TAKDecContext {
AVCodecContext *avctx; // parent AVCodecContext
- DSPContext dsp;
+ AudioDSPContext adsp;
TAKStreamInfo ti;
GetBitContext gb; // bitstream reader initialized to start at the current frame
@@ -172,7 +172,7 @@ static av_cold int tak_decode_init(AVCodecContext *avctx)
{
TAKDecContext *s = avctx->priv_data;
- ff_dsputil_init(&s->dsp, avctx);
+ ff_audiodsp_init(&s->adsp);
s->avctx = avctx;
@@ -484,8 +484,8 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
for (i = 0; i < subframe_size - filter_order; i++) {
int v = 1 << (filter_quant - 1);
- v += s->dsp.scalarproduct_int16(&s->residues[i], filter,
- FFALIGN(filter_order, 16));
+ v += s->adsp.scalarproduct_int16(&s->residues[i], filter,
+ FFALIGN(filter_order, 16));
v = (av_clip(v >> filter_quant, -8192, 8191) << dshift) - *decoded;
*decoded++ = v;
@@ -654,8 +654,8 @@ static int decorrelate(TAKDecContext *s, int c1, int c2, int length)
for (i = 0; i < length2; i++) {
int v = 1 << 9;
- v += s->dsp.scalarproduct_int16(&s->residues[i], filter,
- FFALIGN(filter_order, 16));
+ v += s->adsp.scalarproduct_int16(&s->residues[i], filter,
+ FFALIGN(filter_order, 16));
p1[i] = (av_clip(v >> 10, -8192, 8191) << dshift) - p1[i];
}