[FFmpeg-cvslog] r19821 - trunk/libavcodec/golomb.h

benoit subversion
Fri Sep 11 08:25:36 CEST 2009


Author: benoit
Date: Fri Sep 11 08:25:36 2009
New Revision: 19821

Log:
Make get_ur_golomb capable of reading 16 bit values.
Patch by Lars Ta?ber: firstname taeuber gmx net

Modified:
   trunk/libavcodec/golomb.h

Modified: trunk/libavcodec/golomb.h
==============================================================================
--- trunk/libavcodec/golomb.h	Fri Sep 11 08:20:05 2009	(r19820)
+++ trunk/libavcodec/golomb.h	Fri Sep 11 08:25:36 2009	(r19821)
@@ -253,8 +253,12 @@ static inline int get_ur_golomb(GetBitCo
 
         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;



More information about the ffmpeg-cvslog mailing list