Mercurial > libavcodec.hg
comparison get_bits.h @ 10986:4289d95e5022 libavcodec
Added missing const to get_bits_count().
author | fenrir |
---|---|
date | Sun, 24 Jan 2010 16:22:09 +0000 |
parents | 3be801dcc8a1 |
children | 9bd48e510bef |
comparison
equal
deleted
inserted
replaced
10985:007330d2f2b9 | 10986:4289d95e5022 |
---|---|
200 # endif | 200 # endif |
201 | 201 |
202 # define GET_CACHE(name, gb)\ | 202 # define GET_CACHE(name, gb)\ |
203 ((uint32_t)name##_cache) | 203 ((uint32_t)name##_cache) |
204 | 204 |
205 static inline int get_bits_count(GetBitContext *s){ | 205 static inline int get_bits_count(const GetBitContext *s){ |
206 return s->index; | 206 return s->index; |
207 } | 207 } |
208 | 208 |
209 static inline void skip_bits_long(GetBitContext *s, int n){ | 209 static inline void skip_bits_long(GetBitContext *s, int n){ |
210 s->index += n; | 210 s->index += n; |
254 NEG_SSR32(name##_cache, num) | 254 NEG_SSR32(name##_cache, num) |
255 | 255 |
256 # define GET_CACHE(name, gb)\ | 256 # define GET_CACHE(name, gb)\ |
257 ((uint32_t)name##_cache) | 257 ((uint32_t)name##_cache) |
258 | 258 |
259 static inline int get_bits_count(GetBitContext *s){ | 259 static inline int get_bits_count(const GetBitContext *s){ |
260 return (s->buffer_ptr - s->buffer)*8 - 16 + s->bit_count; | 260 return (s->buffer_ptr - s->buffer)*8 - 16 + s->bit_count; |
261 } | 261 } |
262 | 262 |
263 static inline void skip_bits_long(GetBitContext *s, int n){ | 263 static inline void skip_bits_long(GetBitContext *s, int n){ |
264 OPEN_READER(re, s) | 264 OPEN_READER(re, s) |
329 NEG_SSR32(name##_cache0, num) | 329 NEG_SSR32(name##_cache0, num) |
330 | 330 |
331 # define GET_CACHE(name, gb)\ | 331 # define GET_CACHE(name, gb)\ |
332 (name##_cache0) | 332 (name##_cache0) |
333 | 333 |
334 static inline int get_bits_count(GetBitContext *s){ | 334 static inline int get_bits_count(const GetBitContext *s){ |
335 return ((uint8_t*)s->buffer_ptr - s->buffer)*8 - 32 + s->bit_count; | 335 return ((uint8_t*)s->buffer_ptr - s->buffer)*8 - 32 + s->bit_count; |
336 } | 336 } |
337 | 337 |
338 static inline void skip_bits_long(GetBitContext *s, int n){ | 338 static inline void skip_bits_long(GetBitContext *s, int n){ |
339 OPEN_READER(re, s) | 339 OPEN_READER(re, s) |