Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ #define NONBE_OPT_2239_IVAS_FILTER_PROCESS /* Dolby: Issue 2239, optimize ivas_filter_process_fx. */ #define NONBE_OPT_2193_EIG2X2 /* Dolby: Issue 2193, optimize eig2x2_fx. */ #define BE_FIX_2240_COMPUTE_COV_MTC_FX_FAST /* FhG: Speeds up covariance calculation e.g. 60 WMOPS for encoding -mc 7_1_4 24400 48 */ #define OPT_2308_FIND_TARGET /* VA: Issue 2308, Speeds up computation and improve accuracy of the impulse response */ /* #################### End BASOP optimization switches ############################ */ Loading lib_enc/find_tar_fx.c +46 −0 Original line number Diff line number Diff line Loading @@ -173,7 +173,12 @@ void find_targets_ivas_fx( { Word16 i; Word16 temp[M + 6 * L_SUBFR]; /* error of quantization */ #ifndef OPT_2308_FIND_TARGET Word16 scale, scaleq, j, d, s, s2, tmp; #else Word16 scale, scaleq, j, d, s, tmp; Word32 s2; #endif Word16 Aqs[M + 1]; Word32 h1_32[6 * L_SUBFR]; Word16 sf; Loading Loading @@ -233,17 +238,27 @@ void find_targets_ivas_fx( { Copy( p_Aq, Aqs, M + 1 ); /* Q12 */ s = add( scaleq, 1 ); #ifndef OPT_2308_FIND_TARGET s2 = shr( 16384, d ); #else s2 = L_shr( ( 16384 << 16 ), d ); #endif } ELSE { Copy_Scale_sig( p_Aq, Aqs, M + 1, d ); /* Q12 */ s = add( scale, 1 ); #ifndef OPT_2308_FIND_TARGET s2 = 16384; move16(); #else s2 = ( 16384 << 16 ); move32(); #endif } set32_fx( h1_32, 0, L_subfr ); #ifndef OPT_2308_FIND_TARGET FOR( i = 0; i < M; i++ ) { Ltmp64 = W_mult_16_16( Ap[i], s2 ); /* Q27 */ Loading Loading @@ -273,7 +288,38 @@ void find_targets_ivas_fx( h1_32[i] = W_extract_l( Ltmp64 ); /* Q27 */ move32(); } #else FOR( i = 0; i < M; i++ ) { Ltmp64 = W_mult_32_16( s2, Ap[i] ); /* Q27 */ FOR( j = 1; j <= i; j++ ) { Ltmp64 = W_msu_32_16( Ltmp64, L_shl_sat( h1_32[i - j], s ), Aqs[j] ); /* Q27 */ } h1_32[i] = W_sat_m( Ltmp64 ); /* Q27 */ move32(); } Ltmp64 = W_mult_32_16( s2, Ap[i] ); /* Q27 */ FOR( j = 1; j <= M; j++ ) { Ltmp64 = W_msu_32_16( Ltmp64, L_shl_sat( h1_32[i - j], s ), Aqs[j] ); /* Q27 */ } h1_32[M] = W_sat_m( Ltmp64 ); /* Q27 */ move32(); FOR( i = M + 1; i < L_subfr; i++ ) { Ltmp64 = W_msu_32_16( 0, L_shl_sat( h1_32[i - 1], s ), Aqs[1] ); /* Q27 */ FOR( j = 2; j <= M; j++ ) { Ltmp64 = W_msu_32_16( Ltmp64, L_shl_sat( h1_32[i - j], s ), Aqs[j] ); /* Q27 */ } h1_32[i] = W_sat_m( Ltmp64 ); /* Q27 */ move32(); } #endif sf = sub( L_norm_arr( h1_32, L_subfr ), 1 ); Copy_Scale_sig32_16( h1_32, h1, L_subfr, sf ); // Q11 + sf Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ #define NONBE_OPT_2239_IVAS_FILTER_PROCESS /* Dolby: Issue 2239, optimize ivas_filter_process_fx. */ #define NONBE_OPT_2193_EIG2X2 /* Dolby: Issue 2193, optimize eig2x2_fx. */ #define BE_FIX_2240_COMPUTE_COV_MTC_FX_FAST /* FhG: Speeds up covariance calculation e.g. 60 WMOPS for encoding -mc 7_1_4 24400 48 */ #define OPT_2308_FIND_TARGET /* VA: Issue 2308, Speeds up computation and improve accuracy of the impulse response */ /* #################### End BASOP optimization switches ############################ */ Loading
lib_enc/find_tar_fx.c +46 −0 Original line number Diff line number Diff line Loading @@ -173,7 +173,12 @@ void find_targets_ivas_fx( { Word16 i; Word16 temp[M + 6 * L_SUBFR]; /* error of quantization */ #ifndef OPT_2308_FIND_TARGET Word16 scale, scaleq, j, d, s, s2, tmp; #else Word16 scale, scaleq, j, d, s, tmp; Word32 s2; #endif Word16 Aqs[M + 1]; Word32 h1_32[6 * L_SUBFR]; Word16 sf; Loading Loading @@ -233,17 +238,27 @@ void find_targets_ivas_fx( { Copy( p_Aq, Aqs, M + 1 ); /* Q12 */ s = add( scaleq, 1 ); #ifndef OPT_2308_FIND_TARGET s2 = shr( 16384, d ); #else s2 = L_shr( ( 16384 << 16 ), d ); #endif } ELSE { Copy_Scale_sig( p_Aq, Aqs, M + 1, d ); /* Q12 */ s = add( scale, 1 ); #ifndef OPT_2308_FIND_TARGET s2 = 16384; move16(); #else s2 = ( 16384 << 16 ); move32(); #endif } set32_fx( h1_32, 0, L_subfr ); #ifndef OPT_2308_FIND_TARGET FOR( i = 0; i < M; i++ ) { Ltmp64 = W_mult_16_16( Ap[i], s2 ); /* Q27 */ Loading Loading @@ -273,7 +288,38 @@ void find_targets_ivas_fx( h1_32[i] = W_extract_l( Ltmp64 ); /* Q27 */ move32(); } #else FOR( i = 0; i < M; i++ ) { Ltmp64 = W_mult_32_16( s2, Ap[i] ); /* Q27 */ FOR( j = 1; j <= i; j++ ) { Ltmp64 = W_msu_32_16( Ltmp64, L_shl_sat( h1_32[i - j], s ), Aqs[j] ); /* Q27 */ } h1_32[i] = W_sat_m( Ltmp64 ); /* Q27 */ move32(); } Ltmp64 = W_mult_32_16( s2, Ap[i] ); /* Q27 */ FOR( j = 1; j <= M; j++ ) { Ltmp64 = W_msu_32_16( Ltmp64, L_shl_sat( h1_32[i - j], s ), Aqs[j] ); /* Q27 */ } h1_32[M] = W_sat_m( Ltmp64 ); /* Q27 */ move32(); FOR( i = M + 1; i < L_subfr; i++ ) { Ltmp64 = W_msu_32_16( 0, L_shl_sat( h1_32[i - 1], s ), Aqs[1] ); /* Q27 */ FOR( j = 2; j <= M; j++ ) { Ltmp64 = W_msu_32_16( Ltmp64, L_shl_sat( h1_32[i - j], s ), Aqs[j] ); /* Q27 */ } h1_32[i] = W_sat_m( Ltmp64 ); /* Q27 */ move32(); } #endif sf = sub( L_norm_arr( h1_32, L_subfr ), 1 ); Copy_Scale_sig32_16( h1_32, h1, L_subfr, sf ); // Q11 + sf Loading