Loading lib_com/options.h +0 −2 Original line number Diff line number Diff line Loading @@ -171,8 +171,6 @@ /* all switches in this category should start with "NONBE_" */ #define NONBE_FIX_978_MC_TDREND_REVERB /* Eri : activate reverb for TDREND with headtracking */ #define BE_FIX_567_DOUBLE_STEREO_DMX /* NTT: Fix formal issues */ #define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC #define NONBE_FIX_947_STEREO_DMX_ROMOPT /* Orange: ROM optimisation for POC*/ Loading lib_com/prot.h +0 −2 Original line number Diff line number Diff line Loading @@ -132,12 +132,10 @@ float inv_sqrt( const float x /* i : input value */ ); #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX /*! r: inverse square root of input value (float) */ float inv_sqrtf( const float x /* i : input value */ ); #endif /*! r: output random value */ int16_t own_random( Loading lib_com/tools.c +0 −2 Original line number Diff line number Diff line Loading @@ -768,7 +768,6 @@ float inv_sqrt( return (float) ( 1.0 / sqrt( x ) ); } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX /*---------------------------------------------------------------------* * inv_sqrtf() * Loading @@ -782,7 +781,6 @@ float inv_sqrtf( { return ( 1.0f / sqrtf( x ) ); } #endif /*-------------------------------------------------------------------* * conv() Loading lib_enc/ivas_stereo_dmx_evs.c +0 −52 Original line number Diff line number Diff line Loading @@ -58,11 +58,7 @@ #define STEREO_DMX_EVS_POC_FORGETTING 0.78f #define STEREO_DMX_EVS_TARGET_POC_FORGETTING 0.79f #define STEREO_DMX_EVS_POC_W_FORGETTING 0.875f #ifdef BE_FIX_567_DOUBLE_STEREO_DMX #define STEREO_DMX_EVS_SHIFT_LIMIT STEREO_DFT_ZP_NS_ENC #else #define STEREO_DMX_EVS_SHIFT_LIMIT 5.625f /* ms */ #endif #define STEREO_DMX_EVS_DMX_EGY_FORGETTING 0.25f #define STEREO_DMX_EVS_CORR_FORGETTING 0.78f Loading Loading @@ -529,11 +525,7 @@ static void calc_poc( tPi += IPDi; /* ICCr */ #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = inv_sqrtf( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); #else Pn = (float) inv_sqrt( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); #endif IPDr *= Pn; IPDi *= Pn; Loading @@ -546,11 +538,7 @@ static void calc_poc( eneL += ( specLr[i] * specLr[i] + specLi[i] * specLi[i] ); eneR += ( specRr[i] * specRr[i] + specRi[i] * specRi[i] ); } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = inv_sqrtf( ( tPr * tPr + tPi * tPi ) + EPSILON ); #else Pn = (float) inv_sqrt( ( tPr * tPr + tPi * tPi ) + EPSILON ); #endif tPr *= Pn; tPi *= Pn; Loading @@ -559,11 +547,7 @@ static void calc_poc( Pr[n] = ipd_ff[n] * Pr[n] + ( 1.0f - ipd_ff[n] ) * tPr; Pi[n] = ipd_ff[n] * Pi[n] + ( 1.0f - ipd_ff[n] ) * tPi; #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = inv_sqrtf( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ); #else Pn = (float) inv_sqrt( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ); #endif Pr[n] *= Pn; Pi[n] *= Pn; Loading @@ -572,11 +556,7 @@ static void calc_poc( { Pr[n] = ipd_ff[n] * Pr[n] + ( 1.0f - ipd_ff[n] ) * tPr; Pi[n] = ipd_ff[n] * Pi[n] + ( 1.0f - ipd_ff[n] ) * tPi; #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = inv_sqrtf( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ); #else Pn = (float) inv_sqrt( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ); #endif Pr[n] *= Pn; Pi[n] *= Pn; } Loading @@ -603,11 +583,7 @@ static void calc_poc( } #endif #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX ICCr = sqrtf( ( Nr * Nr + Ni * Ni ) / ( eneL * eneR + EPSILON ) ); #else ICCr = (float) sqrt( ( Nr * Nr + Ni * Ni ) / ( eneL * eneR + EPSILON ) ); #endif hPHA->iccr_s = STEREO_DMX_EVS_ICCR_FORGETTING * hPHA->iccr_s + ( 1.0f - STEREO_DMX_EVS_ICCR_FORGETTING ) * ICCr; #ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA Loading Loading @@ -792,7 +768,6 @@ static void calc_poc( isd_rate = (float) isd_cnt_l / freq_8k; for ( i = 1; i < nsbd; i++ ) { #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX rfft_pha_buf[i * 2] = sqrtf( ( 1.0f + Pr[i] ) / 2.0f ); rfft_pha_buf[i * 2 + 1] = sqrtf( ( 1.0f - Pr[i] ) / 2.0f ) * sign( Pi[i] ); if ( isd_rate > STEREO_DMX_EVS_ISD_DIST_THRES_IPD ) Loading @@ -800,15 +775,6 @@ static void calc_poc( rfft_pha_buf[i * 2 + 1] = sqrtf( ( 1.0f - rfft_pha_buf[i * 2] ) / 2.0f ) * sign( rfft_pha_buf[i * 2 + 1] ); rfft_pha_buf[i * 2] = sqrtf( ( 1.0f + rfft_pha_buf[i * 2] ) / 2.0f ); } #else rfft_pha_buf[i * 2] = (float) sqrt( ( 1.0f + Pr[i] ) / 2.0f ); rfft_pha_buf[i * 2 + 1] = (float) sqrt( ( 1.0f - Pr[i] ) / 2.0f ) * sign( Pi[i] ); if ( isd_rate > STEREO_DMX_EVS_ISD_DIST_THRES_IPD ) { rfft_pha_buf[i * 2 + 1] = (float) sqrt( ( 1.0f - rfft_pha_buf[i * 2] ) / 2.0f ) * sign( rfft_pha_buf[i * 2 + 1] ); rfft_pha_buf[i * 2] = (float) sqrt( ( 1.0f + rfft_pha_buf[i * 2] ) / 2.0f ); } #endif if ( ( tEr[i] > STEREO_DMX_EVS_LR_EGY * tEl[i] ) || ( tEl[i] > STEREO_DMX_EVS_LR_EGY * tEr[i] ) ) { ild_cnt++; Loading Loading @@ -902,7 +868,6 @@ static void calc_poc( isd_rate = (float) isd_cnt_l / freq_8k; for ( i = 1; i < nsbd; i++ ) { #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX rfft_pha_buf[i * 2] = sqrtf( ( 1.0f + Pr[i] ) / 2.0f ); rfft_pha_buf[i * 2 + 1] = sqrtf( ( 1.0f - Pr[i] ) / 2.0f ) * sign( Pi[i] ); if ( isd_rate > STEREO_DMX_EVS_ISD_DIST_THRES_IPD ) Loading @@ -910,15 +875,6 @@ static void calc_poc( rfft_pha_buf[i * 2 + 1] = sqrtf( ( 1.0f - rfft_pha_buf[i * 2] ) / 2.0f ) * sign( rfft_pha_buf[i * 2 + 1] ); rfft_pha_buf[i * 2] = sqrtf( ( 1.0f + rfft_pha_buf[i * 2] ) / 2.0f ); } #else rfft_pha_buf[i * 2] = (float) sqrt( ( 1.0f + Pr[i] ) / 2.0f ); rfft_pha_buf[i * 2 + 1] = (float) sqrt( ( 1.0f - Pr[i] ) / 2.0f ) * sign( Pi[i] ); if ( isd_rate > STEREO_DMX_EVS_ISD_DIST_THRES_IPD ) { rfft_pha_buf[i * 2 + 1] = (float) sqrt( ( 1.0f - rfft_pha_buf[i * 2] ) / 2.0f ) * sign( rfft_pha_buf[i * 2 + 1] ); rfft_pha_buf[i * 2] = (float) sqrt( ( 1.0f + rfft_pha_buf[i * 2] ) / 2.0f ); } #endif if ( ( tEr[i] > STEREO_DMX_EVS_LR_EGY * tEl[i] ) || ( tEl[i] > STEREO_DMX_EVS_LR_EGY * tEr[i] ) ) { ild_cnt++; Loading Loading @@ -976,11 +932,7 @@ static void calc_poc( { energy += hPHA->p_curr_taps[n][i] * hPHA->p_curr_taps[n][i]; } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX energy = inv_sqrtf( energy + EPSILON ); #else energy = (float) inv_sqrt( energy + EPSILON ); #endif for ( i = 0; i < hPHA->pha_len; i++ ) { hPHA->p_curr_taps[n][i] *= energy; Loading Loading @@ -2291,11 +2243,7 @@ ivas_error stereo_dmx_evs_init_encoder( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for STEREO_DMX_EVS_POC_DATA\n" ) ); } #ifdef BE_FIX_567_DOUBLE_STEREO_DMX hStereoDmxEVS->hPOC->shift_limit = NS2SA( input_Fs, STEREO_DMX_EVS_SHIFT_LIMIT ); #else hStereoDmxEVS->hPOC->shift_limit = (int16_t) ( STEREO_DMX_EVS_SHIFT_LIMIT * input_Fs / 1000 ); #endif for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading Loading
lib_com/options.h +0 −2 Original line number Diff line number Diff line Loading @@ -171,8 +171,6 @@ /* all switches in this category should start with "NONBE_" */ #define NONBE_FIX_978_MC_TDREND_REVERB /* Eri : activate reverb for TDREND with headtracking */ #define BE_FIX_567_DOUBLE_STEREO_DMX /* NTT: Fix formal issues */ #define NONBE_FIX_567_DOUBLE_STEREO_DMX /* Orange: Double-precision replaced by single-precision */ #define NONBE_FIX_947_STEREO_DMX_EVS_POC /* Orange: Fix clicks on POC */ #ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC #define NONBE_FIX_947_STEREO_DMX_ROMOPT /* Orange: ROM optimisation for POC*/ Loading
lib_com/prot.h +0 −2 Original line number Diff line number Diff line Loading @@ -132,12 +132,10 @@ float inv_sqrt( const float x /* i : input value */ ); #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX /*! r: inverse square root of input value (float) */ float inv_sqrtf( const float x /* i : input value */ ); #endif /*! r: output random value */ int16_t own_random( Loading
lib_com/tools.c +0 −2 Original line number Diff line number Diff line Loading @@ -768,7 +768,6 @@ float inv_sqrt( return (float) ( 1.0 / sqrt( x ) ); } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX /*---------------------------------------------------------------------* * inv_sqrtf() * Loading @@ -782,7 +781,6 @@ float inv_sqrtf( { return ( 1.0f / sqrtf( x ) ); } #endif /*-------------------------------------------------------------------* * conv() Loading
lib_enc/ivas_stereo_dmx_evs.c +0 −52 Original line number Diff line number Diff line Loading @@ -58,11 +58,7 @@ #define STEREO_DMX_EVS_POC_FORGETTING 0.78f #define STEREO_DMX_EVS_TARGET_POC_FORGETTING 0.79f #define STEREO_DMX_EVS_POC_W_FORGETTING 0.875f #ifdef BE_FIX_567_DOUBLE_STEREO_DMX #define STEREO_DMX_EVS_SHIFT_LIMIT STEREO_DFT_ZP_NS_ENC #else #define STEREO_DMX_EVS_SHIFT_LIMIT 5.625f /* ms */ #endif #define STEREO_DMX_EVS_DMX_EGY_FORGETTING 0.25f #define STEREO_DMX_EVS_CORR_FORGETTING 0.78f Loading Loading @@ -529,11 +525,7 @@ static void calc_poc( tPi += IPDi; /* ICCr */ #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = inv_sqrtf( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); #else Pn = (float) inv_sqrt( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); #endif IPDr *= Pn; IPDi *= Pn; Loading @@ -546,11 +538,7 @@ static void calc_poc( eneL += ( specLr[i] * specLr[i] + specLi[i] * specLi[i] ); eneR += ( specRr[i] * specRr[i] + specRi[i] * specRi[i] ); } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = inv_sqrtf( ( tPr * tPr + tPi * tPi ) + EPSILON ); #else Pn = (float) inv_sqrt( ( tPr * tPr + tPi * tPi ) + EPSILON ); #endif tPr *= Pn; tPi *= Pn; Loading @@ -559,11 +547,7 @@ static void calc_poc( Pr[n] = ipd_ff[n] * Pr[n] + ( 1.0f - ipd_ff[n] ) * tPr; Pi[n] = ipd_ff[n] * Pi[n] + ( 1.0f - ipd_ff[n] ) * tPi; #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = inv_sqrtf( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ); #else Pn = (float) inv_sqrt( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ); #endif Pr[n] *= Pn; Pi[n] *= Pn; Loading @@ -572,11 +556,7 @@ static void calc_poc( { Pr[n] = ipd_ff[n] * Pr[n] + ( 1.0f - ipd_ff[n] ) * tPr; Pi[n] = ipd_ff[n] * Pi[n] + ( 1.0f - ipd_ff[n] ) * tPi; #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = inv_sqrtf( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ); #else Pn = (float) inv_sqrt( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ); #endif Pr[n] *= Pn; Pi[n] *= Pn; } Loading @@ -603,11 +583,7 @@ static void calc_poc( } #endif #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX ICCr = sqrtf( ( Nr * Nr + Ni * Ni ) / ( eneL * eneR + EPSILON ) ); #else ICCr = (float) sqrt( ( Nr * Nr + Ni * Ni ) / ( eneL * eneR + EPSILON ) ); #endif hPHA->iccr_s = STEREO_DMX_EVS_ICCR_FORGETTING * hPHA->iccr_s + ( 1.0f - STEREO_DMX_EVS_ICCR_FORGETTING ) * ICCr; #ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA Loading Loading @@ -792,7 +768,6 @@ static void calc_poc( isd_rate = (float) isd_cnt_l / freq_8k; for ( i = 1; i < nsbd; i++ ) { #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX rfft_pha_buf[i * 2] = sqrtf( ( 1.0f + Pr[i] ) / 2.0f ); rfft_pha_buf[i * 2 + 1] = sqrtf( ( 1.0f - Pr[i] ) / 2.0f ) * sign( Pi[i] ); if ( isd_rate > STEREO_DMX_EVS_ISD_DIST_THRES_IPD ) Loading @@ -800,15 +775,6 @@ static void calc_poc( rfft_pha_buf[i * 2 + 1] = sqrtf( ( 1.0f - rfft_pha_buf[i * 2] ) / 2.0f ) * sign( rfft_pha_buf[i * 2 + 1] ); rfft_pha_buf[i * 2] = sqrtf( ( 1.0f + rfft_pha_buf[i * 2] ) / 2.0f ); } #else rfft_pha_buf[i * 2] = (float) sqrt( ( 1.0f + Pr[i] ) / 2.0f ); rfft_pha_buf[i * 2 + 1] = (float) sqrt( ( 1.0f - Pr[i] ) / 2.0f ) * sign( Pi[i] ); if ( isd_rate > STEREO_DMX_EVS_ISD_DIST_THRES_IPD ) { rfft_pha_buf[i * 2 + 1] = (float) sqrt( ( 1.0f - rfft_pha_buf[i * 2] ) / 2.0f ) * sign( rfft_pha_buf[i * 2 + 1] ); rfft_pha_buf[i * 2] = (float) sqrt( ( 1.0f + rfft_pha_buf[i * 2] ) / 2.0f ); } #endif if ( ( tEr[i] > STEREO_DMX_EVS_LR_EGY * tEl[i] ) || ( tEl[i] > STEREO_DMX_EVS_LR_EGY * tEr[i] ) ) { ild_cnt++; Loading Loading @@ -902,7 +868,6 @@ static void calc_poc( isd_rate = (float) isd_cnt_l / freq_8k; for ( i = 1; i < nsbd; i++ ) { #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX rfft_pha_buf[i * 2] = sqrtf( ( 1.0f + Pr[i] ) / 2.0f ); rfft_pha_buf[i * 2 + 1] = sqrtf( ( 1.0f - Pr[i] ) / 2.0f ) * sign( Pi[i] ); if ( isd_rate > STEREO_DMX_EVS_ISD_DIST_THRES_IPD ) Loading @@ -910,15 +875,6 @@ static void calc_poc( rfft_pha_buf[i * 2 + 1] = sqrtf( ( 1.0f - rfft_pha_buf[i * 2] ) / 2.0f ) * sign( rfft_pha_buf[i * 2 + 1] ); rfft_pha_buf[i * 2] = sqrtf( ( 1.0f + rfft_pha_buf[i * 2] ) / 2.0f ); } #else rfft_pha_buf[i * 2] = (float) sqrt( ( 1.0f + Pr[i] ) / 2.0f ); rfft_pha_buf[i * 2 + 1] = (float) sqrt( ( 1.0f - Pr[i] ) / 2.0f ) * sign( Pi[i] ); if ( isd_rate > STEREO_DMX_EVS_ISD_DIST_THRES_IPD ) { rfft_pha_buf[i * 2 + 1] = (float) sqrt( ( 1.0f - rfft_pha_buf[i * 2] ) / 2.0f ) * sign( rfft_pha_buf[i * 2 + 1] ); rfft_pha_buf[i * 2] = (float) sqrt( ( 1.0f + rfft_pha_buf[i * 2] ) / 2.0f ); } #endif if ( ( tEr[i] > STEREO_DMX_EVS_LR_EGY * tEl[i] ) || ( tEl[i] > STEREO_DMX_EVS_LR_EGY * tEr[i] ) ) { ild_cnt++; Loading Loading @@ -976,11 +932,7 @@ static void calc_poc( { energy += hPHA->p_curr_taps[n][i] * hPHA->p_curr_taps[n][i]; } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX energy = inv_sqrtf( energy + EPSILON ); #else energy = (float) inv_sqrt( energy + EPSILON ); #endif for ( i = 0; i < hPHA->pha_len; i++ ) { hPHA->p_curr_taps[n][i] *= energy; Loading Loading @@ -2291,11 +2243,7 @@ ivas_error stereo_dmx_evs_init_encoder( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for STEREO_DMX_EVS_POC_DATA\n" ) ); } #ifdef BE_FIX_567_DOUBLE_STEREO_DMX hStereoDmxEVS->hPOC->shift_limit = NS2SA( input_Fs, STEREO_DMX_EVS_SHIFT_LIMIT ); #else hStereoDmxEVS->hPOC->shift_limit = (int16_t) ( STEREO_DMX_EVS_SHIFT_LIMIT * input_Fs / 1000 ); #endif for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading