Go to the documentation of this file.
28 #if !defined(_SPANDSP_BITSTREAM_H_)
29 #define _SPANDSP_BITSTREAM_H_
40 #if defined(__cplusplus)
82 #if defined(__cplusplus)
int one_bits32(uint32_t x)
Find the number of set bits in a 32 bit word.
Definition: bit_operations.c:139
void bitstream_emit(bitstream_state_t *s, uint8_t **c)
Emit any residual bits to the output buffer, without actually flushing them. This is useful for getti...
Definition: bitstream.c:75
void bitstream_flush(bitstream_state_t *s, uint8_t **c)
Flush any residual bits to the output buffer.
Definition: bitstream.c:90
uint32_t bit_reverse_4bytes(uint32_t x)
Bit reverse each of the four bytes in a 32 bit word.
Definition: bit_operations.c:61
uint32_t bitstream
Definition: private/bitstream.h:33
uint32_t bit_reverse32(uint32_t x)
Bit reverse a 32 bit word.
Definition: bit_operations.c:51
uint16_t bit_reverse16(uint16_t x)
Bit reverse a 16 bit word.
Definition: bit_operations.c:42
void bitstream_emit(bitstream_state_t *s, uint8_t **c)
Emit any residual bits to the output buffer, without actually flushing them. This is useful for getti...
Definition: bitstream.c:75
int lsb_first
Definition: private/bitstream.h:37
uint32_t bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
Get a chunk of bits from the input buffer.
Definition: bitstream.c:102
void bitstream_flush(bitstream_state_t *s, uint8_t **c)
Flush any residual bits to the output buffer.
Definition: bitstream.c:90
uint32_t bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
Get a chunk of bits from the input buffer.
Definition: bitstream.c:102
Definition: private/bitstream.h:31
bitstream_state_t * bitstream_init(bitstream_state_t *s, int direction)
Initialise a bitstream context.
Definition: bitstream.c:131
void bit_reverse(uint8_t to[], const uint8_t from[], int len)
Bit reverse each byte in a buffer.
Definition: bit_operations.c:79
bitstream_state_t * bitstream_init(bitstream_state_t *s, int lsb_first)
Initialise a bitstream context.
Definition: bitstream.c:131
void bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
Put a chunk of bits into the output buffer.
Definition: bitstream.c:42
void bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
Put a chunk of bits into the output buffer.
Definition: bitstream.c:42
int residue
Definition: private/bitstream.h:35