Loading lib_com/cnst.h +4 −1 Original line number Diff line number Diff line Loading @@ -1532,7 +1532,10 @@ typedef enum _DCTTYPE #define TOD_NSPEC 80 /* number of spectral bins of the tonal detector */ #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 */ #define THR_P2A 80.0f /* threshold to detect strongly peaky signals */ #ifdef FIX_SP2A #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_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ #define FIX_406_IVAS_POSITION /* Eri: Issue 406: Unify IVAS_POSITION to use IVAS_VECTOR3 instead */ #define REND_DEBUGGING_REVISION /* VA: encapsulate rendering debugging options with DEBUGGING */ #define FIX_416_ISM_BR_SWITCHING /* FhG: add missing CLDFB reconfig to ISM BR switching */ #define FIX_SP2A /* VA: Issue 412: Adjust threshold for the S_p2a feature in the tonal detector */ 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 +4 −1 Original line number Diff line number Diff line Loading @@ -1532,7 +1532,10 @@ typedef enum _DCTTYPE #define TOD_NSPEC 80 /* number of spectral bins of the tonal detector */ #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 */ #define THR_P2A 80.0f /* threshold to detect strongly peaky signals */ #ifdef FIX_SP2A #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_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ #define FIX_406_IVAS_POSITION /* Eri: Issue 406: Unify IVAS_POSITION to use IVAS_VECTOR3 instead */ #define REND_DEBUGGING_REVISION /* VA: encapsulate rendering debugging options with DEBUGGING */ #define FIX_416_ISM_BR_SWITCHING /* FhG: add missing CLDFB reconfig to ISM BR switching */ #define FIX_SP2A /* VA: Issue 412: Adjust threshold for the S_p2a feature in the tonal detector */ 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