ref: ebfa29c7e1a435bb6a85a64a317272506359cea2
parent: 1312642f08310fca0466b227611023c2dec40065
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Fri May 12 20:56:00 EDT 2023
Remove opus_dred_init()
--- a/include/opus.h
+++ b/include/opus.h
@@ -516,8 +516,6 @@
OPUS_EXPORT int opus_dred_get_size(void);
-OPUS_EXPORT int opus_dred_init(OpusDRED *dec);
-
OPUS_EXPORT OpusDRED *opus_dred_create(int *error);
OPUS_EXPORT void opus_dred_destroy(OpusDRED *dec);
--- a/silk/dred_decoder.c
+++ b/silk/dred_decoder.c
@@ -37,12 +37,6 @@
#include "celt/entdec.h"
-int opus_dred_init(OpusDRED *dec)
-{
- memset(dec, 0, sizeof(*dec));
- return OPUS_OK;
-}
-
int opus_dred_get_size(void)
{
return sizeof(OpusDRED);
@@ -50,7 +44,6 @@
OpusDRED *opus_dred_create(int *error)
{
- int ret;
OpusDRED *dec;
dec = (OpusDRED *)opus_alloc(opus_dred_get_size());
if (dec == NULL)
@@ -58,14 +51,6 @@
if (error)
*error = OPUS_ALLOC_FAIL;
return NULL;
- }
- ret = opus_dred_init(dec);
- if (error)
- *error = ret;
- if (ret != OPUS_OK)
- {
- opus_free(dec);
- dec = NULL;
}
return dec;
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -155,9 +155,6 @@
celt_decoder_ctl(celt_dec, CELT_SET_SIGNALLING(0));
-#ifdef ENABLE_NEURAL_FEC
- opus_dred_init(&st->dred_decoder);
-#endif
st->prev_mode = 0;
st->frame_size = Fs/400;
st->arch = opus_select_arch();
@@ -912,9 +909,6 @@
silk_InitDecoder( silk_dec );
st->stream_channels = st->channels;
st->frame_size = st->Fs/400;
-#ifdef ENABLE_NEURAL_FEC
- opus_dred_init(&st->dred_decoder);
-#endif
}
break;
case OPUS_GET_SAMPLE_RATE_REQUEST:
--
⑨