mirror of
https://github.com/xiph/opus.git
synced 2025-06-01 08:07:41 +00:00
Fix the "no lookahead" case
This commit is contained in:
parent
71a2656768
commit
81229a7412
2 changed files with 5 additions and 1 deletions
|
@ -106,10 +106,12 @@ void run_frame_network(LPCNetState *lpcnet, float *gru_a_condition, float *gru_b
|
|||
compute_dense(&gru_b_dense_feature, gru_b_condition, condition);
|
||||
#ifdef END2END
|
||||
rc2lpc(lpc, rc);
|
||||
#else
|
||||
#elif FEATURES_DELAY>0
|
||||
memcpy(lpc, lpcnet->old_lpc[FEATURES_DELAY-1], LPC_ORDER*sizeof(lpc[0]));
|
||||
memmove(lpcnet->old_lpc[1], lpcnet->old_lpc[0], (FEATURES_DELAY-1)*LPC_ORDER*sizeof(lpc[0]));
|
||||
lpc_from_cepstrum(lpcnet->old_lpc[0], features);
|
||||
#else
|
||||
lpc_from_cepstrum(lpc, features);
|
||||
#endif
|
||||
if (lpcnet->frame_count < 1000) lpcnet->frame_count++;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,9 @@ struct LPCNetState {
|
|||
NNetState nnet;
|
||||
int last_exc;
|
||||
float last_sig[LPC_ORDER];
|
||||
#if FEATURES_DELAY>0
|
||||
float old_lpc[FEATURES_DELAY][LPC_ORDER];
|
||||
#endif
|
||||
float sampling_logit_table[256];
|
||||
int frame_count;
|
||||
float deemph_mem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue