*/
#include "avcodec.h"
+#include "blockdsp.h"
+#include "bswapdsp.h"
#include "get_bits.h"
#include "aandcttab.h"
#include "eaidct.h"
typedef struct TqiContext {
MpegEncContext s;
+ BswapDSPContext bsdsp;
void *bitstream_buf;
unsigned int bitstream_buf_size;
DECLARE_ALIGNED(16, int16_t, block)[6][64];
TqiContext *t = avctx->priv_data;
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);
static int tqi_decode_mb(MpegEncContext *s, int16_t (*block)[64])
{
int n;
- s->dsp.clear_blocks(block[0]);
+ s->bdsp.clear_blocks(block[0]);
for (n=0; n<6; n++)
if (ff_mpeg1_decode_block_intra(s, block[n], n) < 0)
return -1;
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;