[FFmpeg-cvslog] get_bits: Support max_depth > 2 in GET_RL_VLC_INTERNAL

Kieran Kunhya git at videolan.org
Wed Jan 27 17:48:27 CET 2016


ffmpeg | branch: master | Kieran Kunhya <kierank at ob-encoder.com> | Sun Dec 13 18:02:09 2015 +0000| [46350db737a15910f468d30cf7beda16a4cc8332] | committer: Vittorio Giovara

get_bits: Support max_depth > 2 in GET_RL_VLC_INTERNAL

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46350db737a15910f468d30cf7beda16a4cc8332
---

 libavcodec/get_bits.h |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index ea7e0c4..cb2be4f 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);                                 \



More information about the ffmpeg-cvslog mailing list