diff options
Diffstat (limited to 'libavcodec/eamad.c')
-rw-r--r-- | libavcodec/eamad.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 4bc07394c8..8fe1575a2f 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); @@ -284,7 +287,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); init_get_bits(&s->gb, s->bitstream_buf, 8*(buf_end-buf)); for (s->mb_y=0; s->mb_y < (avctx->height+15)/16; s->mb_y++) |