summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-05-13 00:56:00 -0400
committerJean-Marc Valin <jmvalin@amazon.com>2023-05-13 00:56:00 -0400
commita804790a012f275574bd0ccba9660596022b703e (patch)
treebe75cf254327d7f8435bb7c1144fee40f10708e3
parent67e5a7efd87eec49a25da764d57ccb47da81eef1 (diff)
downloadopus-a804790a012f275574bd0ccba9660596022b703e.tar.gz
Remove opus_dred_init()
-rw-r--r--include/opus.h2
-rw-r--r--silk/dred_decoder.c15
-rw-r--r--src/opus_decoder.c6
3 files changed, 0 insertions, 23 deletions
diff --git a/include/opus.h b/include/opus.h
index 58c9f8f3..e1d0aca2 100644
--- a/include/opus.h
+++ b/include/opus.h
@@ -516,8 +516,6 @@ OPUS_EXPORT void opus_decoder_destroy(OpusDecoder *st);
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);
diff --git a/silk/dred_decoder.c b/silk/dred_decoder.c
index ca505bb3..ec1bef9d 100644
--- 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 @@ int opus_dred_get_size(void)
OpusDRED *opus_dred_create(int *error)
{
- int ret;
OpusDRED *dec;
dec = (OpusDRED *)opus_alloc(opus_dred_get_size());
if (dec == NULL)
@@ -59,14 +52,6 @@ OpusDRED *opus_dred_create(int *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;
}
diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index e5480941..a47f6118 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -155,9 +155,6 @@ int opus_decoder_init(OpusDecoder *st, opus_int32 Fs, int channels)
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 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...)
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: