1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/mpeg12dec: Don't store block_last_index unnecessarily

Given that the MPEG-1/2 decoders unquantize the blocks
on their own, block_last_index is only used to signal
to ff_mpv_reconstruct_mb() whether a block is skipped
or not; but this is only checked for inter macroblocks,
so it is unnecessary to set block_last_index for intra
macroblocks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-05-25 17:21:53 +02:00
parent 069329ec02
commit c2e5f7466d
2 changed files with 2 additions and 5 deletions

View File

@ -276,7 +276,7 @@ end:
}
if (i > MAX_INDEX)
i = AVERROR_INVALIDDATA;
return AVERROR_INVALIDDATA;
return i;
return 0;
}

View File

@ -377,7 +377,6 @@ static inline int mpeg2_decode_block_intra(MpegEncContext *s,
check_scantable_index(s, i);
s->block_last_index[n] = i;
return 0;
}
@ -518,8 +517,6 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
s->mb_x, s->mb_y);
return ret;
}
s->block_last_index[i] = ret;
}
}
} else {