libg722_1
0.0.1
|
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "g722_1/g722_1.h"
#include "bitstream.h"
Functions | |
void | g722_1_bitstream_put (g722_1_bitstream_state_t *s, uint8_t **c, uint32_t value, int bits) |
Put a chunk of bits into the output buffer. More... | |
uint32_t | g722_1_bitstream_get (g722_1_bitstream_state_t *s, const uint8_t **c, int bits) |
Get a chunk of bits from the input buffer. More... | |
void | g722_1_bitstream_flush (g722_1_bitstream_state_t *s, uint8_t **c) |
Flush any residual bit to the output buffer. More... | |
g722_1_bitstream_state_t * | g722_1_bitstream_init (g722_1_bitstream_state_t *s) |
Initialise a bitstream context. More... | |
void g722_1_bitstream_flush | ( | g722_1_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 g722_1_bitstream_state_t::bitstream, and g722_1_bitstream_state_t::residue.
uint32_t g722_1_bitstream_get | ( | g722_1_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 32 bits is valid. |
References g722_1_bitstream_state_t::bitstream, and g722_1_bitstream_state_t::residue.
g722_1_bitstream_state_t* g722_1_bitstream_init | ( | g722_1_bitstream_state_t * | s | ) |
Initialise a bitstream context.
s | A pointer to the bitstream context. |
References g722_1_bitstream_state_t::bitstream, and g722_1_bitstream_state_t::residue.
Referenced by g722_1_decode(), and g722_1_fillin().
void g722_1_bitstream_put | ( | g722_1_bitstream_state_t * | s, |
uint8_t ** | c, | ||
uint32_t | 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 32 bits is valid. |
References g722_1_bitstream_state_t::bitstream, and g722_1_bitstream_state_t::residue.