aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKieran Kunhya <kierank@ob-encoder.com>2015-12-13 18:02:09 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-01-11 15:32:57 -0500
commit46350db737a15910f468d30cf7beda16a4cc8332 (patch)
tree39ef399366dbe9d50f520297b3cac0d70659adcf
parente8bc642202c10beda1ea4e93ec8492b1e39805e5 (diff)
downloadffmpeg-46350db737a15910f468d30cf7beda16a4cc8332.tar.gz
get_bits: Support max_depth > 2 in GET_RL_VLC_INTERNAL
-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 ea7e0c4509..cb2be4fadf 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -507,6 +507,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); \