diff --git a/lib_com/options.h b/lib_com/options.h index fb505d58f481299bb6523091c5fb389dfbd5ef51..57c086afb35424dee7a8ab0fb96606fb44bab42c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -180,6 +180,7 @@ #define FIX_1454_FIX_STEREO_TO_FOA_JBM /* VA: issue 1454: fix buggy stereo to FOA in JBM */ #define FIX_1461_CNG_BW_SWITCHING /* Eri: issue 1461: Stereo parameters are not updated when SID/NODATA forces BW to stay the same */ #define FIX_2252_LP_CNG_STARTS_SID /* VA: issues 2251 and 2252: fix LP CNG uninitialized value in bitstream that starts with an SID */ +#define FIX_1381_BWD /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/bw_detect.c b/lib_enc/bw_detect.c index 6a08b04d213b1a6440a57c579ca08a3bbb725a81..f5a404a9207410afd9427586d63a724ea31cad4e 100644 --- a/lib_enc/bw_detect.c +++ b/lib_enc/bw_detect.c @@ -53,6 +53,9 @@ *-------------------------------------------------------------------*/ #define BWD_MIN_BRATE_WIDER_BW_MDCT IVAS_48k +#ifdef FIX_1381_BWD +#define BWD_MIN_BRATE_WIDER_BW_MASA IVAS_48k +#endif #define BWD_MIN_BRATE_WIDER_BW_ISM IVAS_32k #define BWD_MAX_BRATE_WIDER_BW_MDCT IVAS_80k #define BWD_MAX_BRATE_WIDER_BW_ISM IVAS_64k @@ -92,7 +95,12 @@ void bw_detect( bwd_count_wider_bw = BWD_COUNT_WIDER_BW; if ( st->ini_frame > 0 && ( ( st->element_mode == IVAS_CPE_MDCT && ( st->element_brate >= BWD_MIN_BRATE_WIDER_BW_MDCT || mct_on ) ) || +#ifdef FIX_1381_BWD + ( st->is_ism_format && st->element_brate >= BWD_MIN_BRATE_WIDER_BW_ISM ) || + ( ivas_format == MASA_FORMAT && st->element_brate >= BWD_MIN_BRATE_WIDER_BW_MASA ) ) ) +#else ( ivas_format == ISM_FORMAT && st->element_brate >= BWD_MIN_BRATE_WIDER_BW_ISM ) ) ) +#endif { bwd_count_wider_bw = BWD_COUNT_WIDER_BW_MDCT; }