#include <math.h>
#include "lsp.h"
#include "stack_alloc.h"
#include "math_approx.h"
Defines | |
#define | M_PI 3.14159265358979323846 |
#define | NULL 0 |
#define | FREQ_SCALE 1. |
#define | ANGLE2X(a) (spx_cos(a)) |
#define | X2ANGLE(x) (acos(x)) |
#define | SIGN_CHANGE(a, b) (((a)*(b))<0.0) |
Functions | |
int | lpc_to_lsp (spx_coef_t *a, int lpcrdr, spx_lsp_t *freq, int nb, spx_word16_t delta, char *stack) |
void | lsp_to_lpc (spx_lsp_t *freq, spx_coef_t *ak, int lpcrdr, char *stack) |
void | lsp_enforce_margin (spx_lsp_t *lsp, int len, spx_word16_t margin) |
void | lsp_interpolate (spx_lsp_t *old_lsp, spx_lsp_t *new_lsp, spx_lsp_t *interp_lsp, int len, int subframe, int nb_subframes) |
#define ANGLE2X | ( | a | ) | (spx_cos(a)) |
Referenced by lsp_to_lpc().
#define FREQ_SCALE 1. |
Referenced by lpc_to_lsp().
#define M_PI 3.14159265358979323846 |
Referenced by lsp_enforce_margin(), nb_encoder_ctl(), nb_encoder_init(), sb_encode(), sb_encoder_ctl(), sb_encoder_init(), speex_echo_state_init(), and spx_cos().
#define NULL 0 |
#define SIGN_CHANGE | ( | a, | |||
b | ) | (((a)*(b))<0.0) |
Referenced by lpc_to_lsp().
#define X2ANGLE | ( | x | ) | (acos(x)) |
Referenced by lpc_to_lsp().
int lpc_to_lsp | ( | spx_coef_t * | a, | |
int | lpcrdr, | |||
spx_lsp_t * | freq, | |||
int | nb, | |||
spx_word16_t | delta, | |||
char * | stack | |||
) |
References ADD16, ADD32, ALLOC, EXTEND32, FREQ_SCALE, LPC_SCALING, MULT16_16_Q14, MULT16_16_Q15, PSHR16, PSHR32, SIGN_CHANGE, SUB16, SUB32, VARDECL, and X2ANGLE.
Referenced by nb_encode(), and sb_encode().
void lsp_enforce_margin | ( | spx_lsp_t * | lsp, | |
int | len, | |||
spx_word16_t | margin | |||
) |
References LSP_SCALING, and M_PI.
Referenced by nb_decode(), nb_encode(), sb_decode(), and sb_encode().
void lsp_interpolate | ( | spx_lsp_t * | old_lsp, | |
spx_lsp_t * | new_lsp, | |||
spx_lsp_t * | interp_lsp, | |||
int | len, | |||
int | subframe, | |||
int | nb_subframes | |||
) |
Referenced by nb_decode(), nb_encode(), sb_decode(), and sb_encode().
void lsp_to_lpc | ( | spx_lsp_t * | freq, | |
spx_coef_t * | ak, | |||
int | lpcrdr, | |||
char * | stack | |||
) |
References ALLOC, ANGLE2X, NULL, and VARDECL.
Referenced by nb_decode(), nb_encode(), sb_decode(), and sb_encode().