Loading lib_com/prot.h +7 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,13 @@ 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( int16_t *seed /* i/o: random seed */ Loading lib_com/tools.c +15 −0 Original line number Diff line number Diff line Loading @@ -768,6 +768,21 @@ float inv_sqrt( return (float) ( 1.0 / sqrt( x ) ); } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX /*---------------------------------------------------------------------* * inv_sqrtf() * * Find the inverse square root of the input value (float) *---------------------------------------------------------------------*/ /*! r: inverse square root of input value (float) */ float inv_sqrtf( const float x /* i : input value */ ) { return ( 1.0 / sqrtf( x ) ); } #endif /*-------------------------------------------------------------------* * conv() Loading lib_enc/ivas_stereo_dmx_evs.c +6 −6 Original line number Diff line number Diff line Loading @@ -530,9 +530,9 @@ static void calc_poc( /* ICCr */ #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = 1.0f / sqrtf( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); Pn = inv_sqrtf( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); #else Pn = (float) inv_sqrt_( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); Pn = (float) inv_sqrt( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); #endif IPDr *= Pn; IPDi *= Pn; Loading @@ -547,7 +547,7 @@ static void calc_poc( eneR += ( specRr[i] * specRr[i] + specRi[i] * specRi[i] ); } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = (float) ( 1.0 / sqrtf( ( ( tPr * tPr + tPi * tPi ) + EPSILON ) ) ); Pn = inv_sqrtf( ( tPr * tPr + tPi * tPi ) + EPSILON ); #else Pn = (float) inv_sqrt( ( tPr * tPr + tPi * tPi ) + EPSILON ); #endif Loading @@ -560,7 +560,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 = (float) ( 1.0 / sqrtf( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ) ); 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 Loading @@ -573,7 +573,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 = (float) ( 1.0 / sqrtf( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ) ); 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 Loading Loading @@ -977,7 +977,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_sqrt( energy + EPSILON ); energy = inv_sqrtf( energy + EPSILON ); #else energy = (float) inv_sqrt( energy + EPSILON ); #endif Loading Loading
lib_com/prot.h +7 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,13 @@ 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( int16_t *seed /* i/o: random seed */ Loading
lib_com/tools.c +15 −0 Original line number Diff line number Diff line Loading @@ -768,6 +768,21 @@ float inv_sqrt( return (float) ( 1.0 / sqrt( x ) ); } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX /*---------------------------------------------------------------------* * inv_sqrtf() * * Find the inverse square root of the input value (float) *---------------------------------------------------------------------*/ /*! r: inverse square root of input value (float) */ float inv_sqrtf( const float x /* i : input value */ ) { return ( 1.0 / sqrtf( x ) ); } #endif /*-------------------------------------------------------------------* * conv() Loading
lib_enc/ivas_stereo_dmx_evs.c +6 −6 Original line number Diff line number Diff line Loading @@ -530,9 +530,9 @@ static void calc_poc( /* ICCr */ #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = 1.0f / sqrtf( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); Pn = inv_sqrtf( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); #else Pn = (float) inv_sqrt_( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); Pn = (float) inv_sqrt( ( IPDr * IPDr + IPDi * IPDi ) + EPSILON ); #endif IPDr *= Pn; IPDi *= Pn; Loading @@ -547,7 +547,7 @@ static void calc_poc( eneR += ( specRr[i] * specRr[i] + specRi[i] * specRi[i] ); } #ifdef NONBE_FIX_567_DOUBLE_STEREO_DMX Pn = (float) ( 1.0 / sqrtf( ( ( tPr * tPr + tPi * tPi ) + EPSILON ) ) ); Pn = inv_sqrtf( ( tPr * tPr + tPi * tPi ) + EPSILON ); #else Pn = (float) inv_sqrt( ( tPr * tPr + tPi * tPi ) + EPSILON ); #endif Loading @@ -560,7 +560,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 = (float) ( 1.0 / sqrtf( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ) ); 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 Loading @@ -573,7 +573,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 = (float) ( 1.0 / sqrtf( ( Pr[n] * Pr[n] + Pi[n] * Pi[n] ) + EPSILON ) ); 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 Loading Loading @@ -977,7 +977,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_sqrt( energy + EPSILON ); energy = inv_sqrtf( energy + EPSILON ); #else energy = (float) inv_sqrt( energy + EPSILON ); #endif Loading