Mercurial > libavcodec.hg
comparison golomb.h @ 8449:d6faaf27eacf libavcodec
Add get_ue_golomb_31()
author | michael |
---|---|
date | Tue, 23 Dec 2008 21:05:47 +0000 |
parents | cd18f66b3663 |
children | e9d9d946f213 |
comparison
equal
deleted
inserted
replaced
8448:2f25133ab807 | 8449:d6faaf27eacf |
---|---|
72 | 72 |
73 return buf; | 73 return buf; |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 /** | |
78 * read unsigned exp golomb code, constraint to a max of 31 | |
79 */ | |
80 static inline int get_ue_golomb_31(GetBitContext *gb){ | |
81 unsigned int buf; | |
82 | |
83 OPEN_READER(re, gb); | |
84 UPDATE_CACHE(re, gb); | |
85 buf=GET_CACHE(re, gb); | |
86 | |
87 buf >>= 32 - 9; | |
88 LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]); | |
89 CLOSE_READER(re, gb); | |
90 | |
91 return ff_ue_golomb_vlc_code[buf]; | |
92 } | |
93 | |
77 static inline int svq3_get_ue_golomb(GetBitContext *gb){ | 94 static inline int svq3_get_ue_golomb(GetBitContext *gb){ |
78 uint32_t buf; | 95 uint32_t buf; |
79 | 96 |
80 OPEN_READER(re, gb); | 97 OPEN_READER(re, gb); |
81 UPDATE_CACHE(re, gb); | 98 UPDATE_CACHE(re, gb); |