#include <inttypes.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include "spandsp/telephony.h"#include "spandsp/bitstream.h"Functions | |
| void | bitstream_put (bitstream_state_t *s, uint8_t **c, unsigned int value, int bits) |
| Put a chunk of bits into the output buffer. | |
| void | bitstream_put2 (bitstream_state_t *s, uint8_t **c, unsigned int value, int bits) |
| unsigned int | bitstream_get (bitstream_state_t *s, const uint8_t **c, int bits) |
| Get a chunk of bits from the input buffer. | |
| unsigned int | bitstream_get2 (bitstream_state_t *s, const uint8_t **c, int bits) |
| void | bitstream_flush (bitstream_state_t *s, uint8_t **c) |
| Flush any residual bit to the output buffer. | |
| void | bitstream_flush2 (bitstream_state_t *s, uint8_t **c) |
| bitstream_state_t * | bitstream_init (bitstream_state_t *s) |
| Initialise a bitstream context. | |
| void bitstream_flush | ( | bitstream_state_t * | s, | |
| uint8_t ** | c | |||
| ) |
Flush any residual bit to the output buffer.
| s | A pointer to the bitstream context. | |
| c | A pointer to the bitstream output buffer. |
References bitstream_state_t::bitstream, and bitstream_state_t::residue.
| unsigned int bitstream_get | ( | bitstream_state_t * | s, | |
| const uint8_t ** | c, | |||
| int | bits | |||
| ) |
Get a chunk of bits from the input buffer.
| s | A pointer to the bitstream context. | |
| c | A pointer to the bitstream input buffer. | |
| bits | The number of bits of value to be grabbed. 1 to 25 bit is valid. |
References bitstream_state_t::bitstream, and bitstream_state_t::residue.
| bitstream_state_t* bitstream_init | ( | bitstream_state_t * | s | ) |
Initialise a bitstream context.
| s | A pointer to the bitstream context. |
References bitstream_state_t::bitstream, and bitstream_state_t::residue.
Referenced by g726_init().
| void bitstream_put | ( | bitstream_state_t * | s, | |
| uint8_t ** | c, | |||
| unsigned int | value, | |||
| int | bits | |||
| ) |
Put a chunk of bits into the output buffer.
| s | A pointer to the bitstream context. | |
| c | A pointer to the bitstream output buffer. | |
| value | The value to be pushed into the output buffer. | |
| bits | The number of bits of value to be pushed. 1 to 25 bit is valid. |
References bitstream_state_t::bitstream, and bitstream_state_t::residue.
1.5.6