diff options
author | Jean-Marc Valin <jmvalin@amazon.com> | 2023-11-07 10:52:40 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2023-11-07 10:52:40 +0300 |
commit | b6095cf22d501cb1950685e46b334b0a2ca7e78b (patch) | |
tree | 7b53a0a774c1f4bd8f2c79fe08d6e7d79a135f17 /silk | |
parent | 0ab0640d4ad41d765ab2b9916f7146c67fe56a3c (diff) |
DRED code cleanup
Removing some indirections
Diffstat (limited to 'silk')
-rw-r--r-- | silk/dred_encoder.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/silk/dred_encoder.c b/silk/dred_encoder.c index e4959b30..fb184103 100644 --- a/silk/dred_encoder.c +++ b/silk/dred_encoder.c @@ -47,6 +47,11 @@ #include "dred_rdovae_stats_data.h" +static void DRED_rdovae_init_encoder(RDOVAEEncState *enc_state) +{ + memset(enc_state, 0, sizeof(*enc_state)); +} + int dred_encoder_load_model(DREDEnc* enc, const unsigned char *data, int len) { WeightArray *list; @@ -100,7 +105,7 @@ static void dred_process_frame(DREDEnc *enc) OPUS_COPY(input_buffer + DRED_NUM_FEATURES, feature_buffer + 36, DRED_NUM_FEATURES); /* run RDOVAE encoder */ - DRED_rdovae_encode_dframe(&enc->rdovae_enc, &enc->model, enc->latents_buffer, enc->state_buffer, input_buffer); + dred_rdovae_encode_dframe(&enc->rdovae_enc, &enc->model, enc->latents_buffer, enc->state_buffer, input_buffer); enc->latents_buffer_fill = IMIN(enc->latents_buffer_fill+1, DRED_NUM_REDUNDANCY_FRAMES); } |