summaryrefslogtreecommitdiff
path: root/libavcodec/apedec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-23 13:23:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-23 13:31:26 +0200
commit35bb74900b951dccdc7481e98a00246f59ec2420 (patch)
tree4e1545a104d5d0eb3194d84f9df6318841c39675 /libavcodec/apedec.c
parent56afbe8dbc6e508ba279bb95db542b940284fa7d (diff)
parentc67b449bebbe0b35c73b203683e77a0a649bc765 (diff)
Merge commit 'c67b449bebbe0b35c73b203683e77a0a649bc765'
* commit 'c67b449bebbe0b35c73b203683e77a0a649bc765': dsputil: Split bswap*_buf() off into a separate context Conflicts: configure libavcodec/4xm.c libavcodec/ac3dec.c libavcodec/ac3dec.h libavcodec/apedec.c libavcodec/eamad.c libavcodec/flacenc.c libavcodec/fraps.c libavcodec/huffyuv.c libavcodec/huffyuvdec.c libavcodec/motionpixels.c libavcodec/truemotion2.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 4e25b44e9e..383b7fe669 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -27,7 +27,7 @@
#include "libavutil/opt.h"
#include "lossless_audiodsp.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;
LLAudDSPContext adsp;
int channels;
int samples; ///< samples left to decode in current frame
@@ -293,7 +293,7 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
s->predictor_decode_stereo = predictor_decode_stereo_3950;
}
- ff_dsputil_init(&s->dsp, avctx);
+ ff_bswapdsp_init(&s->bdsp);
ff_llauddsp_init(&s->adsp);
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
@@ -1443,7 +1443,8 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
av_fast_padded_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;