Fix non-DRED build

This commit is contained in:
Jean-Marc Valin 2023-06-13 00:24:17 -04:00
parent 3e6a736cbb
commit 02f352c75e
No known key found for this signature in database
GPG key ID: 531A52533318F00A
3 changed files with 8 additions and 6 deletions

View file

@ -17,4 +17,7 @@ lpcnet/src/dred_rdovae_enc.c \
lpcnet/src/dred_rdovae_enc_data.c \
lpcnet/src/dred_rdovae_dec.c \
lpcnet/src/dred_rdovae_dec_data.c \
lpcnet/src/dred_rdovae_stats_data.c
lpcnet/src/dred_rdovae_stats_data.c \
silk/dred_encoder.c \
silk/dred_coding.c \
silk/dred_decoder.c

View file

@ -75,10 +75,7 @@ silk/stereo_decode_pred.c \
silk/stereo_encode_pred.c \
silk/stereo_find_predictor.c \
silk/stereo_quant_pred.c \
silk/LPC_fit.c \
silk/dred_encoder.c \
silk/dred_coding.c \
silk/dred_decoder.c
silk/LPC_fit.c
SILK_SOURCES_X86_RTCD = \
silk/x86/x86_silk_map.c

View file

@ -1141,6 +1141,7 @@ int opus_dred_decoder_get_size(void)
return sizeof(OpusDREDDecoder);
}
#ifdef ENABLE_NEURAL_FEC
int dred_decoder_load_model(OpusDREDDecoder *dec, const unsigned char *data, int len)
{
WeightArray *list;
@ -1150,10 +1151,11 @@ int dred_decoder_load_model(OpusDREDDecoder *dec, const unsigned char *data, int
free(list);
return (ret == 0) ? OPUS_OK : OPUS_BAD_ARG;
}
#endif
int opus_dred_decoder_init(OpusDREDDecoder *dec)
{
#ifndef USE_WEIGHTS_FILE
#if defined(ENABLE_NEURAL_FEC) && !defined(USE_WEIGHTS_FILE)
init_rdovaedec(&dec->model, rdovae_dec_arrays);
#endif
dec->arch = opus_select_arch();