comparison common.h @ 1025:1f9afd8b9131 libavcodec

GetBitContext.size is allways multiplied by 8 -> use size_in_bits to avoid useless *8 in a few inner loops
author michaelni
date Tue, 21 Jan 2003 17:34:12 +0000
parents 7701ff462e3a
children 19de1445beb2
comparison
equal deleted inserted replaced
1024:9cc1031e1864 1025:1f9afd8b9131
259 UINT32 *buffer_ptr; 259 UINT32 *buffer_ptr;
260 UINT32 cache0; 260 UINT32 cache0;
261 UINT32 cache1; 261 UINT32 cache1;
262 int bit_count; 262 int bit_count;
263 #endif 263 #endif
264 int size; 264 int size_in_bits;
265 } GetBitContext; 265 } GetBitContext;
266 266
267 static inline int get_bits_count(GetBitContext *s); 267 static inline int get_bits_count(GetBitContext *s);
268 268
269 #define VLC_TYPE INT16 269 #define VLC_TYPE INT16
688 int init_vlc(VLC *vlc, int nb_bits, int nb_codes, 688 int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
689 const void *bits, int bits_wrap, int bits_size, 689 const void *bits, int bits_wrap, int bits_size,
690 const void *codes, int codes_wrap, int codes_size); 690 const void *codes, int codes_wrap, int codes_size);
691 void free_vlc(VLC *vlc); 691 void free_vlc(VLC *vlc);
692 692
693 /**
694 *
695 * if the vlc code is invalid and max_depth=1 than no bits will be removed
696 * if the vlc code is invalid and max_depth>1 than the number of bits removed
697 * is undefined
698 */
693 #define GET_VLC(code, name, gb, table, bits, max_depth)\ 699 #define GET_VLC(code, name, gb, table, bits, max_depth)\
694 {\ 700 {\
695 int n, index, nb_bits;\ 701 int n, index, nb_bits;\
696 \ 702 \
697 index= SHOW_UBITS(name, gb, bits);\ 703 index= SHOW_UBITS(name, gb, bits);\