[vlc-commits] demux: av1_unpack: fix leb128 width estimation

Francois Cartegnie git at videolan.org
Wed Oct 17 15:22:18 CEST 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 11 22:37:44 2018 +0200| [4a27c6cd7390e8bc9050f7f58fcedda079b7b515] | committer: Tristan Matthews

demux: av1_unpack: fix leb128 width estimation

(cherry picked from commit f6994b6a64735308fd9a83fe8032c5be5402dc80)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4a27c6cd7390e8bc9050f7f58fcedda079b7b515
---

 modules/demux/av1_unpack.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/demux/av1_unpack.h b/modules/demux/av1_unpack.h
index 683c53423d..af7f056abf 100644
--- a/modules/demux/av1_unpack.h
+++ b/modules/demux/av1_unpack.h
@@ -26,10 +26,10 @@
 
 static inline uint8_t leb128_expected(uint32_t v)
 {
-    if     (v < (1U << 8))  return 1;
-    else if(v < (1U << 15)) return 2;
-    else if(v < (1U << 22)) return 3;
-    else if(v < (1U << 29)) return 4;
+    if     (v < (1U << 7))  return 1;
+    else if(v < (1U << 14)) return 2;
+    else if(v < (1U << 21)) return 3;
+    else if(v < (1U << 28)) return 4;
     else                    return 5;
 }
 



More information about the vlc-commits mailing list