diff --git a/lib_dec/ivas_stereo_cng_dec.c b/lib_dec/ivas_stereo_cng_dec.c index 0c08c549fe6253ccbe0bfcdbb580a087fe975178..0e77aa9e40d2773ed4c0128261e0c2b36b38b941 100644 --- a/lib_dec/ivas_stereo_cng_dec.c +++ b/lib_dec/ivas_stereo_cng_dec.c @@ -1174,7 +1174,7 @@ static void stereo_dft_generate_comfort_noise_fx( ptr_tmp--; *ptr_level = *( ptr_level + 1 ); move32(); - lp_noise = L_add( lp_noise, L_shl( *ptr_level--, add( 1, sub( Q6, sub( Q31, hFdCngCom->cngNoiseLevelExp ) ) ) ) ); + lp_noise = L_add( lp_noise, L_shl( *ptr_level--, 1 ) ); } } ELSE @@ -1266,8 +1266,8 @@ static void stereo_dft_generate_comfort_noise_fx( // 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 // Hence the 16-bit constant log10(2) will be stored in Q13 - log_lp_noise = Mpy_32_16_1( log_lp_noise, (Word16) 0x09A2 ); - st1->lp_noise = L_add( Mpy_32_16_1( st1->lp_noise, (Word16) ( 0x7333 ) ), log_lp_noise ); + log_lp_noise = Mpy_32_16_1( log_lp_noise, 2466 /* log10(2) in Q13 */ ); + st1->lp_noise = L_add( Mpy_32_16_1( st1->lp_noise, 29491 /* 0.9f in Q15 */ ), log_lp_noise ); move32(); } ELSE IF( EQ_16( chan, 0 ) ) @@ -1278,8 +1278,8 @@ static void stereo_dft_generate_comfort_noise_fx( // 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 // Hence the 16-bit constant log10(2) will be stored in Q13 - log_lp_noise = Mpy_32_16_1( log_lp_noise, (Word16) 0x09A2 ); - st->hFdCngDec->lp_noise = L_add( Mpy_32_16_1( st->hFdCngDec->lp_noise, (Word16) ( 0x7333 ) ), log_lp_noise ); + log_lp_noise = Mpy_32_16_1( log_lp_noise, 2466 /* log10(2) in Q13 */ ); + st->hFdCngDec->lp_noise = L_add( Mpy_32_16_1( st->hFdCngDec->lp_noise, 29491 /* 0.9f in Q15 */ ), log_lp_noise ); move32(); st->lp_noise = st->hFdCngDec->lp_noise; move32();