diff options
Diffstat (limited to 'newamp1.h')
| -rw-r--r-- | newamp1.h | 86 |
1 files changed, 43 insertions, 43 deletions
| @@ -30,57 +30,57 @@ | |||
| 30 | #ifndef __NEWAMP1__ | 30 | #ifndef __NEWAMP1__ |
| 31 | #define __NEWAMP1__ | 31 | #define __NEWAMP1__ |
| 32 | 32 | ||
| 33 | #define NEWAMP1_N_INDEXES 4 /* Number of indexes to pack: vq1, vq2, energy, Wo */ | 33 | #define NEWAMP1_N_INDEXES \ |
| 34 | #define NEWAMP1_PHASE_NFFT 128 /* size of FFT used for phase synthesis */ | 34 | 4 /* Number of indexes to pack: vq1, vq2, energy, Wo */ |
| 35 | #define NEWAMP1_K 20 /* rate K vector length */ | 35 | #define NEWAMP1_PHASE_NFFT \ |
| 36 | 128 /* size of FFT used for phase synthesis */ | ||
| 37 | #define NEWAMP1_K 20 /* rate K vector length */ | ||
| 38 | #define NEWAMP1_VQ_MBEST_DEPTH \ | ||
| 39 | 5 /* how many candidates we keep for each stage of mbest search */ | ||
| 36 | 40 | ||
| 37 | #include "codec2_fft.h" | 41 | #include "codec2_fft.h" |
| 38 | #include "comp.h" | 42 | #include "comp.h" |
| 39 | 43 | ||
| 40 | void interp_para(float y[], float xp[], float yp[], int np, float x[], int n); | 44 | void interp_para(float y[], float xp[], float yp[], int np, float x[], int n); |
| 41 | float ftomel(float fHz); | 45 | float ftomel(float fHz); |
| 42 | void mel_sample_freqs_kHz(float rate_K_sample_freqs_kHz[], int K, float mel_start, float mel_end); | 46 | void mel_sample_freqs_kHz(float rate_K_sample_freqs_kHz[], int K, |
| 43 | void resample_const_rate_f(C2CONST *c2const, MODEL *model, float rate_K_vec[], float rate_K_sample_freqs_kHz[], int K); | 47 | float mel_start, float mel_end); |
| 44 | float rate_K_mbest_encode(int *indexes, float *x, float *xq, int ndim, int mbest_entries); | 48 | void resample_const_rate_f(C2CONST *c2const, MODEL *model, float rate_K_vec[], |
| 45 | void post_filter_newamp1(float vec[], float sample_freq_kHz[], int K, float pf_gain); | 49 | float rate_K_sample_freqs_kHz[], int K); |
| 46 | void interp_Wo_v(float Wo_[], int L_[], int voicing_[], float Wo1, float Wo2, int voicing1, int voicing2); | 50 | float rate_K_mbest_encode(int *indexes, float *x, float *xq, int ndim, |
| 47 | void resample_rate_L(C2CONST *c2const, MODEL *model, float rate_K_vec[], float rate_K_sample_freqs_kHz[], int K); | 51 | int mbest_entries); |
| 48 | void determine_phase(C2CONST *c2const, COMP H[], MODEL *model, int Nfft, codec2_fft_cfg fwd_cfg, codec2_fft_cfg inv_cfg); | 52 | void post_filter_newamp1(float vec[], float sample_freq_kHz[], int K, |
| 49 | void newamp1_model_to_indexes(C2CONST *c2const, | 53 | float pf_gain); |
| 50 | int indexes[], | 54 | void interp_Wo_v(float Wo_[], int L_[], int voicing_[], float Wo1, float Wo2, |
| 51 | MODEL *model, | 55 | int voicing1, int voicing2); |
| 52 | float rate_K_vec[], | 56 | void resample_rate_L(C2CONST *c2const, MODEL *model, float rate_K_vec[], |
| 53 | float rate_K_sample_freqs_kHz[], | 57 | float rate_K_sample_freqs_kHz[], int K); |
| 54 | int K, | 58 | void determine_phase(C2CONST *c2const, COMP H[], MODEL *model, int Nfft, |
| 55 | float *mean, | 59 | codec2_fft_cfg fwd_cfg, codec2_fft_cfg inv_cfg); |
| 56 | float rate_K_vec_no_mean[], | 60 | void determine_autoc(C2CONST *c2const, float Rk[], int order, MODEL *model, |
| 57 | float rate_K_vec_no_mean_[], | 61 | int Nfft, codec2_fft_cfg fwd_cfg, codec2_fft_cfg inv_cfg); |
| 58 | float *se, | 62 | void newamp1_model_to_indexes(C2CONST *c2const, int indexes[], MODEL *model, |
| 59 | float *eq, | 63 | float rate_K_vec[], |
| 60 | int eq_en); | 64 | float rate_K_sample_freqs_kHz[], int K, |
| 61 | void newamp1_indexes_to_rate_K_vec(float rate_K_vec_[], | 65 | float *mean, float rate_K_vec_no_mean[], |
| 62 | float rate_K_vec_no_mean_[], | 66 | float rate_K_vec_no_mean_[], float *se, float *eq, |
| 63 | float rate_K_sample_freqs_kHz[], | 67 | int eq_en); |
| 64 | int K, | 68 | void newamp1_indexes_to_rate_K_vec(float rate_K_vec_[], |
| 65 | float *mean_, | 69 | float rate_K_vec_no_mean_[], |
| 66 | int indexes[], | 70 | float rate_K_sample_freqs_kHz[], int K, |
| 71 | float *mean_, int indexes[], | ||
| 67 | float user_rate_K_vec_no_mean_[], | 72 | float user_rate_K_vec_no_mean_[], |
| 68 | int post_filter_en); | 73 | int post_filter_en); |
| 69 | void newamp1_interpolate(float interpolated_surface_[], float left_vec[], float right_vec[], int K); | 74 | void newamp1_interpolate(float interpolated_surface_[], float left_vec[], |
| 70 | 75 | float right_vec[], int K); | |
| 71 | void newamp1_indexes_to_model(C2CONST *c2const, | 76 | void newamp1_eq(float rate_K_vec_no_mean[], float eq[], int K, int eq_en); |
| 72 | MODEL model_[], | 77 | void newamp1_indexes_to_model(C2CONST *c2const, MODEL model_[], COMP H[], |
| 73 | COMP H[], | 78 | float interpolated_surface_[], |
| 74 | float interpolated_surface_[], | 79 | float prev_rate_K_vec_[], float *Wo_left, |
| 75 | float prev_rate_K_vec_[], | 80 | int *voicing_left, |
| 76 | float *Wo_left, | 81 | float rate_K_sample_freqs_kHz[], int K, |
| 77 | int *voicing_left, | 82 | codec2_fft_cfg fwd_cfg, codec2_fft_cfg inv_cfg, |
| 78 | float rate_K_sample_freqs_kHz[], | 83 | int indexes[], float user_rate_K_vec_no_mean_[], |
| 79 | int K, | ||
| 80 | codec2_fft_cfg fwd_cfg, | ||
| 81 | codec2_fft_cfg inv_cfg, | ||
| 82 | int indexes[], | ||
| 83 | float user_rate_K_vec_no_mean_[], | ||
| 84 | int post_filter_en); | 84 | int post_filter_en); |
| 85 | 85 | ||
| 86 | #endif | 86 | #endif |
