#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "blockdsp.h"
#include "bytestream.h"
-#include "dsputil.h"
+#include "idctdsp.h"
#include "get_bits.h"
#include "internal.h"
#include "mjpeg.h"
};
typedef struct JPGContext {
- DSPContext dsp;
+ BlockDSPContext bdsp;
+ IDCTDSPContext idsp;
ScanTable scantable;
VLC dc_vlc[2], ac_vlc[2];
if (ret)
return ret;
- ff_dsputil_init(&c->dsp, avctx);
- ff_init_scantable(c->dsp.idct_permutation, &c->scantable,
+ ff_blockdsp_init(&c->bdsp, avctx);
+ ff_idctdsp_init(&c->idsp, avctx);
+ ff_init_scantable(c->idsp.idct_permutation, &c->scantable,
ff_zigzag_direct);
return 0;
const int is_chroma = !!plane;
const uint8_t *qmat = is_chroma ? chroma_quant : luma_quant;
- c->dsp.clear_block(block);
+ c->bdsp.clear_block(block);
dc = get_vlc2(gb, c->dc_vlc[is_chroma].table, 9, 3);
if (dc < 0)
return AVERROR_INVALIDDATA;
for (i = 0; i < 3; i++)
c->prev_dc[i] = 1024;
bx = by = 0;
- c->dsp.clear_blocks(c->block[0]);
+ c->bdsp.clear_blocks(c->block[0]);
for (mb_y = 0; mb_y < mb_h; mb_y++) {
for (mb_x = 0; mb_x < mb_w; mb_x++) {
if (mask && !mask[mb_x * 2] && !mask[mb_x * 2 + 1] &&
if ((ret = jpg_decode_block(c, &gb, 0,
c->block[i + j * 2])) != 0)
return ret;
- c->dsp.idct(c->block[i + j * 2]);
+ c->idsp.idct(c->block[i + j * 2]);
}
}
for (i = 1; i < 3; i++) {
if ((ret = jpg_decode_block(c, &gb, i, c->block[i + 3])) != 0)
return ret;
- c->dsp.idct(c->block[i + 3]);
+ c->idsp.idct(c->block[i + 3]);
}
for (j = 0; j < 16; j++) {