32 #define SIZE (COUNT * 4) 46 for (i = 0; i <
COUNT; i++)
51 for (i = 0; i <
COUNT; i++) {
56 fprintf(stderr,
"get_ue_golomb: expected %d, got %d. bits: %7x\n",
62 #define EXTEND(i) ((i) << 3 | (i) & 7) 64 for (i = 0; i <
COUNT; i++)
69 for (i = 0; i <
COUNT; i++) {
74 fprintf(stderr,
"get_ue_golomb_long: expected %d, got %d. " 75 "bits: %8x\n",
EXTEND(i), j, s);
80 #define EXTEND_L(i) ((i) << 4 | (i) & 15) 82 for (i = 0; i <
COUNT; i++)
87 for (i = 0; i <
COUNT; i++) {
92 fprintf(stderr,
"get_ue_golomb_long: expected %d, got %d. " 99 for (i = 0; i <
COUNT; i++)
104 for (i = 0; i <
COUNT; i++) {
108 if (j != i - COUNT / 2) {
109 fprintf(stderr,
"get_se_golomb: expected %d, got %d. bits: %7x\n",
110 i - COUNT / 2, j, s);
static unsigned int show_bits_long(GetBitContext *s, int n)
Show 0-32 bits.
static int get_se_golomb(GetBitContext *gb)
read signed exp golomb code.
Memory handling functions.
static void set_ue_golomb(PutBitContext *pb, int i)
write unsigned exp golomb code.
bitstream reader API header.
static int get_ue_golomb(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to 8190.
common internal API header
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
static unsigned get_ue_golomb_long(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
static void set_se_golomb(PutBitContext *pb, int i)
write signed exp golomb code.
static void set_ue_golomb_long(PutBitContext *pb, uint32_t i)
write unsigned exp golomb code.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.