Loading lib_com/prot.h +0 −2 Original line number Diff line number Diff line Loading @@ -8998,14 +8998,12 @@ void initFdCngEnc( void resetFdCngEnc( Encoder_State *st /* i/o: encoder state structure */ ); #ifndef IVAS_FLOAT_FIXED void perform_noise_estimation_enc( float *band_energies, /* i : energy in critical bands without minimum noise floor E_MIN */ float *enerBuffer, /* i : energy buffer */ HANDLE_FD_CNG_ENC hFdCngEnc, /* i/o: CNG structure containing all buffers and variables */ const int32_t input_Fs, /* i : input sampling rate */ CPE_ENC_HANDLE hCPE ); #endif void AdjustFirstSID( Encoder_State *st /* i/o: encoder state structure */ ); Loading lib_enc/fd_cng_enc.c +13 −8 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ void initFdCngEnc( /* Initialize the Noise Estimator */ set_f( hFdCngEnc->msPeriodog, 0.0f, NPART ); #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed set_f( hFdCngEnc->msAlpha, 0.0f, NPART ); set_f( hFdCngEnc->msBminWin, 0.0f, NPART ); set_f( hFdCngEnc->msBminSubWin, 0.0f, NPART ); Loading @@ -144,7 +144,7 @@ void initFdCngEnc( set_f( hFdCngEnc->msNoiseEst, 0.0f, NPART ); set_f( hFdCngEnc->energy_ho, 0.0f, NPART ); set_f( hFdCngEnc->msNoiseEst_old, 0.0f, NPART ); #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed set_f( hFdCngEnc->msMinBuf, FLT_MAX, MSNUMSUBFR * NPART ); set_f( hFdCngEnc->msCurrentMin, FLT_MAX, NPART ); set_f( hFdCngEnc->msCurrentMinOut, FLT_MAX, NPART ); Loading @@ -152,14 +152,14 @@ void initFdCngEnc( #endif set_s( hFdCngEnc->msLocalMinFlag, 0, NPART ); set_s( hFdCngEnc->msNewMinFlag, 0, NPART ); #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed set_f( hFdCngEnc->msPsdFirstMoment, 0.0f, NPART ); set_f( hFdCngEnc->msPsdSecondMoment, 0.0f, NPART ); #endif hFdCngEnc->msPeriodogBufPtr = 0; set_f( hFdCngEnc->msPeriodogBuf, 0.0f, MSBUFLEN * NPART ); #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed set_f( hFdCngEnc->msLogPeriodog, 0.0f, NPART ); set_f( hFdCngEnc->msLogNoiseEst, 0.0f, NPART ); #endif Loading Loading @@ -679,7 +679,6 @@ void perform_noise_estimation_enc_ivas_fx( return; } #ifndef IVAS_FLOAT_FIXED void perform_noise_estimation_enc( float *band_energies, /* i : energy in critical bands without minimum noise floor E_MIN*/ float *enerBuffer, /* i : energy buffer */ Loading Loading @@ -757,7 +756,6 @@ void perform_noise_estimation_enc( return; } #endif /*-------------------------------------------------------------------* * AdjustFirstSID() Loading Loading @@ -1413,9 +1411,16 @@ void FdCngEncodeMDCTStereoSID_fx( E_fx[ch] = 0; move32(); FOR( p = 0; p < N; p++ ) { IF( lr_in_ptr_fx[ch][p] ) { t1 = BASOP_Util_Log2( lr_in_ptr_fx[ch][p] ); // Q25 t2 = L_add( t1, L_shl( lr_in_ptr_e[ch], Q25 ) ); // Q25 } ELSE { t2 = 0; } ms_ptr_fx[ch][p] = Mpy_32_32( t2, TEN_MULT_LOG10_2_IN_Q29 ); // Q23 move32(); E_fx[ch] = L_add( E_fx[ch], L_shr( ms_ptr_fx[ch][p], 4 ) ); // Q19 Loading lib_enc/pre_proc.c +2 −4 Original line number Diff line number Diff line Loading @@ -253,11 +253,9 @@ void pre_proc( *----------------------------------------------------------------*/ resetFdCngEnc( st ); #ifndef IVAS_FLOAT_FIXED perform_noise_estimation_enc( band_energies, enerBuffer, st->hFdCngEnc, 1, NULL ); #else assert( 0 ); // recheck path #endif /*-----------------------------------------------------------------* * Select SID or FRAME_NO_DATA frame if DTX enabled *-----------------------------------------------------------------*/ Loading lib_enc/stat_enc.h +3 −3 Original line number Diff line number Diff line Loading @@ -506,7 +506,7 @@ typedef struct fd_cng_enc_structure { HANDLE_FD_CNG_COM hFdCngCom; float msPeriodog[NPART]; /* Periodogram */ #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed float msBminWin[NPART]; float msBminSubWin[NPART]; float msPsd[NPART]; /* Power Spectral Density estimate (i.e., smoothed periodogram) */ Loading @@ -531,7 +531,7 @@ typedef struct fd_cng_enc_structure int16_t msLocalMinFlag[NPART]; int16_t msNewMinFlag[NPART]; #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed float msPsdFirstMoment[NPART]; float msPsdSecondMoment[NPART]; float msNoiseFloor[NPART]; /* Estimated noise floor */ Loading @@ -539,7 +539,7 @@ typedef struct fd_cng_enc_structure float msNoiseEst[NPART]; /* Estimated noise level */ float energy_ho[NPART]; float msNoiseEst_old[NPART]; #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed float msLogPeriodog[NPART]; /* Periodogram */ float msLogNoiseEst[NPART]; /* Estimated noise level */ #endif Loading Loading
lib_com/prot.h +0 −2 Original line number Diff line number Diff line Loading @@ -8998,14 +8998,12 @@ void initFdCngEnc( void resetFdCngEnc( Encoder_State *st /* i/o: encoder state structure */ ); #ifndef IVAS_FLOAT_FIXED void perform_noise_estimation_enc( float *band_energies, /* i : energy in critical bands without minimum noise floor E_MIN */ float *enerBuffer, /* i : energy buffer */ HANDLE_FD_CNG_ENC hFdCngEnc, /* i/o: CNG structure containing all buffers and variables */ const int32_t input_Fs, /* i : input sampling rate */ CPE_ENC_HANDLE hCPE ); #endif void AdjustFirstSID( Encoder_State *st /* i/o: encoder state structure */ ); Loading
lib_enc/fd_cng_enc.c +13 −8 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ void initFdCngEnc( /* Initialize the Noise Estimator */ set_f( hFdCngEnc->msPeriodog, 0.0f, NPART ); #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed set_f( hFdCngEnc->msAlpha, 0.0f, NPART ); set_f( hFdCngEnc->msBminWin, 0.0f, NPART ); set_f( hFdCngEnc->msBminSubWin, 0.0f, NPART ); Loading @@ -144,7 +144,7 @@ void initFdCngEnc( set_f( hFdCngEnc->msNoiseEst, 0.0f, NPART ); set_f( hFdCngEnc->energy_ho, 0.0f, NPART ); set_f( hFdCngEnc->msNoiseEst_old, 0.0f, NPART ); #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed set_f( hFdCngEnc->msMinBuf, FLT_MAX, MSNUMSUBFR * NPART ); set_f( hFdCngEnc->msCurrentMin, FLT_MAX, NPART ); set_f( hFdCngEnc->msCurrentMinOut, FLT_MAX, NPART ); Loading @@ -152,14 +152,14 @@ void initFdCngEnc( #endif set_s( hFdCngEnc->msLocalMinFlag, 0, NPART ); set_s( hFdCngEnc->msNewMinFlag, 0, NPART ); #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed set_f( hFdCngEnc->msPsdFirstMoment, 0.0f, NPART ); set_f( hFdCngEnc->msPsdSecondMoment, 0.0f, NPART ); #endif hFdCngEnc->msPeriodogBufPtr = 0; set_f( hFdCngEnc->msPeriodogBuf, 0.0f, MSBUFLEN * NPART ); #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed set_f( hFdCngEnc->msLogPeriodog, 0.0f, NPART ); set_f( hFdCngEnc->msLogNoiseEst, 0.0f, NPART ); #endif Loading Loading @@ -679,7 +679,6 @@ void perform_noise_estimation_enc_ivas_fx( return; } #ifndef IVAS_FLOAT_FIXED void perform_noise_estimation_enc( float *band_energies, /* i : energy in critical bands without minimum noise floor E_MIN*/ float *enerBuffer, /* i : energy buffer */ Loading Loading @@ -757,7 +756,6 @@ void perform_noise_estimation_enc( return; } #endif /*-------------------------------------------------------------------* * AdjustFirstSID() Loading Loading @@ -1413,9 +1411,16 @@ void FdCngEncodeMDCTStereoSID_fx( E_fx[ch] = 0; move32(); FOR( p = 0; p < N; p++ ) { IF( lr_in_ptr_fx[ch][p] ) { t1 = BASOP_Util_Log2( lr_in_ptr_fx[ch][p] ); // Q25 t2 = L_add( t1, L_shl( lr_in_ptr_e[ch], Q25 ) ); // Q25 } ELSE { t2 = 0; } ms_ptr_fx[ch][p] = Mpy_32_32( t2, TEN_MULT_LOG10_2_IN_Q29 ); // Q23 move32(); E_fx[ch] = L_add( E_fx[ch], L_shr( ms_ptr_fx[ch][p], 4 ) ); // Q19 Loading
lib_enc/pre_proc.c +2 −4 Original line number Diff line number Diff line Loading @@ -253,11 +253,9 @@ void pre_proc( *----------------------------------------------------------------*/ resetFdCngEnc( st ); #ifndef IVAS_FLOAT_FIXED perform_noise_estimation_enc( band_energies, enerBuffer, st->hFdCngEnc, 1, NULL ); #else assert( 0 ); // recheck path #endif /*-----------------------------------------------------------------* * Select SID or FRAME_NO_DATA frame if DTX enabled *-----------------------------------------------------------------*/ Loading
lib_enc/stat_enc.h +3 −3 Original line number Diff line number Diff line Loading @@ -506,7 +506,7 @@ typedef struct fd_cng_enc_structure { HANDLE_FD_CNG_COM hFdCngCom; float msPeriodog[NPART]; /* Periodogram */ #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed float msBminWin[NPART]; float msBminSubWin[NPART]; float msPsd[NPART]; /* Power Spectral Density estimate (i.e., smoothed periodogram) */ Loading @@ -531,7 +531,7 @@ typedef struct fd_cng_enc_structure int16_t msLocalMinFlag[NPART]; int16_t msNewMinFlag[NPART]; #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed float msPsdFirstMoment[NPART]; float msPsdSecondMoment[NPART]; float msNoiseFloor[NPART]; /* Estimated noise floor */ Loading @@ -539,7 +539,7 @@ typedef struct fd_cng_enc_structure float msNoiseEst[NPART]; /* Estimated noise level */ float energy_ho[NPART]; float msNoiseEst_old[NPART]; #ifndef IVAS_FLOAT_FIXED #if 1//ndef IVAS_FLOAT_FIXED to be removed float msLogPeriodog[NPART]; /* Periodogram */ float msLogNoiseEst[NPART]; /* Estimated noise level */ #endif Loading