From c67b449bebbe0b35c73b203683e77a0a649bc765 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 13 Feb 2014 17:57:05 +0100 Subject: dsputil: Split bswap*_buf() off into a separate context --- libavcodec/apedec.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libavcodec/apedec.c') diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index d759619..344c85b 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; -- cgit v1.1