diff --git a/lib_com/ivas_stereo_td_bit_alloc.c b/lib_com/ivas_stereo_td_bit_alloc.c index 5dfb2b0e3dde29fbb244db559db978d5abfd16b6..22de0bd41a2d4b16eec15382c5cf4c46b0efbe28 100644 --- a/lib_com/ivas_stereo_td_bit_alloc.c +++ b/lib_com/ivas_stereo_td_bit_alloc.c @@ -419,18 +419,27 @@ void tdm_bit_alloc( } *total_brate_sec += ( fast_FCB_rates_2sfr[idx] - tmp_rate ); } +#ifndef NONBE_FIX_751_MASA_TD_BITRATE_CHECK /* prevent 2.4 kb/s and 2.8 kb/s as they are reserved bitrates for DTX and VBR */ if ( *total_brate_sec == PPP_NELP_2k80 || *total_brate_sec == SID_2k40 ) { *total_brate_sec += 100; } - +#endif /* To prevent 13.2 kb/s for primary channel as some bitstream issues arrise with it */ if ( element_brate_wo_meta - *total_brate_sec == ACELP_13k20 ) { *total_brate_sec += 100; } } +#ifdef NONBE_FIX_751_MASA_TD_BITRATE_CHECK + /* prevent 2.4 kb/s and 2.8 kb/s as they are reserved bitrates for DTX and VBR */ + if ( *total_brate_sec == PPP_NELP_2k80 || *total_brate_sec == SID_2k40 ) + { + *total_brate_sec -= 100; + } + +#endif *total_brate_pri = element_brate_wo_meta - *total_brate_sec; return; diff --git a/lib_com/options.h b/lib_com/options.h index 7e314469c2e0274c4344a3a4ffb77c89fd839af9..6e0e5324b721c23ebc99e2ef2cb2bd113611987c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -171,6 +171,7 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ +#define NONBE_FIX_751_MASA_TD_BITRATE_CHECK /* Nokia: issue 751: prevents secondary channel to take reserved bitrate if not DTX mode */ #define NONBE_FIX_736_FOA_BR_SWITCH /* FhG/Dlb : Issue 736: FOA bitrate switching decoding crashes in in ivas_spar_to_dirac */ #define NONBE_FIX_746_NONDIEGETIC_MD /* Eri: Issue 746: The non-diegetic panning flag affects the encoder bitstream even if extended metadata is not enabled. Crashes the decoder.*/ #define NONBE_FIX_729_ASAN_2ISM_ACELP /* VA: issue 729: fix ASAN ACELP errors with 2 ISM coding using LTV */