diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-07-13 15:14:43 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-07-13 15:14:43 +0400 |
commit | ce3299529b702c20cc70f5b73462acc2e33eaf63 (patch) | |
tree | cc8f1600d8c6844d8f1fbc15ff8de5d845e1d194 /libavcodec/golomb.h | |
parent | d9e6a6c629c073e3432e76a320245ce3616b4f3f (diff) |
10l
Originally committed as revision 2041 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/golomb.h')
-rw-r--r-- | libavcodec/golomb.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 7c73f3bae6..5ebebe94ce 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -220,7 +220,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int log= av_log2(buf); - if(log > 31-12){ + if(log > 31-11){ buf >>= log - k; buf += (30-log)<<k; LAST_SKIP_BITS(re, gb, 32 + k - log); @@ -385,7 +385,8 @@ static inline void set_ur_golomb_jpegls(PutBitContext *pb, int i, int k, int lim e= (i>>k) + 1; if(e<limit){ put_bits(pb, e, 1); - put_bits(pb, k, i&((1<<k)-1)); + if(k) + put_bits(pb, k, i&((1<<k)-1)); }else{ put_bits(pb, limit , 1); put_bits(pb, esc_len, i - 1); |