summaryrefslogtreecommitdiff
path: root/libavcodec/get_bits.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-09 01:28:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-09 02:03:54 +0200
commit6df33c4926c803108671ec4f73b5c18975cb943d (patch)
tree6cf78fff1ee43a0992d1584505ba541ce23c53d3 /libavcodec/get_bits.h
parent63832e01c3c7e60c7a95c5a40007525dd9a0d630 (diff)
downloadffmpeg-6df33c4926c803108671ec4f73b5c18975cb943d.tar.gz
avcodec: include GET_RL_VLC() in trace output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/get_bits.h')
-rw-r--r--libavcodec/get_bits.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 82421cba32..19c3996246 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -513,7 +513,7 @@ void ff_free_vlc(VLC *vlc);
SKIP_BITS(name, gb, n); \
} while (0)
-#define GET_RL_VLC(level, run, name, gb, table, bits, \
+#define GET_RL_VLC_INTERNAL(level, run, name, gb, table, bits, \
max_depth, need_update) \
do { \
int n, nb_bits; \
@@ -642,6 +642,25 @@ static inline int get_vlc_trace(GetBitContext *s, VLC_TYPE (*table)[2],
return r;
}
+#define GET_RL_VLC(level, run, name, gb, table, bits, \
+ max_depth, need_update) \
+ do { \
+ int show = SHOW_UBITS(name, gb, 24); \
+ int len; \
+ int pos = name ## _index; \
+ \
+ GET_RL_VLC_INTERNAL(level, run, name, gb, table, bits,max_depth, need_update); \
+ \
+ len = name ## _index - pos; \
+ 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__);\
+ } while (0) \
+
+
static inline int get_xbits_trace(GetBitContext *s, int n, const char *file,
const char *func, int line)
{
@@ -666,6 +685,7 @@ static inline int get_xbits_trace(GetBitContext *s, int n, const char *file,
#else //TRACE
#define tprintf(p, ...) { }
+#define GET_RL_VLC GET_RL_VLC_INTERNAL
#endif
#endif /* AVCODEC_GET_BITS_H */