Mercurial > libavcodec.hg
diff golomb.h @ 1812:6d762acfff5d libavcodec
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
| author | michael |
|---|---|
| date | Wed, 18 Feb 2004 01:49:30 +0000 |
| parents | f26d6b57e620 |
| children | a4d3699c6636 |
line wrap: on
line diff
--- a/golomb.h Wed Feb 18 01:22:05 2004 +0000 +++ b/golomb.h Wed Feb 18 01:49:30 2004 +0000 @@ -256,6 +256,14 @@ } } +/** + * 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){
