encoder.c File Reference

#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include "g722_1/g722_1.h"
#include "defs.h"
#include "huff_tab.h"
#include "tables.h"
#include "bitstream.h"
#include "utilities.h"

Functions

int g722_1_encode_set_rate (g722_1_encode_state_t *s, int bit_rate)
g722_1_encode_state_tg722_1_encode_init (g722_1_encode_state_t *s, int bit_rate, int sample_rate)
int g722_1_encode_release (g722_1_encode_state_t *s)

Detailed Description


Function Documentation

g722_1_encode_state_t* g722_1_encode_init ( g722_1_encode_state_t s,
int  bit_rate,
int  sample_rate 
)

Initialise a G.722.1 encode context.

Parameters:
s The G.722.1 encode context.
bit_rate The required bit rate for the G.722.1 data. The valid rates are 48000, 32000 and 24000.
sample_rate The required sampling rate. The valid rates are 16000 and 32000.
Returns:
A pointer to the G.722.1 encode context, or NULL for error.
int g722_1_encode_release ( g722_1_encode_state_t s  ) 

Release a G.722.1 encode context.

Parameters:
s The G.722.1 encode context.
Returns:
0.
int g722_1_encode_set_rate ( g722_1_encode_state_t s,
int  bit_rate 
)

Change the bit rate for an G.722.1 decode context.

Parameters:
s The G.722.1 decode context.
bit_rate The required bit rate for the G.722.1 data. The valid rates are 48000, 32000 and 24000.
Returns:
0 for OK, or -1 for a bad parameter.

Generated on 29 Mar 2018 for libg722_1 by  doxygen 1.6.1