23#ifndef ALTERH264_BITS_READER_H
24#define ALTERH264_BITS_READER_H
52 uint8_t val[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
56 while (--buf >= br->
buffer)
58 for (bit = 7; bit > -1; bit--)
97 uint8_t val[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
102 res = (res << 1) + ((*br->
buffer & val[br->
offbits]) ? 1 : 0);
128static inline uint32_t
134 for (b = 0; !b; leading++)
137 return (1 << leading) - 1 +
read_bits (br, leading);
146 return (res & 0x01) ? (res + 1) / 2 : -(res / 2);
static uint8_t bits_reader_shift(bits_reader_t *br)
Definition: alterh264_bits_reader.h:68
static void bits_reader_set(bits_reader_t *br, const uint8_t *buf, int len)
Definition: alterh264_bits_reader.h:39
static void skip_bits(bits_reader_t *br, int nbits)
Definition: alterh264_bits_reader.h:115
static int32_t read_exp_se(bits_reader_t *br)
Definition: alterh264_bits_reader.h:143
static uint32_t more_rbsp_data(bits_reader_t *br)
Definition: alterh264_bits_reader.h:50
static uint32_t read_bits(bits_reader_t *br, int nbits)
Definition: alterh264_bits_reader.h:95
static uint32_t read_exp_ue(bits_reader_t *br)
Definition: alterh264_bits_reader.h:129
Definition: alterh264_bits_reader.h:31
const uint8_t * start
Definition: alterh264_bits_reader.h:32
int oflow
Definition: alterh264_bits_reader.h:33
int offbits
Definition: alterh264_bits_reader.h:33
const uint8_t * buffer
Definition: alterh264_bits_reader.h:32
int length
Definition: alterh264_bits_reader.h:33