Lines Matching defs:bits
180 static int read_bits2(Bits8 *bits, GetByteContext *gb)
184 if (bits->fill == 0) {
185 bits->queue |= bytestream2_get_byte(gb);
186 bits->fill = 8;
188 res = bits->queue >> 6;
189 bits->queue <<= 2;
190 bits->fill -= 2;
195 static void fill_bits32(Bits32 *bits, GetByteContext *gb)
197 bits->queue = bytestream2_get_le32(gb);
198 bits->fill = 32;
201 static int read_bits32(Bits32 *bits, GetByteContext *gb, int nbits)
203 int res = bits->queue & ((1 << nbits) - 1);
205 bits->queue >>= nbits;
206 bits->fill -= nbits;
207 if (bits->fill <= 16) {
208 bits->queue |= bytestream2_get_le16(gb) << bits->fill;
209 bits->fill += 16;
250 Bits8 bits = { 0 };
263 int tag = read_bits2(&bits, gb);
292 Bits8 bits = { 0 };
298 int tag = read_bits2(&bits, gb);
339 Bits32 bits;
343 fill_bits32(&bits, gb);
346 int tag = read_bits32(&bits, gb, 2);
348 int b = read_bits32(&bits, gb, 1);
358 val = read_bits32(&bits, gb, lbits);
371 int b = read_bits32(&bits, gb, 1);
375 len = (read_bits32(&bits, gb, 4)) + 2;
387 int i, subtag = read_bits32(&bits, gb, 2);
390 int top = (read_bits32(&bits, gb, 4)) << 8;
425 q = read_bits32(&bits, gb, 4);
434 ofs1 = read_bits32(&bits, gb, 4);