Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-10-18 23:23:31 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-10-18 23:23:31 +0300
commitc9346f4399b7c10997f4fa3cef37fe480e19b777 (patch)
tree7dc74d6328452e7be9474d5f10ea879e44741926
parent78db7a6bfe1d084f8fe634d82186e16823f66fbf (diff)
One extra frame of anslysis
-rw-r--r--dnn/lpcnet_plc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/dnn/lpcnet_plc.c b/dnn/lpcnet_plc.c
index 3d8aa2be..910fe935 100644
--- a/dnn/lpcnet_plc.c
+++ b/dnn/lpcnet_plc.c
@@ -170,7 +170,7 @@ static void replace_features(LPCNetPLCState *st, const float *features) {
int lpcnet_plc_update(LPCNetPLCState *st, opus_int16 *pcm) {
int i;
if (st->blend) {
- st->analysis_pos = PLC_BUF_SIZE;
+ st->analysis_pos = PLC_BUF_SIZE-FRAME_SIZE;
}
if (st->analysis_pos - FRAME_SIZE >= 0) st->analysis_pos -= FRAME_SIZE;
OPUS_MOVE(st->pcm, &st->pcm[FRAME_SIZE], PLC_BUF_SIZE-FRAME_SIZE);
@@ -191,9 +191,7 @@ int lpcnet_plc_conceal(LPCNetPLCState *st, opus_int16 *pcm) {
for (i=0;i<FRAME_SIZE;i++) x[i] = 32768.f*st->pcm[st->analysis_pos+i];
burg_cepstral_analysis(plc_features, x);
lpcnet_compute_single_frame_features_float(&st->enc, x, st->features);
- if (count == 0) {
- if (FEATURES_DELAY > 0) st->plc_net = st->plc_copy[FEATURES_DELAY-1];
- } else {
+ if (count > 0) {
if (count == 1) replace_features(st, st->features);
else queue_features(st, st->features);
OPUS_COPY(&plc_features[2*NB_BANDS], st->features, NB_FEATURES);