Loading lib_com/ivas_tools_fx.c +10 −0 Original line number Diff line number Diff line Loading @@ -606,7 +606,9 @@ Word64 dot_product_cholesky_fixed( { Word16 i, j; Word64 suma, tmp_sum; #ifndef OPT_MCT_ENC_V3_BE Word32 mul; #endif Word32 tmp; const Word32 *pt_x, *pt_A; pt_A = A; Loading @@ -621,12 +623,20 @@ Word64 dot_product_cholesky_fixed( FOR( j = 0; j <= i; j++ ) { #ifdef OPT_MCT_ENC_V3_BE tmp_sum = W_add( tmp_sum, Mpy_32_32( *pt_x++, *pt_A++ ) ); #else mul = Mpy_32_32( *pt_x++, *pt_A++ ); tmp_sum = W_add( tmp_sum, W_deposit32_l( mul ) ); #endif } #ifdef OPT_MCT_ENC_V3_BE tmp = W_shl_sat_l( tmp_sum, -4 ); // to make sure that the tmp_sum will not overflow #else tmp_sum = W_shr( tmp_sum, 4 ); // to make sure that the tmp_sum will not overflow tmp = W_extract_l( tmp_sum ); #endif suma = W_mac_32_32( suma, tmp, tmp ); } Loading lib_com/options.h +3 −1 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ #define OPT_MCT_ENC_V3_BE #define OPT_MCT_ENC_V3_NBE #define OPT_MCT_ENC_V2_BE #define OPT_BIN_REND_V2_NBE Loading Loading @@ -123,6 +124,7 @@ #define ISSUE_1751_replace_shl_ro /*FhG: replace shl_ro by overflow-free alternatives*/ #define ISSUE_1770_replace_shr_ro /* FhG: replace by non-overflow-alternative - BE */ #define ISSUE_1772_replace_shr_o /* FhG: replace by non-overflow-alternative - BE */ #define ISSUE_1796_replace_shl_o /*FhG: replace shl_ro by overflow-free alternatives*/ #define FIX_1735_W_SHL_SAT_L /* FhG: Usage of W_shl_sat_l() */ #define FIX_ISSUE_1792 /* FhG: fix noise bursts in binaural rendering */ Loading @@ -145,6 +147,6 @@ #define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */ #define FIX_1824 //#define ISSUE_1796_replace_shl_o /*FhG: replace shl_ro by overflow-free alternatives*/ #define FIX_1822 #endif lib_enc/analy_sp_fx.c +22 −0 Original line number Diff line number Diff line Loading @@ -727,6 +727,9 @@ static void ivas_find_enr( Word32 min_ener; Word16 shift = 0; move16(); #ifdef OPT_MCT_ENC_V3_BE Word16 tmp_shift; #endif ptR = &data[1]; /* first real */ ptI = &data[L_FFT - 1]; /* first imaginary */ Loading Loading @@ -756,13 +759,20 @@ static void ivas_find_enr( freq = BIN_FREQ_FX; move16(); #ifdef OPT_MCT_ENC_V3_BE tmp_shift = sub( -Q16, shift ); // 16 - shift - 32 #endif FOR( i = 0; i < voic_band; i++ ) /* up to maximum allowed voiced critical band */ { band_ener = 0; move64(); start_freq = freq; move16(); #ifdef OPT_MCT_ENC_V3_BE FOR( ; LE_32( freq, crit_bands_fx[i] ); ) #else WHILE( LE_32( freq, crit_bands_fx[i] ) ) #endif { /* *ptE = *ptR * *ptR + *ptI * *ptI; Loading Loading @@ -795,7 +805,11 @@ static void ivas_find_enr( freq = add( freq, BIN_FREQ_FX ); } #ifdef OPT_MCT_ENC_V3_BE band[i] = W_shl_sat_l( band_ener, tmp_shift ); // *q_band #else band[i] = W_extract_h( W_shl( band_ener, sub( Q16, shift ) ) ); // *q_band #endif move32(); band_energies[i] = band[i]; /* per band energy without E_MIN */ // *q_band Loading @@ -820,7 +834,11 @@ static void ivas_find_enr( move64(); start_freq = freq; move16(); #ifdef OPT_MCT_ENC_V3_BE FOR( ; LE_32( freq, crit_bands_fx[i] ); ) #else WHILE( LE_32( freq, crit_bands_fx[i] ) ) #endif { /* *Bin_E = *ptR * *ptR + *ptI * *ptI; Loading Loading @@ -851,7 +869,11 @@ static void ivas_find_enr( freq = add( freq, BIN_FREQ_FX ); } #ifdef OPT_MCT_ENC_V3_BE band[i] = W_shl_sat_l( band_ener, tmp_shift ); // *q_band #else band[i] = W_extract_h( W_shl_nosat( band_ener, sub( Q16, shift ) ) ); // *q_band #endif move32(); band_energies[i] = band[i]; /* per band energy without E_MIN */ // *q_band Loading lib_enc/igf_enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -135,7 +135,11 @@ static Word16 IGF_getCrest_new_fx( { x = logSpec[i]; move16(); #ifdef OPT_MCT_ENC_V3_BE x_eff = L_mac0( x_eff, x, x ); #else x_eff = L_add( x_eff, L_mult0( x, x ) ); #endif if ( GT_16( x, x_max ) ) { Loading lib_enc/ivas_sns_enc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -258,7 +258,7 @@ static Word16 sns_1st_cod_fx( } /* for second split shift by five bits to store both indices as one 10 bit value */ IF( EQ_16( split, 1 ) ) if ( EQ_16( split, 1 ) ) { index_split = shl( index_split, 5 ); } Loading Loading
lib_com/ivas_tools_fx.c +10 −0 Original line number Diff line number Diff line Loading @@ -606,7 +606,9 @@ Word64 dot_product_cholesky_fixed( { Word16 i, j; Word64 suma, tmp_sum; #ifndef OPT_MCT_ENC_V3_BE Word32 mul; #endif Word32 tmp; const Word32 *pt_x, *pt_A; pt_A = A; Loading @@ -621,12 +623,20 @@ Word64 dot_product_cholesky_fixed( FOR( j = 0; j <= i; j++ ) { #ifdef OPT_MCT_ENC_V3_BE tmp_sum = W_add( tmp_sum, Mpy_32_32( *pt_x++, *pt_A++ ) ); #else mul = Mpy_32_32( *pt_x++, *pt_A++ ); tmp_sum = W_add( tmp_sum, W_deposit32_l( mul ) ); #endif } #ifdef OPT_MCT_ENC_V3_BE tmp = W_shl_sat_l( tmp_sum, -4 ); // to make sure that the tmp_sum will not overflow #else tmp_sum = W_shr( tmp_sum, 4 ); // to make sure that the tmp_sum will not overflow tmp = W_extract_l( tmp_sum ); #endif suma = W_mac_32_32( suma, tmp, tmp ); } Loading
lib_com/options.h +3 −1 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ #define OPT_MCT_ENC_V3_BE #define OPT_MCT_ENC_V3_NBE #define OPT_MCT_ENC_V2_BE #define OPT_BIN_REND_V2_NBE Loading Loading @@ -123,6 +124,7 @@ #define ISSUE_1751_replace_shl_ro /*FhG: replace shl_ro by overflow-free alternatives*/ #define ISSUE_1770_replace_shr_ro /* FhG: replace by non-overflow-alternative - BE */ #define ISSUE_1772_replace_shr_o /* FhG: replace by non-overflow-alternative - BE */ #define ISSUE_1796_replace_shl_o /*FhG: replace shl_ro by overflow-free alternatives*/ #define FIX_1735_W_SHL_SAT_L /* FhG: Usage of W_shl_sat_l() */ #define FIX_ISSUE_1792 /* FhG: fix noise bursts in binaural rendering */ Loading @@ -145,6 +147,6 @@ #define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */ #define FIX_1824 //#define ISSUE_1796_replace_shl_o /*FhG: replace shl_ro by overflow-free alternatives*/ #define FIX_1822 #endif
lib_enc/analy_sp_fx.c +22 −0 Original line number Diff line number Diff line Loading @@ -727,6 +727,9 @@ static void ivas_find_enr( Word32 min_ener; Word16 shift = 0; move16(); #ifdef OPT_MCT_ENC_V3_BE Word16 tmp_shift; #endif ptR = &data[1]; /* first real */ ptI = &data[L_FFT - 1]; /* first imaginary */ Loading Loading @@ -756,13 +759,20 @@ static void ivas_find_enr( freq = BIN_FREQ_FX; move16(); #ifdef OPT_MCT_ENC_V3_BE tmp_shift = sub( -Q16, shift ); // 16 - shift - 32 #endif FOR( i = 0; i < voic_band; i++ ) /* up to maximum allowed voiced critical band */ { band_ener = 0; move64(); start_freq = freq; move16(); #ifdef OPT_MCT_ENC_V3_BE FOR( ; LE_32( freq, crit_bands_fx[i] ); ) #else WHILE( LE_32( freq, crit_bands_fx[i] ) ) #endif { /* *ptE = *ptR * *ptR + *ptI * *ptI; Loading Loading @@ -795,7 +805,11 @@ static void ivas_find_enr( freq = add( freq, BIN_FREQ_FX ); } #ifdef OPT_MCT_ENC_V3_BE band[i] = W_shl_sat_l( band_ener, tmp_shift ); // *q_band #else band[i] = W_extract_h( W_shl( band_ener, sub( Q16, shift ) ) ); // *q_band #endif move32(); band_energies[i] = band[i]; /* per band energy without E_MIN */ // *q_band Loading @@ -820,7 +834,11 @@ static void ivas_find_enr( move64(); start_freq = freq; move16(); #ifdef OPT_MCT_ENC_V3_BE FOR( ; LE_32( freq, crit_bands_fx[i] ); ) #else WHILE( LE_32( freq, crit_bands_fx[i] ) ) #endif { /* *Bin_E = *ptR * *ptR + *ptI * *ptI; Loading Loading @@ -851,7 +869,11 @@ static void ivas_find_enr( freq = add( freq, BIN_FREQ_FX ); } #ifdef OPT_MCT_ENC_V3_BE band[i] = W_shl_sat_l( band_ener, tmp_shift ); // *q_band #else band[i] = W_extract_h( W_shl_nosat( band_ener, sub( Q16, shift ) ) ); // *q_band #endif move32(); band_energies[i] = band[i]; /* per band energy without E_MIN */ // *q_band Loading
lib_enc/igf_enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -135,7 +135,11 @@ static Word16 IGF_getCrest_new_fx( { x = logSpec[i]; move16(); #ifdef OPT_MCT_ENC_V3_BE x_eff = L_mac0( x_eff, x, x ); #else x_eff = L_add( x_eff, L_mult0( x, x ) ); #endif if ( GT_16( x, x_max ) ) { Loading
lib_enc/ivas_sns_enc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -258,7 +258,7 @@ static Word16 sns_1st_cod_fx( } /* for second split shift by five bits to store both indices as one 10 bit value */ IF( EQ_16( split, 1 ) ) if ( EQ_16( split, 1 ) ) { index_split = shl( index_split, 5 ); } Loading