From 9f29538337abe80ec71e2333ec272031ce0d0467 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 22 Sep 2022 16:42:49 +0200 Subject: [PATCH] extend temporary fix to keep EVS bit-exactness --- lib_enc/bw_detect.c | 1 - lib_enc/ivas_init_enc.c | 1 + lib_enc/lib_enc.c | 4 +++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib_enc/bw_detect.c b/lib_enc/bw_detect.c index c1357a7f74..c2955f1f39 100644 --- a/lib_enc/bw_detect.c +++ b/lib_enc/bw_detect.c @@ -494,7 +494,6 @@ void bw_detect( st->input_bwidth = st->max_bwidth; } - if ( st->element_mode == EVS_MONO ) { set_bw( -1, -1, st, st->codec_mode ); diff --git a/lib_enc/ivas_init_enc.c b/lib_enc/ivas_init_enc.c index 34868ebefc..8d9f7e445e 100644 --- a/lib_enc/ivas_init_enc.c +++ b/lib_enc/ivas_init_enc.c @@ -233,6 +233,7 @@ void copy_encoder_config( st->force = st_ivas->hEncoderConfig->force; #endif st->element_mode = st_ivas->hEncoderConfig->element_mode_init; + return; } diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index ede42ddeaf..ef5c621fec 100644 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -1905,12 +1905,14 @@ static void updateBandwidthFromFs( } #endif + #ifdef FIX_I74_BW_LIMITATION_ALT /*---------------------------------------------------------------------* * sanitizeBandwidth() * * *---------------------------------------------------------------------*/ + static ivas_error sanitizeBandwidth( const IVAS_ENC_HANDLE hIvasEnc ) { @@ -1967,7 +1969,6 @@ static ivas_error sanitizeBandwidth( { max_bwidth_tmp = WB; } -#endif /* in case of 8kHz input sampling or "-max_band NB", require the total bitrate to be below 24.40 kbps */ if ( ( max_bwidth_tmp == NB || hEncoderConfig->input_Fs == 8000 ) && hEncoderConfig->ivas_total_brate > ACELP_24k40 ) @@ -1981,6 +1982,7 @@ static ivas_error sanitizeBandwidth( return IVAS_ERR_INVALID_BITRATE; } } +#endif } else { -- GitLab