Remove opus_dred_init()

This commit is contained in:
Jean-Marc Valin 2023-05-13 00:56:00 -04:00
parent 1312642f08
commit ebfa29c7e1
No known key found for this signature in database
GPG key ID: 531A52533318F00A
3 changed files with 0 additions and 23 deletions

View file

@ -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);

View file

@ -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;
}

View file

@ -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: