[FFmpeg-cvslog] r16298 - trunk/libavcodec/golomb.h
michael
subversion
Tue Dec 23 22:05:47 CET 2008
Author: michael
Date: Tue Dec 23 22:05:47 2008
New Revision: 16298
Log:
Add get_ue_golomb_31()
Modified:
trunk/libavcodec/golomb.h
Modified: trunk/libavcodec/golomb.h
==============================================================================
--- trunk/libavcodec/golomb.h Tue Dec 23 21:44:06 2008 (r16297)
+++ trunk/libavcodec/golomb.h Tue Dec 23 22:05:47 2008 (r16298)
@@ -74,6 +74,23 @@ static inline int get_ue_golomb(GetBitCo
}
}
+ /**
+ * read unsigned exp golomb code, constraint to a max of 31
+ */
+static inline int get_ue_golomb_31(GetBitContext *gb){
+ unsigned int buf;
+
+ OPEN_READER(re, gb);
+ UPDATE_CACHE(re, gb);
+ buf=GET_CACHE(re, gb);
+
+ buf >>= 32 - 9;
+ LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
+ CLOSE_READER(re, gb);
+
+ return ff_ue_golomb_vlc_code[buf];
+}
+
static inline int svq3_get_ue_golomb(GetBitContext *gb){
uint32_t buf;
More information about the ffmpeg-cvslog
mailing list