Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,8 @@ #define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ #define FIX_483 /* FhG: fix usse 483, division by zero in nois_est */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_enc/nois_est.c +15 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,20 @@ void noise_est( { if ( st->hSpMusClas != NULL ) { #ifdef FIX_483 float E; E = mean( lf_E, 8 ); if ( E < 1.0f ) { st->hSpMusClas->ener_RAT = 0.f; } else { st->hSpMusClas->ener_RAT = 10.0f * (float) log10( E ); st->hSpMusClas->ener_RAT /= ( Etot + 0.01f ); } #else st->hSpMusClas->ener_RAT = 10.0f * (float) log10( mean( lf_E, 8 ) ); st->hSpMusClas->ener_RAT /= ( Etot + 0.01f ); Loading @@ -385,6 +399,7 @@ void noise_est( { st->hSpMusClas->ener_RAT = 0.0f; } #endif if ( st->hSpMusClas->ener_RAT > 1.0 ) { Loading Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,8 @@ #define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ #define FIX_483 /* FhG: fix usse 483, division by zero in nois_est */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_enc/nois_est.c +15 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,20 @@ void noise_est( { if ( st->hSpMusClas != NULL ) { #ifdef FIX_483 float E; E = mean( lf_E, 8 ); if ( E < 1.0f ) { st->hSpMusClas->ener_RAT = 0.f; } else { st->hSpMusClas->ener_RAT = 10.0f * (float) log10( E ); st->hSpMusClas->ener_RAT /= ( Etot + 0.01f ); } #else st->hSpMusClas->ener_RAT = 10.0f * (float) log10( mean( lf_E, 8 ) ); st->hSpMusClas->ener_RAT /= ( Etot + 0.01f ); Loading @@ -385,6 +399,7 @@ void noise_est( { st->hSpMusClas->ener_RAT = 0.0f; } #endif if ( st->hSpMusClas->ener_RAT > 1.0 ) { Loading