|
ADPCM Codecs
|
Reads bits from a buffer. By default bits are taken from the least significant bit of each byte first, and the first bit read is the lowest bit of the value. With setMsbFirst(true) bits are taken from the most significant bit of each byte first, and the first bit read is the highest bit of the value. Bits past the end of the buffer read as zero. More...
#include <BitReader.h>
Public Member Functions | |
| BitReader (const uint8_t *buffer, int bit_size) | |
| void | setMsbFirst (bool msb) |
| Selects the bit order used by read() and readSigned() | |
| int | init (const uint8_t *buffer, int bit_size) |
| int | initBytes (const uint8_t *buffer, int byte_size) |
| Initializes the reader for byte_size bytes. | |
| int | bitsCount () const |
| number of bits consumed so far | |
| int | bitsLeft () const |
| number of bits that are still available | |
| uint32_t | read (int n) |
| Reads n bits (0 to 32) | |
| int32_t | readSigned (int n) |
| Reads n bits and sign extends them (0 to 31) | |
| void | skip (int n) |
| Skips n bits. | |
Reads bits from a buffer. By default bits are taken from the least significant bit of each byte first, and the first bit read is the lowest bit of the value. With setMsbFirst(true) bits are taken from the most significant bit of each byte first, and the first bit read is the highest bit of the value. Bits past the end of the buffer read as zero.
Initializes the reader for bit_size bits; returns AVERROR_INVALIDDATA if the size is invalid