float ak[2][LPC_ORD+1];
int i,j;
unsigned int nbit = 0;
- COMP Aw[2][FFT_ENC];
+ COMP Aw[FFT_ENC];
assert(c2 != NULL);
for(i=0; i<2; i++) {
lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0,
- c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, &Aw[i][0]);
+ c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, Aw);
apply_lpc_correction(&model[i]);
+ synthesise_one_frame(c2, &speech[N*i], &model[i], Aw);
}
- /* synthesise ------------------------------------------------*/
-
- for(i=0; i<2; i++)
- synthesise_one_frame(c2, &speech[N*i], &model[i], &Aw[i][0]);
-
/* update memories for next frame ----------------------------*/
c2->prev_model_dec = model[1];
float ak[2][LPC_ORD+1];
int i,j;
unsigned int nbit = 0;
- COMP Aw[2][FFT_ENC];
+ COMP Aw[FFT_ENC];
assert(c2 != NULL);
for(i=0; i<2; i++) {
lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0,
- c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, &Aw[i][0]);
+ c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, Aw);
apply_lpc_correction(&model[i]);
+ synthesise_one_frame(c2, &speech[N*i], &model[i], Aw);
}
- /* synthesise ------------------------------------------------*/
-
- for(i=0; i<2; i++)
- synthesise_one_frame(c2, &speech[N*i], &model[i], &Aw[i][0]);
-
/* update memories for next frame ----------------------------*/
c2->prev_model_dec = model[1];
int i,j;
unsigned int nbit = 0;
float weight;
- COMP Aw[4][FFT_ENC];
+ COMP Aw[FFT_ENC];
assert(c2 != NULL);
for(i=0; i<4; i++) {
lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0,
- c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, &Aw[i][0]);
+ c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, Aw);
apply_lpc_correction(&model[i]);
+ synthesise_one_frame(c2, &speech[N*i], &model[i], Aw);
}
- /* synthesise ------------------------------------------------*/
-
- for(i=0; i<4; i++)
- synthesise_one_frame(c2, &speech[N*i], &model[i], &Aw[i][0]);
-
/* update memories for next frame ----------------------------*/
c2->prev_model_dec = model[3];
int i,j;
unsigned int nbit = 0;
float weight;
- COMP Aw[4][FFT_ENC];
+ COMP Aw[FFT_ENC];
assert(c2 != NULL);
for(i=0; i<4; i++) {
lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0,
- c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, &Aw[i][0]);
+ c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, Aw);
apply_lpc_correction(&model[i]);
+ synthesise_one_frame(c2, &speech[N*i], &model[i], Aw);
}
- /* synthesise ------------------------------------------------*/
-
- for(i=0; i<4; i++)
- synthesise_one_frame(c2, &speech[N*i], &model[i], &Aw[i][0]);
-
/* update memories for next frame ----------------------------*/
c2->prev_model_dec = model[3];
int i,j;
unsigned int nbit = 0;
float weight;
- COMP Aw[4][FFT_ENC];
+ COMP Aw[FFT_ENC];
PROFILE_VAR(recover_start);
assert(c2 != NULL);
for(i=0; i<4; i++) {
lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0,
- c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, &Aw[i][0]);
+ c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, Aw);
apply_lpc_correction(&model[i]);
+ synthesise_one_frame(c2, &speech[N*i], &model[i], Aw);
}
PROFILE_SAMPLE_AND_LOG2(recover_start, " recover");
#ifdef DUMP
dump_ak_(&ak[3][0], LPC_ORD);
#endif
- /* synthesise ------------------------------------------------*/
-
- for(i=0; i<4; i++)
- synthesise_one_frame(c2, &speech[N*i], &model[i], &Aw[i][0]);
-
/* update memories for next frame ----------------------------*/
c2->prev_model_dec = model[3];
int i,j;
unsigned int nbit = 0;
float weight;
- COMP Aw[4][FFT_ENC];
+ COMP Aw[FFT_ENC];
assert(c2 != NULL);
for(i=0; i<4; i++) {
lsp_to_lpc(&lsps[i][0], &ak[i][0], LPC_ORD);
aks_to_M2(c2->fft_fwd_cfg, &ak[i][0], LPC_ORD, &model[i], e[i], &snr, 0, 0,
- c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, &Aw[i][0]);
+ c2->lpc_pf, c2->bass_boost, c2->beta, c2->gamma, Aw);
apply_lpc_correction(&model[i]);
+ synthesise_one_frame(c2, &speech[N*i], &model[i], Aw);
}
- /* synthesise ------------------------------------------------*/
-
- for(i=0; i<4; i++)
- synthesise_one_frame(c2, &speech[N*i], &model[i], &Aw[i][0]);
-
/* update memories for next frame ----------------------------*/
c2->prev_model_dec = model[3];