G.723.1 types, functions and data tables.
More...
#include <stdint.h>
#include "libavutil/log.h"
Go to the source code of this file.
|
|
#define | SUBFRAMES 4 |
| |
|
#define | SUBFRAME_LEN 60 |
| |
|
#define | FRAME_LEN (SUBFRAME_LEN << 2) |
| |
|
#define | HALF_FRAME_LEN (FRAME_LEN / 2) |
| |
|
#define | LPC_FRAME (HALF_FRAME_LEN + SUBFRAME_LEN) |
| |
|
#define | LPC_ORDER 10 |
| |
|
#define | LSP_BANDS 3 |
| |
|
#define | LSP_CB_SIZE 256 |
| |
|
#define | PITCH_MIN 18 |
| |
|
#define | PITCH_MAX (PITCH_MIN + 127) |
| |
|
#define | PITCH_ORDER 5 |
| |
|
#define | GRID_SIZE 2 |
| |
|
#define | PULSE_MAX 6 |
| |
|
#define | GAIN_LEVELS 24 |
| |
|
#define | COS_TBL_SIZE 512 |
| |
| #define | MULL2(a, b) ((((a) >> 16) * (b) * 2) + (((a) & 0xffff) * (b) >> 15)) |
| | Bitexact implementation of 2ab scaled by 1/2^16. More...
|
| |
|
| enum | FrameType {
ACTIVE_FRAME,
SID_FRAME,
UNTRANSMITTED_FRAME,
INTRA_FRAME = 0,
INTER_FRAME,
SKIP_FRAME,
FIRST_FRAME,
INNER_FRAME,
FINAL_FRAME,
LINEAR_MODE,
FRAME_NB
} |
| | G723.1 frame types. More...
|
| |
| enum | Rate { RATE_6300,
RATE_5300
} |
| | G723.1 rate values.
|
| |
|
|
int | ff_g723_1_scale_vector (int16_t *dst, const int16_t *vector, int length) |
| | Scale vector contents based on the largest of their absolutes.
|
| |
| int | ff_g723_1_normalize_bits (int num, int width) |
| | Calculate the number of left-shifts required for normalizing the input. More...
|
| |
|
int | ff_g723_1_dot_product (const int16_t *a, const int16_t *b, int length) |
| |
|
void | ff_g723_1_get_residual (int16_t *residual, int16_t *prev_excitation, int lag) |
| | Get delayed contribution from the previous excitation vector.
|
| |
|
void | ff_g723_1_gen_dirac_train (int16_t *buf, int pitch_lag) |
| | Generate a train of dirac functions with period as pitch lag.
|
| |
|
void | ff_g723_1_gen_acb_excitation (int16_t *vector, int16_t *prev_excitation, int pitch_lag, G723_1_Subframe *subfrm, enum Rate cur_rate) |
| | Generate adaptive codebook excitation.
|
| |
| void | ff_g723_1_lsp_interpolate (int16_t *lpc, int16_t *cur_lsp, int16_t *prev_lsp) |
| | Quantize LSP frequencies by interpolation and convert them to the corresponding LPC coefficients. More...
|
| |
| void | ff_g723_1_inverse_quant (int16_t *cur_lsp, int16_t *prev_lsp, uint8_t *lsp_index, int bad_frame) |
| | Perform inverse quantization of LSP frequencies. More...
|
| |
G.723.1 types, functions and data tables.
§ MULL2
| #define MULL2 |
( |
|
a, |
|
|
|
b |
|
) |
| ((((a) >> 16) * (b) * 2) + (((a) & 0xffff) * (b) >> 15)) |
Bitexact implementation of 2ab scaled by 1/2^16.
- Parameters
-
| a | 32 bit multiplicand |
| b | 16 bit multiplier |
§ FrameType
G723.1 frame types.
| Enumerator |
|---|
| ACTIVE_FRAME | Active speech.
|
| SID_FRAME | Silence Insertion Descriptor frame.
|
§ ff_g723_1_inverse_quant()
| void ff_g723_1_inverse_quant |
( |
int16_t * |
cur_lsp, |
|
|
int16_t * |
prev_lsp, |
|
|
uint8_t * |
lsp_index, |
|
|
int |
bad_frame |
|
) |
| |
Perform inverse quantization of LSP frequencies.
- Parameters
-
| cur_lsp | the current LSP vector |
| prev_lsp | the previous LSP vector |
| lsp_index | VQ indices |
| bad_frame | bad frame flag |
§ ff_g723_1_lsp_interpolate()
| void ff_g723_1_lsp_interpolate |
( |
int16_t * |
lpc, |
|
|
int16_t * |
cur_lsp, |
|
|
int16_t * |
prev_lsp |
|
) |
| |
Quantize LSP frequencies by interpolation and convert them to the corresponding LPC coefficients.
- Parameters
-
| lpc | buffer for LPC coefficients |
| cur_lsp | the current LSP vector |
| prev_lsp | the previous LSP vector |
§ ff_g723_1_normalize_bits()
| int ff_g723_1_normalize_bits |
( |
int |
num, |
|
|
int |
width |
|
) |
| |
Calculate the number of left-shifts required for normalizing the input.
- Parameters
-
| num | input number |
| width | width of the input, 16 bits(0) / 32 bits(1) |