changeset 10164:944071b6fcb4 libavcodec

Make get_ur_golomb capable of reading 16 bit values. Patch by Lars T¸«£uber: firstname taeuber gmx net
author benoit
date Fri, 11 Sep 2009 06:25:36 +0000
parents 24c03529ccbe
children b30c708ce76a
files golomb.h
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/golomb.h	Fri Sep 11 06:20:05 2009 +0000
+++ b/golomb.h	Fri Sep 11 06:25:36 2009 +0000
@@ -253,8 +253,12 @@
 
         return buf;
     }else{
-        buf >>= 32 - limit - esc_len;
-        LAST_SKIP_BITS(re, gb, esc_len + limit);
+        LAST_SKIP_BITS(re, gb, limit);
+        UPDATE_CACHE(re, gb);
+
+        buf = SHOW_UBITS(re, gb, esc_len);
+
+        LAST_SKIP_BITS(re, gb, esc_len);
         CLOSE_READER(re, gb);
 
         return buf + limit - 1;