summaryrefslogtreecommitdiff
path: root/libavcodec/apedec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-02-13 17:57:05 +0100
committerDiego Biurrun <diego@biurrun.de>2014-06-22 18:22:31 -0700
commitc67b449bebbe0b35c73b203683e77a0a649bc765 (patch)
treefef2691cbb548198024dbc1461419dfdd9d3fea2 /libavcodec/apedec.c
parent7b9ef8d701c319c26f7d0664fe977e176764c74e (diff)
dsputil: Split bswap*_buf() off into a separate context
Diffstat (limited to 'libavcodec/apedec.c')
-rw-r--r--libavcodec/apedec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index d7596195b9..344c85bff0 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -27,7 +27,7 @@
#include "libavutil/opt.h"
#include "apedsp.h"
#include "avcodec.h"
-#include "dsputil.h"
+#include "bswapdsp.h"
#include "bytestream.h"
#include "internal.h"
#include "get_bits.h"
@@ -136,7 +136,7 @@ typedef struct APEPredictor {
typedef struct APEContext {
AVClass *class; ///< class for AVOptions
AVCodecContext *avctx;
- DSPContext dsp;
+ BswapDSPContext bdsp;
APEDSPContext adsp;
int channels;
int samples; ///< samples left to decode in current frame
@@ -314,7 +314,7 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
if (ARCH_X86)
ff_apedsp_init_x86(&s->adsp);
- ff_dsputil_init(&s->dsp, avctx);
+ ff_bswapdsp_init(&s->bdsp);
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
return 0;
@@ -1452,7 +1452,8 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
av_fast_malloc(&s->data, &s->data_size, buf_size);
if (!s->data)
return AVERROR(ENOMEM);
- s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2);
+ s->bdsp.bswap_buf((uint32_t *) s->data, (const uint32_t *) buf,
+ buf_size >> 2);
memset(s->data + (buf_size & ~3), 0, buf_size & 3);
s->ptr = s->data;
s->data_end = s->data + buf_size;