Loading lib_com/cnst.h +2 −3 Original line number Diff line number Diff line Loading @@ -1514,10 +1514,9 @@ enum #define TOD_THR_MASS 0.86f /* initial value for the adaptive threshold of the tonal detector */ #define P2A_FACT 0.9f /* long-term averaging factor for peak-to-average ratio */ #ifdef FIX_SP2A #define THR_P2A 95.0f /* threshold to detect strongly peaky signals */ #else #define THR_P2A 80.0f /* threshold to detect strongly peaky signals */ #define THR_P2A_HIGH 95.0f /* higher threshold to detect strongly peaky signals at low bitrates*/ #endif #define THR_P2A 80.0f /* lower threshold to detect strongly peaky signals at higher bitrates */ /*----------------------------------------------------------------------------------* * LD music post-filter constants Loading lib_enc/speech_music_classif.c +18 −0 Original line number Diff line number Diff line Loading @@ -1828,6 +1828,9 @@ void ivas_smc_mode_selection( float ton; int16_t i; float S_p2a, S_max, S_ave; #ifdef FIX_SP2A float thr_sp2a; #endif SP_MUS_CLAS_HANDLE hSpMusClas = st->hSpMusClas; Loading Loading @@ -1858,8 +1861,23 @@ void ivas_smc_mode_selection( S_ave = sum_f( st->hSpMusClas->tod_lt_Bin_E, TOD_NSPEC ) / TOD_NSPEC; S_p2a = S_max - S_ave; #ifdef FIX_SP2A if ( element_brate <= IVAS_16k4 ) { thr_sp2a = THR_P2A_HIGH; } else { thr_sp2a = THR_P2A; } #endif /* initial 3-way selection of coding modes (ACELP/GSC/TCX) */ #ifdef FIX_SP2A if ( relE > -10.0f && ( S_p2a > thr_sp2a || ton > hSpMusClas->tod_thr_lt ) ) #else if ( relE > -10.0f && ( S_p2a > THR_P2A || ton > hSpMusClas->tod_thr_lt ) ) #endif { /* select TCX to encode extremely peaky signals or strongly tonal signals */ st->sp_aud_decision1 = 1; Loading Loading
lib_com/cnst.h +2 −3 Original line number Diff line number Diff line Loading @@ -1514,10 +1514,9 @@ enum #define TOD_THR_MASS 0.86f /* initial value for the adaptive threshold of the tonal detector */ #define P2A_FACT 0.9f /* long-term averaging factor for peak-to-average ratio */ #ifdef FIX_SP2A #define THR_P2A 95.0f /* threshold to detect strongly peaky signals */ #else #define THR_P2A 80.0f /* threshold to detect strongly peaky signals */ #define THR_P2A_HIGH 95.0f /* higher threshold to detect strongly peaky signals at low bitrates*/ #endif #define THR_P2A 80.0f /* lower threshold to detect strongly peaky signals at higher bitrates */ /*----------------------------------------------------------------------------------* * LD music post-filter constants Loading
lib_enc/speech_music_classif.c +18 −0 Original line number Diff line number Diff line Loading @@ -1828,6 +1828,9 @@ void ivas_smc_mode_selection( float ton; int16_t i; float S_p2a, S_max, S_ave; #ifdef FIX_SP2A float thr_sp2a; #endif SP_MUS_CLAS_HANDLE hSpMusClas = st->hSpMusClas; Loading Loading @@ -1858,8 +1861,23 @@ void ivas_smc_mode_selection( S_ave = sum_f( st->hSpMusClas->tod_lt_Bin_E, TOD_NSPEC ) / TOD_NSPEC; S_p2a = S_max - S_ave; #ifdef FIX_SP2A if ( element_brate <= IVAS_16k4 ) { thr_sp2a = THR_P2A_HIGH; } else { thr_sp2a = THR_P2A; } #endif /* initial 3-way selection of coding modes (ACELP/GSC/TCX) */ #ifdef FIX_SP2A if ( relE > -10.0f && ( S_p2a > thr_sp2a || ton > hSpMusClas->tod_thr_lt ) ) #else if ( relE > -10.0f && ( S_p2a > THR_P2A || ton > hSpMusClas->tod_thr_lt ) ) #endif { /* select TCX to encode extremely peaky signals or strongly tonal signals */ st->sp_aud_decision1 = 1; Loading