[SCM] libav/experimental: Add get_ue_golomb_31()

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:34:06 UTC 2013


The following commit has been merged in the experimental branch:
commit 0e921e97c10f37c5ba2bc90cfb00248b633ed21a
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue Dec 23 21:05:47 2008 +0000

    Add get_ue_golomb_31()
    
    Originally committed as revision 16298 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 627fcdc..3c3f759 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -74,6 +74,23 @@ static inline int get_ue_golomb(GetBitContext *gb){
     }
 }
 
+ /**
+ * 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;
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list