diff options
author | Lars Täuber <lars.taeuber@gmx.net> | 2009-09-11 10:25:36 +0400 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2009-09-11 10:25:36 +0400 |
commit | 6fa6c481b91f833c212d88e6206e088aad8437d8 (patch) | |
tree | 4578e7cb0d6deb4a23ea826fb5c21236a1eecae7 /libavcodec/golomb.h | |
parent | 6249c33e5ad09d1167dc8c949e7f96a2d4bfd26d (diff) |
Make get_ur_golomb capable of reading 16 bit values.
Patch by Lars Täuber: firstname taeuber gmx net
Originally committed as revision 19821 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/golomb.h')
-rw-r--r-- | libavcodec/golomb.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 7044042c95..c227607f1f 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -253,8 +253,12 @@ static inline int get_ur_golomb(GetBitContext *gb, int k, int limit, int esc_len return buf; }else{ - buf >>= 32 - limit - esc_len; - LAST_SKIP_BITS(re, gb, esc_len + limit); + LAST_SKIP_BITS(re, gb, limit); + UPDATE_CACHE(re, gb); + + buf = SHOW_UBITS(re, gb, esc_len); + + LAST_SKIP_BITS(re, gb, esc_len); CLOSE_READER(re, gb); return buf + limit - 1; |