Loading lib_rend/ivas_reverb_filter_design_fx.c +12 −2 Original line number Diff line number Diff line Loading @@ -738,14 +738,24 @@ void ivas_reverb_calc_color_levels_fx( Word32 H_filter; Word32 T60_est; Word16 temp = 0, result_e = 0; Word32 temp_32; move16(); move16(); cos_w = getCosWord16R2( (Word16) L_abs( L_shl( Mpy_32_32( pFc[freq_idx], fs_inverted ), 1 ) ) ); // q = 15 //H_filter = L_add( L_shr( L_add( L_shr( Mpy_32_32( coefB[0], coefB[0] ), 1 ), L_shr( Mpy_32_32( coefB[1], coefB[1] ), 1 ) ), 2 ), L_shr( Mpy_32_32( coefB[0], Mpy_32_32( coefB[1], L_shl( cos_w, 15 ) ) ), 1 ) ); // q = 28 Word32 temp1 = L_shr( L_add( L_shr( Mpy_32_32( coefB[0], coefB[0] ), 1 ), L_shr( Mpy_32_32( coefB[1], coefB[1] ), 1 ) ), 2 ); Word32 temp2 = L_shr( Mpy_32_32( coefB[0], Mpy_32_32( coefB[1], L_shl( cos_w, 15 ) ) ), 1 ); H_filter = L_add( L_shr( L_add( L_shr( Mpy_32_32( coefB[0], coefB[0] ), 1 ), L_shr( Mpy_32_32( coefB[1], coefB[1] ), 1 ) ), 2 ), L_shr( Mpy_32_32( coefB[0], Mpy_32_32( coefB[1], L_shl( cos_w, 15 ) ) ), 1 ) ); // q = 28 temp1 = L_shr(Mpy_32_32( coefA[1], coefA[1] ), 3);//Q28 temp2 = Mpy_32_32( coefA[1], L_shl( cos_w, 15 ) );//Q30 H_filter = BASOP_Util_Divide3232_Scale_newton( H_filter, L_add( ONE_IN_Q28, L_shr( L_add( L_shr( Mpy_32_32( coefA[1], coefA[1] ), 2 ), Mpy_32_32( coefA[1], L_shl( cos_w, 15 ) ) ), 1 ) ), &temp ); //H_filter = BASOP_Util_Divide3232_Scale_newton( H_filter, L_add( ONE_IN_Q28, L_add( L_shr( Mpy_32_32( coefA[1], coefA[1] ), 2 ), L_shl(Mpy_32_32( coefA[1], L_shl( cos_w, 15 ) ) , 1 ) ) ), &temp ); H_filter = Sqrt32( H_filter, &temp ); T60_est = BASOP_Util_Divide3232_Scale_newton( L_shl( i_mult( -3, pLoop_delays[loop_idx] ), 2 ), Mpy_32_32( Mpy_32_32( L_add( BASOP_Util_Log2( H_filter ), L_shl( temp, 25 ) ), LOG10_2_Q31 ), L_shl( output_Fs, 8 ) ) , &temp ); // conversion of log2 to log10. t60[freq_idx] = BASOP_Util_Add_Mant32Exp( T60_est, temp, t60[freq_idx], t60_e[freq_idx], &result_e ); move16(); Loading Loading
lib_rend/ivas_reverb_filter_design_fx.c +12 −2 Original line number Diff line number Diff line Loading @@ -738,14 +738,24 @@ void ivas_reverb_calc_color_levels_fx( Word32 H_filter; Word32 T60_est; Word16 temp = 0, result_e = 0; Word32 temp_32; move16(); move16(); cos_w = getCosWord16R2( (Word16) L_abs( L_shl( Mpy_32_32( pFc[freq_idx], fs_inverted ), 1 ) ) ); // q = 15 //H_filter = L_add( L_shr( L_add( L_shr( Mpy_32_32( coefB[0], coefB[0] ), 1 ), L_shr( Mpy_32_32( coefB[1], coefB[1] ), 1 ) ), 2 ), L_shr( Mpy_32_32( coefB[0], Mpy_32_32( coefB[1], L_shl( cos_w, 15 ) ) ), 1 ) ); // q = 28 Word32 temp1 = L_shr( L_add( L_shr( Mpy_32_32( coefB[0], coefB[0] ), 1 ), L_shr( Mpy_32_32( coefB[1], coefB[1] ), 1 ) ), 2 ); Word32 temp2 = L_shr( Mpy_32_32( coefB[0], Mpy_32_32( coefB[1], L_shl( cos_w, 15 ) ) ), 1 ); H_filter = L_add( L_shr( L_add( L_shr( Mpy_32_32( coefB[0], coefB[0] ), 1 ), L_shr( Mpy_32_32( coefB[1], coefB[1] ), 1 ) ), 2 ), L_shr( Mpy_32_32( coefB[0], Mpy_32_32( coefB[1], L_shl( cos_w, 15 ) ) ), 1 ) ); // q = 28 temp1 = L_shr(Mpy_32_32( coefA[1], coefA[1] ), 3);//Q28 temp2 = Mpy_32_32( coefA[1], L_shl( cos_w, 15 ) );//Q30 H_filter = BASOP_Util_Divide3232_Scale_newton( H_filter, L_add( ONE_IN_Q28, L_shr( L_add( L_shr( Mpy_32_32( coefA[1], coefA[1] ), 2 ), Mpy_32_32( coefA[1], L_shl( cos_w, 15 ) ) ), 1 ) ), &temp ); //H_filter = BASOP_Util_Divide3232_Scale_newton( H_filter, L_add( ONE_IN_Q28, L_add( L_shr( Mpy_32_32( coefA[1], coefA[1] ), 2 ), L_shl(Mpy_32_32( coefA[1], L_shl( cos_w, 15 ) ) , 1 ) ) ), &temp ); H_filter = Sqrt32( H_filter, &temp ); T60_est = BASOP_Util_Divide3232_Scale_newton( L_shl( i_mult( -3, pLoop_delays[loop_idx] ), 2 ), Mpy_32_32( Mpy_32_32( L_add( BASOP_Util_Log2( H_filter ), L_shl( temp, 25 ) ), LOG10_2_Q31 ), L_shl( output_Fs, 8 ) ) , &temp ); // conversion of log2 to log10. t60[freq_idx] = BASOP_Util_Add_Mant32Exp( T60_est, temp, t60[freq_idx], t60_e[freq_idx], &result_e ); move16(); Loading