aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/eamad.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/eamad.c
parent56afbe8dbc6e508ba279bb95db542b940284fa7d (diff)
parentc67b449bebbe0b35c73b203683e77a0a649bc765 (diff)
downloadffmpeg-35bb74900b951dccdc7481e98a00246f59ec2420.tar.gz
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/eamad.c')
-rw-r--r--libavcodec/eamad.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 6cd91e7aeb..5c47d65bd2 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -29,6 +29,7 @@
*/
#include "avcodec.h"
+#include "bswapdsp.h"
#include "get_bits.h"
#include "aandcttab.h"
#include "eaidct.h"
@@ -45,6 +46,7 @@
typedef struct MadContext {
AVCodecContext *avctx;
BlockDSPContext bdsp;
+ BswapDSPContext bbdsp;
DSPContext dsp;
AVFrame *last_frame;
GetBitContext gb;
@@ -63,6 +65,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
ff_blockdsp_init(&s->bdsp, avctx);
+ ff_bswapdsp_init(&s->bbdsp);
ff_dsputil_init(&s->dsp, avctx);
ff_init_scantable_permutation(s->dsp.idct_permutation, FF_NO_IDCT_PERM);
ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);
@@ -297,7 +300,8 @@ static int decode_frame(AVCodecContext *avctx,
buf_end - buf);
if (!s->bitstream_buf)
return AVERROR(ENOMEM);
- s->dsp.bswap16_buf(s->bitstream_buf, (const uint16_t*)buf, (buf_end-buf)/2);
+ s->bbdsp.bswap16_buf(s->bitstream_buf, (const uint16_t *) buf,
+ (buf_end - buf) / 2);
memset((uint8_t*)s->bitstream_buf + (buf_end-buf), 0, FF_INPUT_BUFFER_PADDING_SIZE);
init_get_bits(&s->gb, s->bitstream_buf, 8*(buf_end-buf));