Loading lib_com/options.h +6 −0 Original line number Diff line number Diff line Loading @@ -104,4 +104,10 @@ /* clang-format on */ /* #################### Start BASOP optimization switches ############################ */ #define OPT_2181_MATRIX_TRANSP_1_MUL /* Dolby: Issue 2181, optimize matrixTransp1Mul_fx. */ /* #################### End BASOP optimization switches ############################ */ #endif lib_dec/ivas_ism_metadata_dec_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ *******************************************************************************************************/ #include "move.h" #include <stdint.h> #include "options.h" #include "ivas_cnst.h" Loading @@ -40,6 +39,7 @@ #include "ivas_stat_enc.h" #include <math.h> #include "wmc_auto.h" #include "move.h" #include "ivas_prot_fx.h" Loading lib_rend/ivas_dirac_dec_binaural_functions_fx.c +40 −0 Original line number Diff line number Diff line Loading @@ -3965,6 +3965,45 @@ static void matrixTransp1Mul_fx( Word64 tmp_outRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; Word64 tmp_outIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; #ifdef OPT_2181_MATRIX_TRANSP_1_MUL Word64 tmp64; Word16 common_lsh, q; q = add( add( q_A, q_B ), 1 ); common_lsh = sub( 63, q ); move16(); FOR( chA = 0; chA < BINAURAL_CHANNELS; chA++ ) { FOR( chB = 0; chB < BINAURAL_CHANNELS; chB++ ) { tmp64 = W_mult_32_32( Are_fx[0][chA], Bre_fx[0][chB] ); tmp64 = W_mac_32_32( tmp64, Are_fx[1][chA], Bre_fx[1][chB] ); tmp64 = W_mac_32_32( tmp64, Aim_fx[0][chA], Bim_fx[0][chB] ); tmp_outRe_fx[chA][chB] = W_mac_32_32( tmp64, Aim_fx[1][chA], Bim_fx[1][chB] ); move64(); common_lsh = s_min( common_lsh, W_norm( tmp_outRe_fx[chA][chB] ) ); tmp64 = W_mult_32_32( Aim_fx[0][chA], Bre_fx[0][chB] ); tmp64 = W_mac_32_32( tmp64, Aim_fx[1][chA], Bre_fx[1][chB] ); tmp64 = W_mac_32_32( W_neg( tmp64 ), Are_fx[0][chA], Bim_fx[0][chB] ); tmp_outIm_fx[chA][chB] = W_mac_32_32( tmp64, Are_fx[1][chA], Bim_fx[1][chB] ); move64(); common_lsh = s_min( common_lsh, W_norm( tmp_outIm_fx[chA][chB] ) ); } } FOR( chA = 0; chA < BINAURAL_CHANNELS; chA++ ) { FOR( chB = 0; chB < BINAURAL_CHANNELS; chB++ ) { outRe_fx[chA][chB] = W_extract_h( W_shl( tmp_outRe_fx[chA][chB], common_lsh ) ); move32(); outIm_fx[chA][chB] = W_extract_h( W_shl( tmp_outIm_fx[chA][chB], common_lsh ) ); move32(); } } *q_out = sub( add( q, common_lsh ), 32 ); move16(); #else Word16 q_tmp_outRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; Word16 q_tmp_outIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; Word64 tmp64_1, tmp64_2; Loading Loading @@ -4011,6 +4050,7 @@ static void matrixTransp1Mul_fx( } *q_out = sub( q_common, 32 ); move16(); #endif if ( L_and( is_zero_arr( outRe_fx[0], size ), is_zero_arr( outIm_fx[0], size ) ) ) { *q_out = Q31; Loading Loading
lib_com/options.h +6 −0 Original line number Diff line number Diff line Loading @@ -104,4 +104,10 @@ /* clang-format on */ /* #################### Start BASOP optimization switches ############################ */ #define OPT_2181_MATRIX_TRANSP_1_MUL /* Dolby: Issue 2181, optimize matrixTransp1Mul_fx. */ /* #################### End BASOP optimization switches ############################ */ #endif
lib_dec/ivas_ism_metadata_dec_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ *******************************************************************************************************/ #include "move.h" #include <stdint.h> #include "options.h" #include "ivas_cnst.h" Loading @@ -40,6 +39,7 @@ #include "ivas_stat_enc.h" #include <math.h> #include "wmc_auto.h" #include "move.h" #include "ivas_prot_fx.h" Loading
lib_rend/ivas_dirac_dec_binaural_functions_fx.c +40 −0 Original line number Diff line number Diff line Loading @@ -3965,6 +3965,45 @@ static void matrixTransp1Mul_fx( Word64 tmp_outRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; Word64 tmp_outIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; #ifdef OPT_2181_MATRIX_TRANSP_1_MUL Word64 tmp64; Word16 common_lsh, q; q = add( add( q_A, q_B ), 1 ); common_lsh = sub( 63, q ); move16(); FOR( chA = 0; chA < BINAURAL_CHANNELS; chA++ ) { FOR( chB = 0; chB < BINAURAL_CHANNELS; chB++ ) { tmp64 = W_mult_32_32( Are_fx[0][chA], Bre_fx[0][chB] ); tmp64 = W_mac_32_32( tmp64, Are_fx[1][chA], Bre_fx[1][chB] ); tmp64 = W_mac_32_32( tmp64, Aim_fx[0][chA], Bim_fx[0][chB] ); tmp_outRe_fx[chA][chB] = W_mac_32_32( tmp64, Aim_fx[1][chA], Bim_fx[1][chB] ); move64(); common_lsh = s_min( common_lsh, W_norm( tmp_outRe_fx[chA][chB] ) ); tmp64 = W_mult_32_32( Aim_fx[0][chA], Bre_fx[0][chB] ); tmp64 = W_mac_32_32( tmp64, Aim_fx[1][chA], Bre_fx[1][chB] ); tmp64 = W_mac_32_32( W_neg( tmp64 ), Are_fx[0][chA], Bim_fx[0][chB] ); tmp_outIm_fx[chA][chB] = W_mac_32_32( tmp64, Are_fx[1][chA], Bim_fx[1][chB] ); move64(); common_lsh = s_min( common_lsh, W_norm( tmp_outIm_fx[chA][chB] ) ); } } FOR( chA = 0; chA < BINAURAL_CHANNELS; chA++ ) { FOR( chB = 0; chB < BINAURAL_CHANNELS; chB++ ) { outRe_fx[chA][chB] = W_extract_h( W_shl( tmp_outRe_fx[chA][chB], common_lsh ) ); move32(); outIm_fx[chA][chB] = W_extract_h( W_shl( tmp_outIm_fx[chA][chB], common_lsh ) ); move32(); } } *q_out = sub( add( q, common_lsh ), 32 ); move16(); #else Word16 q_tmp_outRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; Word16 q_tmp_outIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; Word64 tmp64_1, tmp64_2; Loading Loading @@ -4011,6 +4050,7 @@ static void matrixTransp1Mul_fx( } *q_out = sub( q_common, 32 ); move16(); #endif if ( L_and( is_zero_arr( outRe_fx[0], size ), is_zero_arr( outIm_fx[0], size ) ) ) { *q_out = Q31; Loading