avcodec/mpegutils: Don't output wrong mb skip values

The earlier code had two problems:
1. For reference frames that are not directly output (happens unless
low_delay is set), the mb skip values referred to the next reference
frame to be decoded.
2. For non-reference frames, every macroblock was always considered
skipped.
This makes the output (worse than) useless; that no one ever
complained about this shows that this feature is not really used.
It is therefore removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-06-09 08:40:20 +02:00
parent b2195a238c
commit 952a32e9a0
4 changed files with 5 additions and 13 deletions

View file

@ -153,7 +153,7 @@ static char get_interlacement_char(int mb_type)
}
void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict,
const uint8_t *mbskip_table, const uint32_t *mbtype_table,
const uint32_t *mbtype_table,
const int8_t *qscale_table, int16_t (*const motion_val[2])[2],
int mb_width, int mb_height, int mb_stride, int quarter_sample)
{
@ -248,7 +248,7 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict,
return;
if (avctx->debug & (FF_DEBUG_SKIP | FF_DEBUG_QP | FF_DEBUG_MB_TYPE)) {
if (avctx->debug & (FF_DEBUG_QP | FF_DEBUG_MB_TYPE)) {
int x,y;
AVBPrint buf;
int n;
@ -267,8 +267,6 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict,
av_bprint_chars(&buf, ' ', margin_left);
n = 0;
if (avctx->debug & FF_DEBUG_SKIP)
n++;
if (avctx->debug & FF_DEBUG_QP)
n += 2;
if (avctx->debug & FF_DEBUG_MB_TYPE)
@ -284,12 +282,6 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict,
for (x = 0; x < mb_width; x++) {
if (x == 0)
av_bprintf(&buf, "%*d ", margin_left - 1, y << 4);
if (avctx->debug & FF_DEBUG_SKIP) {
int count = mbskip_table ? mbskip_table[x + y * mb_stride] : 0;
if (count > 9)
count = 9;
av_bprintf(&buf, "%1d", count);
}
if (avctx->debug & FF_DEBUG_QP) {
av_bprintf(&buf, "%2d", qscale_table[x + y * mb_stride]);
}