Lines Matching refs:gb
80 * gb
83 * OPEN_READER(name, gb)
84 * load gb into local variables
86 * CLOSE_READER(name, gb)
87 * store local vars in gb
89 * UPDATE_CACHE(name, gb)
93 * GET_CACHE(name, gb)
97 * SHOW_UBITS(name, gb, num)
100 * SHOW_SBITS(name, gb, num)
103 * SKIP_BITS(name, gb, num)
107 * SKIP_CACHE(name, gb, num)
111 * SKIP_COUNTER(name, gb, num)
114 * LAST_SKIP_BITS(name, gb, num)
117 * BITS_LEFT(name, gb)
133 #define OPEN_READER_NOSIZE(name, gb) \
134 unsigned int name ## _index = (gb)->index; \
138 #define OPEN_READER(name, gb) OPEN_READER_NOSIZE(name, gb)
140 #define BITS_AVAILABLE(name, gb) 1
142 #define OPEN_READER(name, gb) \
143 OPEN_READER_NOSIZE(name, gb); \
144 unsigned int name ## _size_plus8 = (gb)->size_in_bits_plus8
146 #define BITS_AVAILABLE(name, gb) name ## _index < name ## _size_plus8
149 #define CLOSE_READER(name, gb) (gb)->index = name ## _index
153 # define UPDATE_CACHE_LE(name, gb) name ## _cache = \
154 AV_RL64((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7)
156 # define UPDATE_CACHE_BE(name, gb) name ## _cache = \
157 AV_RB64((gb)->buffer + (name ## _index >> 3)) >> (32 - (name ## _index & 7))
161 # define UPDATE_CACHE_LE(name, gb) name ## _cache = \
162 AV_RL32((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7)
164 # define UPDATE_CACHE_BE(name, gb) name ## _cache = \
165 AV_RB32((gb)->buffer + (name ## _index >> 3)) << (name ## _index & 7)
172 # define UPDATE_CACHE(name, gb) UPDATE_CACHE_LE(name, gb)
174 # define SKIP_CACHE(name, gb, num) name ## _cache >>= (num)
178 # define UPDATE_CACHE(name, gb) UPDATE_CACHE_BE(name, gb)
180 # define SKIP_CACHE(name, gb, num) name ## _cache <<= (num)
185 # define SKIP_COUNTER(name, gb, num) name ## _index += (num)
187 # define SKIP_COUNTER(name, gb, num) \
191 #define BITS_LEFT(name, gb) ((int)((gb)->size_in_bits - name ## _index))
193 #define SKIP_BITS(name, gb, num) \
195 SKIP_CACHE(name, gb, num); \
196 SKIP_COUNTER(name, gb, num); \
199 #define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num)
201 #define SHOW_UBITS_LE(name, gb, num) zero_extend(name ## _cache, num)
202 #define SHOW_SBITS_LE(name, gb, num) sign_extend(name ## _cache, num)
204 #define SHOW_UBITS_BE(name, gb, num) NEG_USR32(name ## _cache, num)
205 #define SHOW_SBITS_BE(name, gb, num) NEG_SSR32(name ## _cache, num)
208 # define SHOW_UBITS(name, gb, num) SHOW_UBITS_LE(name, gb, num)
209 # define SHOW_SBITS(name, gb, num) SHOW_SBITS_LE(name, gb, num)
211 # define SHOW_UBITS(name, gb, num) SHOW_UBITS_BE(name, gb, num)
212 # define SHOW_SBITS(name, gb, num) SHOW_SBITS_BE(name, gb, num)
215 #define GET_CACHE(name, gb) ((uint32_t) name ## _cache)
607 GetBitContext gb = *s;
608 return get_bits_long(&gb, n);
696 #define GET_VLC(code, name, gb, table, bits, max_depth) \
701 index = SHOW_UBITS(name, gb, bits); \
706 LAST_SKIP_BITS(name, gb, bits); \
707 UPDATE_CACHE(name, gb); \
711 index = SHOW_UBITS(name, gb, nb_bits) + code; \
715 LAST_SKIP_BITS(name, gb, nb_bits); \
716 UPDATE_CACHE(name, gb); \
720 index = SHOW_UBITS(name, gb, nb_bits) + code; \
725 SKIP_BITS(name, gb, n); \
728 #define GET_RL_VLC(level, run, name, gb, table, bits, \
734 index = SHOW_UBITS(name, gb, bits); \
739 SKIP_BITS(name, gb, bits); \
741 UPDATE_CACHE(name, gb); \
746 index = SHOW_UBITS(name, gb, nb_bits) + level; \
750 LAST_SKIP_BITS(name, gb, nb_bits); \
752 UPDATE_CACHE(name, gb); \
756 index = SHOW_UBITS(name, gb, nb_bits) + level; \
762 SKIP_BITS(name, gb, n); \
821 static inline int decode012(GetBitContext *gb)
824 n = get_bits1(gb);
828 return get_bits1(gb) + 1;
831 static inline int decode210(GetBitContext *gb)
833 if (get_bits1(gb))
836 return 2 - get_bits1(gb);
839 static inline int get_bits_left(GetBitContext *gb)
841 return gb->size_in_bits - get_bits_count(gb);
844 static inline int skip_1stop_8data_bits(GetBitContext *gb)
846 if (get_bits_left(gb) <= 0)
849 while (get_bits1(gb)) {
850 skip_bits(gb, 8);
851 if (get_bits_left(gb) <= 0)