#include "mpeg12.h"
typedef struct TqiContext {
+ AVCodecContext *avctx;
GetBitContext gb;
BlockDSPContext bdsp;
BswapDSPContext bsdsp;
int last_dc[3];
DECLARE_ALIGNED(16, int16_t, block)[6][64];
- int block_last_index[12];
} TqiContext;
static av_cold int tqi_decode_init(AVCodecContext *avctx)
int ret = ff_mpeg1_decode_block_intra(&t->gb,
t->intra_matrix,
t->intra_scantable.permutated,
- t->last_dc, block[n], n, 1, t->block_last_index);
- if (ret < 0)
+ t->last_dc, block[n], n, 1);
+ if (ret < 0) {
+ av_log(t->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n",
+ t->mb_x, t->mb_y);
return -1;
+ }
}
return 0;
AVFrame *frame = data;
int ret, w, h;
+ t->avctx = avctx;
+
w = AV_RL16(&buf[0]);
h = AV_RL16(&buf[2]);
tqi_calculate_qtable(t, buf[4]);