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

Francois Cartegnie git at videolan.org
Thu Oct 11 22:41:31 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 11 22:37:44 2018 +0200| [f6994b6a64735308fd9a83fe8032c5be5402dc80] | committer: Francois Cartegnie

demux: av1_unpack: fix leb128 width estimation

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

 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