mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avcodec/mjpegdec: Avoid using HpelDSPContext
It is quite big and we only need one function from it. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1427,7 +1427,7 @@ static av_always_inline void mjpeg_copy_block(MJpegDecodeContext *s,
|
||||
int linesize, int lowres)
|
||||
{
|
||||
switch (lowres) {
|
||||
case 0: s->hdsp.put_pixels_tab[1][0](dst, src, linesize, 8);
|
||||
case 0: s->copy_block(dst, src, linesize, 8);
|
||||
break;
|
||||
case 1: copy_block4(dst, src, linesize, linesize, 4);
|
||||
break;
|
||||
|
||||
@@ -119,8 +119,8 @@ typedef struct MJpegDecodeContext {
|
||||
int force_pal8;
|
||||
uint8_t permutated_scantable[64];
|
||||
BlockDSPContext bdsp;
|
||||
HpelDSPContext hdsp;
|
||||
IDCTDSPContext idsp;
|
||||
op_pixels_func copy_block; ///< only set and used by mxpeg
|
||||
|
||||
int restart_interval;
|
||||
int restart_count;
|
||||
|
||||
@@ -65,8 +65,10 @@ static av_cold int mxpeg_decode_end(AVCodecContext *avctx)
|
||||
static av_cold int mxpeg_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
MXpegDecodeContext *s = avctx->priv_data;
|
||||
HpelDSPContext hdsp;
|
||||
|
||||
ff_hpeldsp_init(&s->jpg.hdsp, avctx->flags);
|
||||
ff_hpeldsp_init(&hdsp, avctx->flags);
|
||||
s->jpg.copy_block = hdsp.put_pixels_tab[1][0];
|
||||
|
||||
s->picture[0] = av_frame_alloc();
|
||||
s->picture[1] = av_frame_alloc();
|
||||
|
||||
Reference in New Issue
Block a user