Lines Matching refs:num_bits
223 vl_vlc_peekbits(struct vl_vlc *vlc, unsigned num_bits) in vl_vlc_peekbits() argument
225 assert(vl_vlc_valid_bits(vlc) >= num_bits || vlc->data >= vlc->end); in vl_vlc_peekbits()
226 return vlc->buffer >> (64 - num_bits); in vl_vlc_peekbits()
233 vl_vlc_eatbits(struct vl_vlc *vlc, unsigned num_bits) in vl_vlc_eatbits() argument
235 assert(vl_vlc_valid_bits(vlc) >= num_bits); in vl_vlc_eatbits()
237 vlc->buffer <<= num_bits; in vl_vlc_eatbits()
238 vlc->invalid_bits += num_bits; in vl_vlc_eatbits()
245 vl_vlc_get_uimsbf(struct vl_vlc *vlc, unsigned num_bits) in vl_vlc_get_uimsbf() argument
249 assert(vl_vlc_valid_bits(vlc) >= num_bits); in vl_vlc_get_uimsbf()
251 value = vlc->buffer >> (64 - num_bits); in vl_vlc_get_uimsbf()
252 vl_vlc_eatbits(vlc, num_bits); in vl_vlc_get_uimsbf()
261 vl_vlc_get_simsbf(struct vl_vlc *vlc, unsigned num_bits) in vl_vlc_get_simsbf() argument
265 assert(vl_vlc_valid_bits(vlc) >= num_bits); in vl_vlc_get_simsbf()
267 value = ((int64_t)vlc->buffer) >> (64 - num_bits); in vl_vlc_get_simsbf()
268 vl_vlc_eatbits(vlc, num_bits); in vl_vlc_get_simsbf()
277 vl_vlc_get_vlclbf(struct vl_vlc *vlc, const struct vl_vlc_entry *tbl, unsigned num_bits) in vl_vlc_get_vlclbf() argument
279 tbl += vl_vlc_peekbits(vlc, num_bits); in vl_vlc_get_vlclbf()
288 vl_vlc_search_byte(struct vl_vlc *vlc, unsigned num_bits, uint8_t value) in vl_vlc_search_byte() argument
292 assert(num_bits == ~0u || (num_bits % 8) == 0); in vl_vlc_search_byte()
304 if (num_bits != ~0u) { in vl_vlc_search_byte()
305 num_bits -= 8; in vl_vlc_search_byte()
306 if (num_bits == 0) in vl_vlc_search_byte()
331 if (num_bits != ~0u) { in vl_vlc_search_byte()
332 num_bits -= 8; in vl_vlc_search_byte()
333 if (num_bits == 0) { in vl_vlc_search_byte()
345 vl_vlc_removebits(struct vl_vlc *vlc, unsigned pos, unsigned num_bits) in vl_vlc_removebits() argument
347 uint64_t lo = (vlc->buffer & (~0UL >> (pos + num_bits))) << num_bits; in vl_vlc_removebits()
350 vlc->invalid_bits += num_bits; in vl_vlc_removebits()