summaryrefslogtreecommitdiff
path: root/libavcodec/golomb.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-02-18 01:49:30 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-18 01:49:30 +0000
commitac2570a8b04cb29044a412238539076180cfbf0f (patch)
tree4ce175004dd098c20c5ff91701812505b588a836 /libavcodec/golomb.h
parent4f52c3126b25e91fe59d97843b71ddc1967bd6db (diff)
flac fixes:
fix data types of residual&decoded fix twos complement bitfields fix utf8 (no, utf8 is not the same as the simple and compact uvlc used in nut) add truncated bitstream support, both ogg and flac demuxers in mplayer cvs provide incomplete frames, and furthermore it isnt possible to find frameboundaries in flac without decoding it completly add escape-less golomb rice decoder (=flac style golomb rice) (ultra efficient, the longest vlc code is just 2^32-1 bits) printf->av_log fix bps for non independant channels fix a few +-1 bugs fix sample order for independant channels fix data_size Originally committed as revision 2791 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/golomb.h')
-rw-r--r--libavcodec/golomb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 5ebebe94ce..cd8bdd38d5 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -256,6 +256,14 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int
}
}
+/**
+ * read unsigned golomb rice code (flac).
+ */
+static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit, int esc_len){
+ int v= get_ur_golomb_jpegls(gb, k, limit, esc_len);
+ return (v>>1) ^ -(v&1);
+}
+
#ifdef TRACE
static inline int get_ue(GetBitContext *s, char *file, char *func, int line){