From b372f673427c7e3e65b2d6cb5557202164f9cf8d Mon Sep 17 00:00:00 2001 From: Matthew Lindner Date: Fri, 9 May 2014 15:24:05 -0400 Subject: [PATCH] avcodec: better level/index printing --- libavcodec/get_bits.h | 6 +++--- libavcodec/mpeg4videodec.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 19c3996246..ddcef50bd0 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -651,13 +651,13 @@ static inline int get_vlc_trace(GetBitContext *s, VLC_TYPE (*table)[2], \ GET_RL_VLC_INTERNAL(level, run, name, gb, table, bits,max_depth, need_update); \ \ - len = name ## _index - pos; \ + len = name ## _index - pos + 1; \ show = show >> (24 - len); \ \ print_bin(show, len); \ \ - av_log(NULL, AV_LOG_DEBUG, "%5d %2d %3d/%3d RLV @%5d in %s %s:%d\n",\ - show, len, run, level, pos, __FILE__, __PRETTY_FUNCTION__, __LINE__);\ + av_log(NULL, AV_LOG_DEBUG, "%5d %2d %3d/%-3d rlv @%5d in %s %s:%d\n",\ + show, len, run-1, level, pos, __FILE__, __PRETTY_FUNCTION__, __LINE__);\ } while (0) \ diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index d24bbcd557..062aae455d 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1167,7 +1167,7 @@ static inline int mpeg4_decode_block(Mpeg4DecContext *ctx, int16_t *block, level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); LAST_SKIP_BITS(re, &s->gb, 1); } - tprintf(s->avctx, "Block: run:%d, level:%d, index:%d EOB:%d\n", run&63, level, i&63, i>62); + tprintf(s->avctx, "dct[%d][%d] = %- 4d end?:%d\n", scan_table[i&63]&7, scan_table[i&63] >> 3, level, i>62); if (i > 62) { i -= 192; if (i & (~63)) {