diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index abf0e1f663a0076bc04cee7d25dcdb4a8ccda9e1..dbaf718348609e10c448b388d28e19e214383763 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -836,6 +836,9 @@ typedef enum { #define SBA_MIN_BRATE_HOA IVAS_256k #define SBA_NHARM_HOA3 16 #define SBA_T_DESIGN_11_SIZE 70 +#ifdef FIX_SBA_DTX_DECODE_ERROR +#define SBA_DTX_BITRATE_THRESHOLD IVAS_80k +#endif typedef enum { diff --git a/lib_com/options.h b/lib_com/options.h index deb1f92ac29075845e927f840afcd5a803e34d12..9bdbbc81aad8448ff940a6a3c2bf795c0c91c3fb 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -152,6 +152,7 @@ #endif #define FIX_I173_I174 /* Issues 173 and 174: Remove frame and subframe index from ISm metadata and headtracking respectively. */ #define FIX_TCX_DEC_RECONF_BFI +#define FIX_SBA_DTX_DECODE_ERROR /* Issue 176: SBA decoder error with DTX at 80kbps SWB, Issue 21: SBA front-VAD threshold (203) */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_enc/ivas_front_vad.c b/lib_enc/ivas_front_vad.c index 1d18af77618cb3559500afb8fd06dd1e2f34b1cd..62eeee5a021b49f148e1b2b73f6dfb4175699f18 100644 --- a/lib_enc/ivas_front_vad.c +++ b/lib_enc/ivas_front_vad.c @@ -396,7 +396,11 @@ ivas_error front_vad_spar( hFrontVad = hSpar->hFrontVad; st = hSpar->hCoreCoderVAD; +#ifdef FIX_SBA_DTX_DECODE_ERROR + if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_total_brate <= SBA_DTX_BITRATE_THRESHOLD ) +#else if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_total_brate <= IVAS_80k ) +#endif { /*------------------------------------------------------------------* * Initialization diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 1beab643d5ba0985d7b74e3d48f0db402c95b8c1..6c82fc423092f32c4211397f1cf75a5cc61b9754 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -319,8 +319,13 @@ ivas_error ivas_spar_enc( *nb_bits_metadata = hMetaData->nb_bits_tot; +#ifdef FIX_SBA_DTX_DECODE_ERROR + /* Force IVAS front pre-proc decision for higher bitrates */ + if ( hEncoderConfig->ivas_total_brate > SBA_DTX_BITRATE_THRESHOLD || hEncoderConfig->Opt_DTX_ON == 0 ) +#else /* temp hack to not force IVAS front pre-proc decision for higher bitrates */ if ( hEncoderConfig->ivas_total_brate > IVAS_64k || hEncoderConfig->Opt_DTX_ON == 0 ) +#endif { st_ivas->hSpar->front_vad_flag = 0; }