Loading lib_rend/ivas_dirac_dec_binaural_functions.c +9 −9 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ Word16 slot_fx[4] = { 32767, 16384, 10922, 8192 }; #define INV_TAN30_FX 28377 // Q14 #define EPSILON_MANT 1180591621 /* 1e-12 = 0.5497558*(2^-39) in Q70 */ #define EPSILON_EXP ( -39 ) #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC #define ONE_DIV_EPSILON_MANT 1953125000 /* 1e+12 = 0.9094947*(2^40) */ #define ONE_DIV_EPSILON_EXP ( 40 ) #endif Loading Loading @@ -4247,7 +4247,7 @@ static void formulate2x2MixingMatrix_fx( // 4611686 = Q62 IF( maxEne_fx == 0 ) { #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC maxEneDiv_fx = ONE_DIV_EPSILON_MANT; move32(); q_maxEneDiv = 31 - ONE_DIV_EPSILON_EXP; Loading Loading @@ -4315,7 +4315,7 @@ static void formulate2x2MixingMatrix_fx( IF( temp == 0 ) { #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC IF( E_out1 == 0 ) { Ghat_fx[0] = 0; Loading @@ -4340,11 +4340,11 @@ static void formulate2x2MixingMatrix_fx( temp = BASOP_Util_Divide3232_Scale_cadence( E_out1, temp, &exp ); exp = sub( exp, sub( q_eout, sub( 31, exp_temp ) ) ); #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Ghat_fx[0] = Sqrt32( temp, &exp ); // Q = 31 - exp #endif } #ifndef FIX_1113_OPT_DIRAC_BIN_REND #ifndef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Ghat_fx[0] = Sqrt32( temp, &exp ); // Q = 31 - exp #endif move32(); Loading @@ -4353,7 +4353,7 @@ static void formulate2x2MixingMatrix_fx( temp = L_max( temp, E_in2 ); // q_ein IF( temp == 0 ) { #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC IF( E_out2 == 0 ) { /* We can set hard-coded results */ Ghat_fx[1] = 0; Loading @@ -4377,11 +4377,11 @@ static void formulate2x2MixingMatrix_fx( temp = BASOP_Util_Divide3232_Scale_cadence( E_out2, temp, &exp1 ); exp1 = sub( exp1, sub( q_eout, sub( 31, exp_temp ) ) ); #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Ghat_fx[1] = Sqrt32( temp, &exp1 ); // Q = 31 - exp1 #endif } #ifndef FIX_1113_OPT_DIRAC_BIN_REND #ifndef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Ghat_fx[1] = Sqrt32( temp, &exp1 ); // Q = 31 - exp1 #endif move32(); Loading Loading @@ -4566,7 +4566,7 @@ static void formulate2x2MixingMatrix_fx( { IF( Sx_fx[chB] == 0 ) { #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Pre_fx[chA][chB] = Mpy_32_32( Pre_fx[chA][chB], ONE_DIV_EPSILON_MANT ); // q_Pre[chA][chB] = add(sub(31, q_P), 31 - ONE_DIV_EPSILON_EXP); q_Pre[chA][chB] = sub( 62 - ONE_DIV_EPSILON_EXP, q_P ); Loading Loading
lib_rend/ivas_dirac_dec_binaural_functions.c +9 −9 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ Word16 slot_fx[4] = { 32767, 16384, 10922, 8192 }; #define INV_TAN30_FX 28377 // Q14 #define EPSILON_MANT 1180591621 /* 1e-12 = 0.5497558*(2^-39) in Q70 */ #define EPSILON_EXP ( -39 ) #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC #define ONE_DIV_EPSILON_MANT 1953125000 /* 1e+12 = 0.9094947*(2^40) */ #define ONE_DIV_EPSILON_EXP ( 40 ) #endif Loading Loading @@ -4247,7 +4247,7 @@ static void formulate2x2MixingMatrix_fx( // 4611686 = Q62 IF( maxEne_fx == 0 ) { #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC maxEneDiv_fx = ONE_DIV_EPSILON_MANT; move32(); q_maxEneDiv = 31 - ONE_DIV_EPSILON_EXP; Loading Loading @@ -4315,7 +4315,7 @@ static void formulate2x2MixingMatrix_fx( IF( temp == 0 ) { #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC IF( E_out1 == 0 ) { Ghat_fx[0] = 0; Loading @@ -4340,11 +4340,11 @@ static void formulate2x2MixingMatrix_fx( temp = BASOP_Util_Divide3232_Scale_cadence( E_out1, temp, &exp ); exp = sub( exp, sub( q_eout, sub( 31, exp_temp ) ) ); #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Ghat_fx[0] = Sqrt32( temp, &exp ); // Q = 31 - exp #endif } #ifndef FIX_1113_OPT_DIRAC_BIN_REND #ifndef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Ghat_fx[0] = Sqrt32( temp, &exp ); // Q = 31 - exp #endif move32(); Loading @@ -4353,7 +4353,7 @@ static void formulate2x2MixingMatrix_fx( temp = L_max( temp, E_in2 ); // q_ein IF( temp == 0 ) { #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC IF( E_out2 == 0 ) { /* We can set hard-coded results */ Ghat_fx[1] = 0; Loading @@ -4377,11 +4377,11 @@ static void formulate2x2MixingMatrix_fx( temp = BASOP_Util_Divide3232_Scale_cadence( E_out2, temp, &exp1 ); exp1 = sub( exp1, sub( q_eout, sub( 31, exp_temp ) ) ); #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Ghat_fx[1] = Sqrt32( temp, &exp1 ); // Q = 31 - exp1 #endif } #ifndef FIX_1113_OPT_DIRAC_BIN_REND #ifndef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Ghat_fx[1] = Sqrt32( temp, &exp1 ); // Q = 31 - exp1 #endif move32(); Loading Loading @@ -4566,7 +4566,7 @@ static void formulate2x2MixingMatrix_fx( { IF( Sx_fx[chB] == 0 ) { #ifdef FIX_1113_OPT_DIRAC_BIN_REND #ifdef FIX_1009_REPLACE_DIV_SQRT_BY_ISQRT_LC Pre_fx[chA][chB] = Mpy_32_32( Pre_fx[chA][chB], ONE_DIV_EPSILON_MANT ); // q_Pre[chA][chB] = add(sub(31, q_P), 31 - ONE_DIV_EPSILON_EXP); q_Pre[chA][chB] = sub( 62 - ONE_DIV_EPSILON_EXP, q_P ); Loading