You've already forked FFmpeg
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:
@ -76,7 +76,7 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type,
|
|||||||
s->mcsel = 0;
|
s->mcsel = 0;
|
||||||
memcpy(s->mv, mv, sizeof(*mv));
|
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++)
|
for (size_t i = 0; i < FF_ARRAY_ELEMS(s->block_last_index); i++)
|
||||||
s->block_last_index[i] = -1;
|
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)
|
if (ref)
|
||||||
av_log(s->avctx, AV_LOG_DEBUG,
|
av_log(s->avctx, AV_LOG_DEBUG,
|
||||||
"Interlaced error concealment is not fully implemented\n");
|
"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)
|
av_cold int ff_mpeg_er_init(MpegEncContext *s)
|
||||||
|
@ -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])
|
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;
|
void *const logctx = s->avctx;
|
||||||
const uint8_t *const idct_permutation = s->idsp.idct_permutation;
|
const uint8_t *const idct_permutation = s->idsp.idct_permutation;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user