summaryrefslogtreecommitdiff
path: root/libavcodec/get_bits.h
diff options
context:
space:
mode:
authorKieran Kunhya <kierank@ob-encoder.com>2015-12-13 18:01:50 +0000
committerKieran Kunhya <kierank@ob-encoder.com>2015-12-13 22:56:49 +0000
commit906c0b77164e19e3263292eb3f22e20519fda402 (patch)
treeeb9668cebe92439d608b238740bd067d84507c15 /libavcodec/get_bits.h
parent28e9b7e8aed9df9e4e20f61f803fe8e8a850eb9f (diff)
downloadffmpeg-906c0b77164e19e3263292eb3f22e20519fda402.tar.gz
get_bits: Support max_depth > 2 in GET_RL_VLC_INTERNAL
Diffstat (limited to 'libavcodec/get_bits.h')
-rw-r--r--libavcodec/get_bits.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 0d3db1f3cf..0a61c805b7 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -539,6 +539,17 @@ void ff_free_vlc(VLC *vlc);
index = SHOW_UBITS(name, gb, nb_bits) + level; \
level = table[index].level; \
n = table[index].len; \
+ if (max_depth > 2 && n < 0) { \
+ LAST_SKIP_BITS(name, gb, nb_bits); \
+ if (need_update) { \
+ UPDATE_CACHE(name, gb); \
+ } \
+ nb_bits = -n; \
+ \
+ index = SHOW_UBITS(name, gb, nb_bits) + level; \
+ level = table[index].level; \
+ n = table[index].len; \
+ } \
} \
run = table[index].run; \
SKIP_BITS(name, gb, n); \