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

avcodec/mpeg_er: Don't use MpegEncContext.block

It is unused (because unquantizing/the idct has been disabled)
apart from FF_DEBUG_DCT_COEFF debug code which makes no sense
when this function is called via error resilience. So pass a NULL
as block when calling ff_mpv_reconstruct_mb() from mpeg_er_decode_mb()
and disable the debug code in this scenario.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-06-15 22:31:58 +02:00
parent 8cff637cf0
commit 4fc874ef08
2 changed files with 5 additions and 2 deletions

View File

@ -76,7 +76,7 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type,
s->mcsel = 0;
memcpy(s->mv, mv, sizeof(*mv));
// The following disables the IDCT.
// The following disables unquantizing and the IDCT.
for (size_t i = 0; i < FF_ARRAY_ELEMS(s->block_last_index); i++)
s->block_last_index[i] = -1;
@ -93,7 +93,7 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type,
if (ref)
av_log(s->avctx, AV_LOG_DEBUG,
"Interlaced error concealment is not fully implemented\n");
ff_mpv_reconstruct_mb(s, s->block);
ff_mpv_reconstruct_mb(s, NULL);
}
av_cold int ff_mpeg_er_init(MpegEncContext *s)

View File

@ -1066,6 +1066,9 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64],
static av_cold void debug_dct_coeffs(MPVContext *s, const int16_t block[][64])
{
if (!block) // happens when called via error resilience
return;
void *const logctx = s->avctx;
const uint8_t *const idct_permutation = s->idsp.idct_permutation;