ref: 26c0becdd9c35dd1a52e0202ac5129a524645e04
parent: ee44943c9552ae27b7f59d22c51655e2fe2918cd
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Tue Jan 10 22:58:28 EST 2023
Fixes build when ENABLE_NEURAL_FEC is off
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -904,7 +904,6 @@
break;
case OPUS_RESET_STATE:
{
- dred_deinit_decoder(&st->dred_decoder);
OPUS_CLEAR((char*)&st->OPUS_DECODER_RESET_START,
sizeof(OpusDecoder)-
((char*)&st->OPUS_DECODER_RESET_START - (char*)st));
@@ -1075,6 +1074,7 @@
int opus_decoder_dred_input(OpusDecoder *st, const unsigned char *data,
opus_int32 len, int offset)
{
+#ifdef ENABLE_NEURAL_FEC
const unsigned char *data0;
int len0;
const unsigned char *payload = NULL;
@@ -1128,5 +1128,6 @@
lpcnet_plc_fec_clear(silk_dec->sPLC.lpcnet);
return st->nb_fec_frames;
}
+#endif
return 0;
}
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1884,10 +1884,12 @@
st->silk_bw_switch = 1;
}
} else {
+#ifdef ENABLE_NEURAL_FEC
/* If we're not in SILK mode, delete all the processed DRED.
TODO: Remove this if/when DRED gets encoded for CELT. */
DREDEnc *dred = &((silk_encoder*)silk_enc)->state_Fxx[0].sCmn.dred_encoder;
dred->latents_buffer_fill = 0;
+#endif
}
/* CELT processing */
--
⑨