#include "vbr.h"
#include <math.h>
Defines | |
#define | sqr(x) ((x)*(x)) |
#define | MIN_ENERGY 6000 |
#define | NOISE_POW .3 |
Functions | |
void | vbr_init (VBRState *vbr) |
float | vbr_analysis (VBRState *vbr, spx_word16_t *sig, int len, int pitch, float pitch_coef) |
void | vbr_destroy (VBRState *vbr) |
Variables | |
const float | vbr_nb_thresh [9][11] |
const float | vbr_hb_thresh [5][11] |
const float | vbr_uhb_thresh [2][11] |
#define MIN_ENERGY 6000 |
#define NOISE_POW .3 |
#define sqr | ( | x | ) | ((x)*(x)) |
float vbr_analysis | ( | VBRState * | vbr, | |
spx_word16_t * | sig, | |||
int | len, | |||
int | pitch, | |||
float | pitch_coef | |||
) |
void vbr_destroy | ( | VBRState * | vbr | ) |
void vbr_init | ( | VBRState * | vbr | ) |
const float vbr_hb_thresh[5][11] |
Initial value:
{ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}, {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}, {11.0, 11.0, 9.5, 8.5, 7.5, 6.0, 5.0, 3.9, 3.0, 2.0, 1.0}, {11.0, 11.0, 11.0, 11.0, 11.0, 9.5, 8.7, 7.8, 7.0, 6.5, 4.0}, {11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 9.8, 7.5, 5.5} }
const float vbr_nb_thresh[9][11] |
Initial value:
{ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}, { 3.5, 2.5, 2.0, 1.2, 0.5, 0.0, -0.5, -0.7, -0.8, -0.9, -1.0}, {10.0, 6.5, 5.2, 4.5, 3.9, 3.5, 3.0, 2.5, 2.3, 1.8, 1.0}, {11.0, 8.8, 7.5, 6.5, 5.0, 3.9, 3.9, 3.9, 3.5, 3.0, 1.0}, {11.0, 11.0, 9.9, 9.0, 8.0, 7.0, 6.5, 6.0, 5.0, 4.0, 2.0}, {11.0, 11.0, 11.0, 11.0, 9.5, 9.0, 8.0, 7.0, 6.5, 5.0, 3.0}, {11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 9.5, 8.5, 8.0, 6.5, 4.0}, {11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 9.8, 7.5, 5.5}, { 8.0, 5.0, 3.7, 3.0, 2.5, 2.0, 1.8, 1.5, 1.0, 0.0, 0.0} }
const float vbr_uhb_thresh[2][11] |
Initial value:
{ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0}, { 3.9, 2.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0} }