8#ifndef SLIM_SINGLE_CODEC_H
9#define SLIM_SINGLE_CODEC_H
20 unsigned int order=1) {
38 unsigned int order=1) {
41 if (n_minus_order > 0) {
42 int n_minus_1 = n_minus_order + order - 1;
44 uint32_t uval = ib->
readbits(n_minus_1);
45 return uval | bitNset[n_minus_1];
Include file for the bitstream and derived classes.
static unsigned int bit_size(int32_t i)
Find size (on [0,32]) of the smallest # that can hold the integer i.
Definition bitstream.h:166
Input bit stream.
Definition bitstream.h:105
Word_t readbits(int nbits)
Read data from the buffer as unsigned ints.
Definition bitstream.cpp:556
Word_t read_unary()
Read a single unary-coded value.
Definition bitstream.cpp:622
Output bit stream.
Definition bitstream.h:78
void write_unary(unsigned int value)
Write a unary code for the value.
Definition bitstream.cpp:303
void writebits(uint32_t data, int nbits)
Write data to the buffer.
Definition bitstream.cpp:237
void mexp_golomb_write(obitstream *ob, uint32_t u, unsigned int order=1)
Write an unsigned value to a bitstream by method mexp_golomb.
Definition slim_single_codec.h:19
uint32_t mexp_golomb_read_u32(ibitstream *ib, unsigned int order=1)
Read an unsigned 32-bit value from a bitstream by method mexp_golomb.
Definition slim_single_codec.h:37