diff --git a/lib_com/basop_util.c b/lib_com/basop_util.c index 3b1a0cf21666618d0ad0f75ddf6170d36cbc2d81..8bc465e032ffd7bb9024c2a41e2c3ad041643298 100644 --- a/lib_com/basop_util.c +++ b/lib_com/basop_util.c @@ -2715,24 +2715,19 @@ void bufferCopyFx( } } -Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with unknown headroom */ - Word16 bufX32_exp, /* i: exponent of buffer bufX32 */ - const Word16 *bufY16, /* i: 16-bit buffer quite right-aligned */ - Word16 bufY16_exp, /* i: exponent of buffer bufY16 */ - Word16 len, /* i: buffer len to process */ -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH +Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with unknown headroom */ + Word16 bufX32_exp, /* i: exponent of buffer bufX32 */ + const Word16 *bufY16, /* i: 16-bit buffer quite right-aligned */ + Word16 bufY16_exp, /* i: exponent of buffer bufY16 */ + Word16 len, /* i: buffer len to process */ Word16 *exp, /* o: result exponent */ const Word16 is_ivas ) /* i: flag indicating IVAS to maintain EVS BE */ -#else - Word16 *exp ) /* o: result exponent */ -#endif { Word32 L_sum; Word16 shift, shift1, i; shift = getScaleFactor32( bufX32, len ); /* current available headroom */ -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH IF( EQ_16( is_ivas, 1 ) ) { shift = sub( shift, sub( 15, norm_s( len ) ) ); /* reduced required headroom */ @@ -2741,14 +2736,10 @@ Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with un { shift = sub( shift, sub( 14, norm_s( len ) ) ); /* reduced required headroom */ } -#else - shift = sub( shift, sub( 14, norm_s( len ) ) ); /* reduced required headroom */ -#endif L_sum = 0; /* Clear accu */ move32(); FOR( i = 0; i < len; i++ ) { -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH IF( EQ_16( is_ivas, 1 ) ) { L_sum = L_add( L_sum, Mpy_32_16_1( L_shl( bufX32[i], shift ), bufY16[i] ) ); @@ -2757,22 +2748,15 @@ Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with un { L_sum = L_mac0( L_sum, round_fx( L_shl( bufX32[i], shift ) ), bufY16[i] ); } -#else - L_sum = L_mac0( L_sum, round_fx( L_shl( bufX32[i], shift ) ), bufY16[i] ); -#endif } shift1 = norm_l( L_sum ); L_sum = L_shl( L_sum, shift1 ); /* return value */ shift = sub( add( bufX32_exp, bufY16_exp ), add( shift, shift1 ) ); -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH IF( EQ_16( is_ivas, 0 ) ) { shift = add( shift, 1 ); /* compensate for factor of 2 introduced by L_mac0 */ } -#else - shift = add( shift, 1 ); /* compensate for factor of 2 introduced by L_mac0 */ -#endif /* In case of NULL result, we want to have a 0 exponent too */ if ( L_sum == 0 ) shift = 0; diff --git a/lib_com/basop_util.h b/lib_com/basop_util.h index 19b0bb4aaf9535e1e737ce701b326825102876e8..4e777ef39397a933dab846e887952374f18ae9be 100644 --- a/lib_com/basop_util.h +++ b/lib_com/basop_util.h @@ -859,17 +859,13 @@ void bufferCopyFx( \return Word32 result of accumulated multiplications over Word32 array arg1 and Word16 array arg3 and Word16 pointer to exponent of the result */ -Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with unknown headroom */ - Word16 bufX32_exp, /* i: exponent of buffer bufX32 */ - const Word16 *bufY16, /* i: 16-bit buffer quite right-aligned */ - Word16 bufY16_exp, /* i: exponent of buffer bufY16 */ - Word16 len, /* i: buffer len to process */ -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH +Word32 dotWord32_16_Mant32Exp( const Word32 *bufX32, /* i: 32-bit buffer with unknown headroom */ + Word16 bufX32_exp, /* i: exponent of buffer bufX32 */ + const Word16 *bufY16, /* i: 16-bit buffer quite right-aligned */ + Word16 bufY16_exp, /* i: exponent of buffer bufY16 */ + Word16 len, /* i: buffer len to process */ Word16 *exp, /* o: result exponent */ const Word16 is_ivas ); /* i: flag indicating IVAS to maintain EVS BE */ -#else - Word16 *exp ); /* o: result exponent */ -#endif /*!********************************************************************** \brief Converts linear factor or energy to Decibel diff --git a/lib_com/options.h b/lib_com/options.h index e506d6b6524af5a40b242503b56345252da57191..64354c999c48f4ea907f89e0e860b0ce39de6e07 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -86,8 +86,6 @@ #define FIX_1990_SANITIZER_IN_REVERB_LOAD /* Nokia: Fix issue part of issue 1990 by introducing missing free of structure - keep until #2059 is addressed */ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ -#define FIX_BASOP_2620_ICBWE_GSMAPPING_DEAD_CLAMP /* FhG: remove dead (always-overwritten) gsMapping clamp in ic_bwe_enc_gsMapping_fx; float ref has no clamp */ -#define FIX_BASOP_2626_RC_UNI_DEC_READ_BITS_HANG /* FhG: BASOP #2626: rc_uni_dec_read_bits: replace loop counter tmp with UWord64; with UWord32 the division-substitute loop (tmp <= low) never terminates after the bit-error sentinel sets rc_low=0xFFFFFFFF -> decoder hang on corrupted bitstreams */ /* #################### End BE switches ################################## */ @@ -95,12 +93,7 @@ /* any switch which is non-be wrt. TS 26.251 V3.0 */ #define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */ -#define FIX_BASOP_2612_RESET_DECIM_MEM /* FhG: BASOP #2612: reset (zero) the 16k resampler memory of the secondary channel on DFT->TD stereo switch (otherwise -> fx overshoot) */ -#define FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT /* FhG: BASOP #2621: stereo_dft_generate_comfort_noise_fx flag_noisy_speech: compare (lp_speech-lp_noise) Q23 diff against 28.0 in Q23 (was vs integer 28 with q_lp_noise=0) */ -#define FIX_ISSUE_2618_PLC_RES_ATT_SCALING /* FhG: BASOP #2618: residual PLC burst attenuation, apply divide/Sqrt32 exponent so fac tracks exponent correctly */ -#define NONBE_FIX2614_LP_CNG_ASSERT /* FhG: */ #define FIX_FLOAT_1600_OMASA_WRONG_RENDER_PATH /* Nokia: float issue 1600: fix initialization condition of stereo type detection for OMASA */ -#define FIX_BASOP_1765_MASA1TC_CNG_MISMATCH /* Nokia: BASOP issue 1765: Improve accuracy of FD CNG noise estimation */ #define FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP /* FhG: BASOP #2627: accumulate 10^(ILD/10) using a dynamic exponent */ #define FIX_BASOP_2635_EFAP_ADD_VERTEX_ELE_ROUND /* FhG: BASOP #2635: round |elevation| with anint_fx before the 90deg subtraction in add_vertex_fx */ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index b7b0edaf722ebc8f56eadf2ca7c53f0bfdb89300..513f5f5881fb12ee9f54e95472709e52bb78173e 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -6420,12 +6420,8 @@ void noisy_speech_detection_fx( HANDLE_FD_CNG_DEC hFdCngDec, /* i/o: FD_CNG structure */ const Word16 vad, /* i : VAD flag */ const Word16 *syn, /* i : i time-domain frame */ -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH const Word16 Q, const Word16 is_ivas ); -#else - const Word16 Q ); -#endif void generate_comfort_noise_dec_fx( Word32 **bufferReal, /* o : matrix to real part of i bands */ diff --git a/lib_dec/acelp_core_dec_fx.c b/lib_dec/acelp_core_dec_fx.c index cdb551e700ba6ca8315252aa7e7a4f28f6daebdf..860bd3b4a22b2a7986d80bf7e7c7557c2bbf2195 100644 --- a/lib_dec/acelp_core_dec_fx.c +++ b/lib_dec/acelp_core_dec_fx.c @@ -1549,7 +1549,6 @@ ivas_error acelp_core_dec_fx( IF( st->idchan == 0 && ( st->flag_cna || ( EQ_16( st->cng_type, FD_CNG ) && LE_32( st->total_brate, ACELP_32k ) ) || ( st->cng_type == LP_CNG && LE_32( st->core_brate, SID_2k40 ) ) ) ) { /*Noisy speech detector*/ -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH IF( NE_16( st->element_mode, EVS_MONO ) ) { noisy_speech_detection_fx( st->hFdCngDec, st->VAD, psyn_fx, st->Q_syn, 1 ); @@ -1558,9 +1557,6 @@ ivas_error acelp_core_dec_fx( { noisy_speech_detection_fx( st->hFdCngDec, st->VAD, psyn_fx, st->Q_syn, 0 ); } -#else - noisy_speech_detection_fx( st->hFdCngDec, st->VAD, psyn_fx, st->Q_syn ); -#endif st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = mult_r( st->hFdCngDec->hFdCngCom->likelihood_noisy_speech, 32440 /*0.99 Q15*/ ); move16(); diff --git a/lib_dec/amr_wb_dec_fx.c b/lib_dec/amr_wb_dec_fx.c index fbe877f58c3d65c9cf93063dbe675d412873ac97..7a09a045a3864116216abaecf4706b6beef8e7c1 100644 --- a/lib_dec/amr_wb_dec_fx.c +++ b/lib_dec/amr_wb_dec_fx.c @@ -798,11 +798,7 @@ ivas_error amr_wb_dec_fx( move16(); /*Noisy speech detector*/ -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH noisy_speech_detection_fx( st_fx->hFdCngDec, st_fx->VAD, syn_fx, st_fx->Q_syn, 0 ); -#else - noisy_speech_detection_fx( st_fx->hFdCngDec, st_fx->VAD, syn_fx, st_fx->Q_syn ); -#endif st_fx->hFdCngDec->hFdCngCom->likelihood_noisy_speech = mult_r( st_fx->hFdCngDec->hFdCngCom->likelihood_noisy_speech, 32440 /*0.99 Q15*/ ); IF( st_fx->hFdCngDec->hFdCngCom->flag_noisy_speech != 0 ) diff --git a/lib_dec/evs_dec_fx.c b/lib_dec/evs_dec_fx.c index 85fde0949d609da0904f7a25015427f4a4023ab8..dcd02af8088081c14ba4b63ff288e0091488d39e 100644 --- a/lib_dec/evs_dec_fx.c +++ b/lib_dec/evs_dec_fx.c @@ -940,11 +940,7 @@ ivas_error evs_dec_fx( * -------------------------------------------------------------- */ HANDLE_FD_CNG_DEC hFdCngDec = st_fx->hFdCngDec; -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH noisy_speech_detection_fx( st_fx->hFdCngDec, st_fx->VAD && EQ_16( st_fx->m_frame_type, ACTIVE_FRAME ), output_sp, 0, 0 ); -#else - noisy_speech_detection_fx( st_fx->hFdCngDec, st_fx->VAD && EQ_16( st_fx->m_frame_type, ACTIVE_FRAME ), output_sp, 0 ); -#endif hFdCngDec->hFdCngCom->likelihood_noisy_speech = mult_r( hFdCngDec->hFdCngCom->likelihood_noisy_speech, 32440 /*0.99 Q15*/ ); /*Q15*/ if ( hFdCngDec->hFdCngCom->flag_noisy_speech != 0 ) diff --git a/lib_dec/fd_cng_dec_fx.c b/lib_dec/fd_cng_dec_fx.c index 6e9e948073e2ba95266df4038780a28db0c757bc..fbe73cc9c0b759a76fe2c526f3187b9111986f20 100644 --- a/lib_dec/fd_cng_dec_fx.c +++ b/lib_dec/fd_cng_dec_fx.c @@ -1481,11 +1481,7 @@ void perform_noise_estimation_dec_ivas_fx( FOR( p = 0; p < npart; p++ ) { temp = L_shl( msPeriodog[p], q_shift ); -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH msNoiseEst[p] = Madd_32_16( Mpy_32_16_r( msNoiseEst[p], add( sub( MAX_16, alpha ), 1 ) ), temp, alpha ); /*Q31 - hFdCngDec->msNoiseEst_exp*/ /* add one to alpha comp to get ONE_IN_Q15 - alpha */ -#else - msNoiseEst[p] = Madd_32_16( Mpy_32_16_r( msNoiseEst[p], sub( MAX_16, alpha ) ), temp, alpha ); /*Q31 - hFdCngDec->msNoiseEst_exp*/ -#endif move32(); } } @@ -1685,11 +1681,7 @@ void perform_noise_estimation_dec_ivas_fx( move16(); } } -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH *ptr_per = Madd_32_16( ( *ptr_per ), enr, add( sub( MAX_16, alpha ), 1 ) ); /*Q31 - enr_e*/ /* add one to alpha comp to get ONE_IN_Q15 - alpha */ -#else - *ptr_per = Madd_32_16( ( *ptr_per ), enr, sub( MAX_16, alpha ) ); /*Q31 - enr_e*/ -#endif move32(); ptr_per++; } @@ -2101,12 +2093,8 @@ void noisy_speech_detection_fx( HANDLE_FD_CNG_DEC hFdCngDec, /* i/o: FD_CNG structure */ const Word16 vad, /*Q0*/ const Word16 *syn, /* i : input time-domain frame Q*/ -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH const Word16 Q, const Word16 is_ivas ) -#else - const Word16 Q ) -#endif { Word16 i; Word32 tmp; @@ -2122,11 +2110,7 @@ void noisy_speech_detection_fx( IF( vad == 0 ) { -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH totalNoise = dotWord32_16_Mant32Exp( hFdCngDec->msNoiseEst, hFdCngDec->msNoiseEst_exp, hFdCngDec->psize_shaping_norm, hFdCngDec->psize_shaping_norm_exp, hFdCngDec->nFFTpart_shaping, &totalNoise_exp, is_ivas ); /*Q31 - totalNoise_exp*/ -#else - totalNoise = dotWord32_16_Mant32Exp( hFdCngDec->msNoiseEst, hFdCngDec->msNoiseEst_exp, hFdCngDec->psize_shaping_norm, hFdCngDec->psize_shaping_norm_exp, hFdCngDec->nFFTpart_shaping, &totalNoise_exp ); /*Q31 - totalNoise_exp*/ -#endif /* - logTotalNoise is scaled by LD_DATA_SCALE+2 diff --git a/lib_dec/ivas_range_uni_dec_fx.c b/lib_dec/ivas_range_uni_dec_fx.c index aa16565f6ce2cd14269f479056615330ad591f52..b53b72cefb5a227253e3c8851293556feeb82a57 100644 --- a/lib_dec/ivas_range_uni_dec_fx.c +++ b/lib_dec/ivas_range_uni_dec_fx.c @@ -380,11 +380,7 @@ UWord16 rc_uni_dec_read_bits( UWord32 val; UWord32 low; /* local copy (2 to 6 uses) */ UWord32 range; /* local copy (4 to 7 uses) */ -#ifdef FIX_BASOP_2626_RC_UNI_DEC_READ_BITS_HANG UWord64 tmp; -#else - UWord32 tmp; -#endif low = rc_st_dec->rc_low; /*Q0*/ range = rc_st_dec->rc_range; /*Q0*/ move32(); diff --git a/lib_dec/ivas_stereo_cng_dec_fx.c b/lib_dec/ivas_stereo_cng_dec_fx.c index 19ab714e989c5495092d375281c2d6004f539585..aa1d996ee4d4f06854562cb05ced8c35669028ff 100644 --- a/lib_dec/ivas_stereo_cng_dec_fx.c +++ b/lib_dec/ivas_stereo_cng_dec_fx.c @@ -345,9 +345,7 @@ static void stereo_dft_generate_comfort_noise_fx( { q_cngNoiseLevel_upd = s_min( q_cngNoiseLevel_upd, add( e_norm_temp[i], norm_l( cngNoiseLevel_upd[i] ) ) ); } -#ifdef NONBE_FIX2614_LP_CNG_ASSERT q_cngNoiseLevel_upd = s_min( q_cngNoiseLevel_upd, sub( 31, shr( st->hFdCngDec->bandNoiseShape_exp, 1 ) ) ); -#endif FOR( i = 0; i < st->L_frame; i++ ) { cngNoiseLevel_upd[i] = L_shl( cngNoiseLevel_upd[i], sub( q_cngNoiseLevel_upd, e_norm_temp[i] ) ); @@ -775,10 +773,6 @@ static void stereo_dft_generate_comfort_noise_fx( } ELSE IF( ( chan == 0 ) ) { -#ifndef FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT - Word16 q_lp_noise = 0; // st->hFdCngDec->q_lp_noise; // to be populated appropriately. - move16(); -#endif Word32 log_lp_noise = L_add( L_shl( lp_noise_e, Q25 ), BASOP_Util_Log2( L_add( lp_noise, DELTA_FX ) ) ); /* Q25 */ // log10(x) is computed as log2(x) * log10(2) // log_lp_noise at this stage is in Q25. where as the structure value is in Q23 @@ -788,11 +782,7 @@ static void stereo_dft_generate_comfort_noise_fx( move32(); st->lp_noise = st->hFdCngDec->lp_noise; /* Q23 */ move32(); -#ifdef FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT st->hFdCngDec->hFdCngCom->flag_noisy_speech = extract_l( LT_32( L_sub( st->hFdCngDec->lp_speech, st->hFdCngDec->lp_noise ), 234881024 /* 28.0f in Q23 */ ) ); /* Q0 */ -#else - st->hFdCngDec->hFdCngCom->flag_noisy_speech = extract_l( LT_32( L_shr( L_sub( st->hFdCngDec->lp_speech, st->hFdCngDec->lp_noise ), q_lp_noise ), 28 ) ); /* Q0 */ -#endif move16(); st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = add( mult_r( 32440 /* 0.99 in Q15 */, st->hFdCngDec->hFdCngCom->likelihood_noisy_speech ), mult_r( 328 /* 0.01 in Q15 */, st->hFdCngDec->hFdCngCom->flag_noisy_speech ) ); /* Q15 */ diff --git a/lib_dec/ivas_stereo_dft_plc_fx.c b/lib_dec/ivas_stereo_dft_plc_fx.c index 0ea6c33e595b6f729972eb02f53b64dde2f95033..078687023f403c386f9924657eb5bc0cf285925d 100644 --- a/lib_dec/ivas_stereo_dft_plc_fx.c +++ b/lib_dec/ivas_stereo_dft_plc_fx.c @@ -738,37 +738,22 @@ void stereo_dft_res_ecu_burst_att_fx( ) { Word32 fac; -#ifndef FIX_ISSUE_2618_PLC_RES_ATT_SCALING - Word16 q_fac; -#endif Word16 exponent; -#ifndef FIX_ISSUE_2618_PLC_RES_ATT_SCALING - q_fac = 0; - move16(); -#endif exponent = 0; move16(); /* attenuation of residual; follow attenuation of DMX */ IF( hStereoDft->core_hist[0] == ACELP_CORE ) { -#ifdef FIX_ISSUE_2618_PLC_RES_ATT_SCALING fac = L_deposit_h( BASOP_Util_Divide3232_Scale( dmx_nrg, hStereoDft->past_dmx_nrg_fx, &exponent ) ); fac = Sqrt32( fac, &exponent ); fac = Mpy_32_16_1( fac, (Word16) ( 0x0CCD ) ); /* * 0.1f (Q15) */ fac = L_shl_sat( fac, exponent ); /* Q31 */ -#else - fac = Mpy_32_16_1( Sqrt32( L_deposit_h( BASOP_Util_Divide3232_Scale( dmx_nrg, hStereoDft->past_dmx_nrg_fx, &q_fac ) ), &exponent ), (Word16) ( 0x0CCD ) ); /* Q0 */ -#endif } ELSE { -#ifdef FIX_ISSUE_2618_PLC_RES_ATT_SCALING fac = L_sub( MAX_32, L_deposit_h( BASOP_Util_Divide3232_Scale( L_sub( hStereoDft->time_offs, L_ana ), L_add( hStereoDft->time_offs, L_ana ), &exponent ) ) ); /* Q31 */ -#else - fac = L_sub( MAX_32, L_deposit_h( BASOP_Util_Divide3232_Scale( L_sub( hStereoDft->time_offs, L_ana ), L_add( hStereoDft->time_offs, L_ana ), &q_fac ) ) ); /* Q0 */ -#endif } v_multc_fx( pDFT_RES, fac, pDFT_RES, shl( L_res, 1 ) ); diff --git a/lib_dec/ivas_stereo_mdct_core_dec_fx.c b/lib_dec/ivas_stereo_mdct_core_dec_fx.c index d04d30a06ea645ac8ced5a944bffd2f29a37a7f2..530ddde504266e342a8760a991e6bd69ec0fbd5c 100644 --- a/lib_dec/ivas_stereo_mdct_core_dec_fx.c +++ b/lib_dec/ivas_stereo_mdct_core_dec_fx.c @@ -1023,11 +1023,7 @@ static void run_min_stats_fx( Copy_Scale_sig32_16( x[ch][0], x_fx_16, L_FRAME16k, 0 ); /* exp(x_e) */ test(); -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH noisy_speech_detection_fx( st->hFdCngDec, save_VAD[ch] && EQ_16( st->m_frame_type, ACTIVE_FRAME ), x_fx_16, sub( Q15, x_e[ch][0] ), 1 ); -#else - noisy_speech_detection_fx( st->hFdCngDec, save_VAD[ch] && EQ_16( st->m_frame_type, ACTIVE_FRAME ), x_fx_16, sub( Q15, x_e[ch][0] ) ); -#endif st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = add( mult_r( 32440 /* 0.99 in Q15 */, st->hFdCngDec->hFdCngCom->likelihood_noisy_speech ), mult_r( st->hFdCngDec->hFdCngCom->flag_noisy_speech, 328 /* 0.01 in Q15 */ ) ); /* Q15 */ move16(); st->lp_noise = st->hFdCngDec->lp_noise; /* Q9.23 */ diff --git a/lib_dec/ivas_tcx_core_dec_fx.c b/lib_dec/ivas_tcx_core_dec_fx.c index e3de33223887d5f084cf328cf22317c2d15fc9e9..f81d46d992c797279943f812f7aeb22188e682a7 100644 --- a/lib_dec/ivas_tcx_core_dec_fx.c +++ b/lib_dec/ivas_tcx_core_dec_fx.c @@ -833,11 +833,7 @@ void stereo_tcx_core_dec_fx( test(); IF( st->hFdCngDec != NULL && ( EQ_32( st->sr_core, INT_FS_12k8 ) || EQ_32( st->sr_core, INT_FS_16k ) ) && LE_32( st->total_brate, MAX_ACELP_BRATE ) ) { -#ifdef FIX_BASOP_1765_MASA1TC_CNG_MISMATCH noisy_speech_detection_fx( st->hFdCngDec, st->VAD && EQ_16( st->m_frame_type, ACTIVE_FRAME ), signal_out_fx, 0, 1 ); -#else - noisy_speech_detection_fx( st->hFdCngDec, st->VAD && EQ_16( st->m_frame_type, ACTIVE_FRAME ), signal_out_fx, 0 ); -#endif st->hFdCngDec->hFdCngCom->likelihood_noisy_speech = add( mult_r( 32440 /* 0.99f in Q15 */, st->hFdCngDec->hFdCngCom->likelihood_noisy_speech ), mult_r( st->hFdCngDec->hFdCngCom->flag_noisy_speech, 328 /* 0.01f in Q15 */ ) ); /* Q15 */ st->lp_noise = st->hFdCngDec->lp_noise; /* Q9.23 */ move16(); diff --git a/lib_dec/stat_dec.h b/lib_dec/stat_dec.h index 885af0c03e38e9a50071b09a25547f90152f27d2..c771907edcafd7c705dff61ef3f208fffa414e6a 100644 --- a/lib_dec/stat_dec.h +++ b/lib_dec/stat_dec.h @@ -137,14 +137,8 @@ typedef struct Word16 flag_dtx_mode; Word32 lp_speech; /* format: Q9.23 */ -#ifndef FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT - Word16 q_lp_speech; -#endif Word32 lp_noise; /* format: Q9.23 */ -#ifndef FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT - Word16 q_lp_noise; -#endif Word16 msPeriodogBuf[MSBUFLEN * NPART_SHAPING]; diff --git a/lib_enc/ivas_stereo_icbwe_enc_fx.c b/lib_enc/ivas_stereo_icbwe_enc_fx.c index ee31ada4b786dc12887e5bf9f9cd165f873748d4..113dc64b3d496e9087185eb731a93b783ced370c 100644 --- a/lib_enc/ivas_stereo_icbwe_enc_fx.c +++ b/lib_enc/ivas_stereo_icbwe_enc_fx.c @@ -373,18 +373,6 @@ static Word16 ic_bwe_enc_gsMapping_fx( /* quantize the IC-BWE GS mapping*/ IF( EQ_16( element_mode, IVAS_CPE_TD ) ) { -#ifndef FIX_BASOP_2620_ICBWE_GSMAPPING_DEAD_CLAMP - IF( LT_32( temp2_fx32, -( 2 << 25 ) ) ) - { - temp2_fx = -( 2 << 12 ); // Q12 - move16(); - } - ELSE IF( GT_32( temp2_fx32, 1 << 25 ) ) - { - temp2_fx = 1 << 12; // Q12 - move16(); - } -#endif temp2_fx = extract_h( L_shl_sat( temp2_fx32, Q3 ) ); // Q12 gsMapping_fx16 = 0; @@ -393,18 +381,6 @@ static Word16 ic_bwe_enc_gsMapping_fx( } ELSE { -#ifndef FIX_BASOP_2620_ICBWE_GSMAPPING_DEAD_CLAMP - IF( LT_32( temp2_fx32, -( 5 << 25 ) ) ) - { - temp2_fx = -( 5 << 12 ); // Q12 - move16(); - } - ELSE IF( GT_32( temp2_fx32, 1 << 25 ) ) - { - temp2_fx = 1 << 12; // Q12 - move16(); - } -#endif temp2_fx = extract_h( L_shl_sat( temp2_fx32, Q3 ) ); // Q12 gsMapping_fx16 = 0; diff --git a/lib_enc/ivas_stereo_switching_enc_fx.c b/lib_enc/ivas_stereo_switching_enc_fx.c index a56085d0fdbe0d9ae60f2a8a7a071defca095c8c..57f1c4faca2c11e35129aa398ffb27768dc58e40 100644 --- a/lib_enc/ivas_stereo_switching_enc_fx.c +++ b/lib_enc/ivas_stereo_switching_enc_fx.c @@ -853,9 +853,7 @@ void stereo_switching_enc_fx( /* no secondary channel in the previous frame -> memory resets */ set16_fx( sts[1]->old_inp_12k8_fx, 0, L_INP_MEM ); -#ifdef FIX_BASOP_2612_RESET_DECIM_MEM set16_fx( sts[1]->mem_decim16k_fx, 0, 2 * L_FILT_MAX ); -#endif set16_fx( sts[1]->mem_decim_fx, 0, 2 * L_FILT_MAX ); sts[1]->q_mem_decim_fx = Q15; move16();