aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/eatqi.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/eatqi.c')
-rw-r--r--libavcodec/eatqi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 31a8dbe172..c6d804d900 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -28,6 +28,7 @@
#include "avcodec.h"
#include "blockdsp.h"
+#include "bswapdsp.h"
#include "get_bits.h"
#include "aandcttab.h"
#include "eaidct.h"
@@ -37,6 +38,7 @@
typedef struct TqiContext {
MpegEncContext s;
+ BswapDSPContext bsdsp;
void *bitstream_buf;
unsigned int bitstream_buf_size;
DECLARE_ALIGNED(16, int16_t, block)[6][64];
@@ -48,6 +50,7 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx)
MpegEncContext *s = &t->s;
s->avctx = avctx;
ff_blockdsp_init(&s->bdsp, avctx);
+ ff_bswapdsp_init(&t->bsdsp);
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->intra_scantable, ff_zigzag_direct);
@@ -124,7 +127,8 @@ static int tqi_decode_frame(AVCodecContext *avctx,
buf_end - buf);
if (!t->bitstream_buf)
return AVERROR(ENOMEM);
- s->dsp.bswap_buf(t->bitstream_buf, (const uint32_t*)buf, (buf_end-buf)/4);
+ t->bsdsp.bswap_buf(t->bitstream_buf, (const uint32_t *) buf,
+ (buf_end - buf) / 4);
init_get_bits(&s->gb, t->bitstream_buf, 8*(buf_end-buf));
s->last_dc[0] = s->last_dc[1] = s->last_dc[2] = 0;