Commit a218f535 authored by multrus's avatar multrus
Browse files

remove FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_SATURATE_WEIGHTS, propage changes to...

remove FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_SATURATE_WEIGHTS, propage changes to affected code part to 2nd loop
parent 3765f23b
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -140,7 +140,6 @@
/* Note: each compile switch (FIX_1101_...) is independent from the other ones */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_USE_MADD_ADD_WEIGHTS  /* FhG: Defines 1.0f-weight variables, uses Madd operation instead of L_add_sat */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_SPLIT_LOOPS           /* FhG: Splits single loop with IF-statements into two low-complex loops */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_SATURATE_WEIGHTS      /* FhG: BUGFIX1: Saturate weight parameters during reformatting in Q22, fixes overflow in extract_l */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_HQ_CONSTANTS          /* FhG: IMPROVE PRECISION: Uses 1/6 and 1/20 in full-precise Q31 constants instead of Q15 */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_USE_UNIQUE_SHL        /* FhG: Uses unique shift amount in each loop iteration */
#define FIX_11_1_IVAS_SPAR_DEC_UPMIXER_SF_RND_COEFFS            /* FhG  ivas_spar_com.c: Zeroes very small negative coeffs via L_shr_r (was L_shr) */
+5 −14
Original line number Diff line number Diff line
@@ -1928,16 +1928,9 @@ void ivas_spar_dec_upmixer_sf_fx(
                            FOR( spar_band = bin2band->p_spar_start_bands[cldfb_band]; spar_band < num_spar_bands; spar_band++ )
                            {
                                /* accumulate contributions from all SPAR bands */
#ifndef FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_SATURATE_WEIGHTS
                                acc = W_mac_32_32( acc, mixer_mat_fx[out_ch][in_ch][spar_band], bin2band->pp_cldfb_weights_per_spar_band_fx[cldfb_band][spar_band] ); // q1+ Q23
#else
                                Word32 tmp = L_shl_sat( bin2band->pp_cldfb_weights_per_spar_band_fx[cldfb_band][spar_band], 9 );    /*Q22 -> Q31(sat)*/
                                cldfb_par_fx = L_add_sat( cldfb_par_fx, Mpy_32_32( mixer_mat_fx[out_ch][in_ch][spar_band], tmp ) ); /*q1*/
#endif
                            }
#ifndef FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_SATURATE_WEIGHTS
                            cldfb_par_fx = W_shl_sat_l( acc, -23 ); // q1
#endif
                        }

                        out_re_fx[out_ch] = Madd_32_32( out_re_fx[out_ch], cldfb_in_ts_re_fx[in_ch][ts][cldfb_band], cldfb_par_fx ); /*q1-25*/
@@ -2025,19 +2018,17 @@ void ivas_spar_dec_upmixer_sf_fx(
                {
                    IF( b_skip_mat[out_ch][in_ch] == 0 )
                    {
                        Word64 acc = 0;
                        move64();

                        cldfb_par_fx = 0;
                        move32();
                        FOR( spar_band = bin2band->p_spar_start_bands[cldfb_band]; spar_band < num_spar_bands; spar_band++ )
                        {
                            /* accumulate contributions from all SPAR bands */
#ifndef FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_SATURATE_WEIGHTS
                            Word16 tmp = extract_l( L_shr( bin2band->pp_cldfb_weights_per_spar_band_fx[cldfb_band][spar_band], 7 ) ); /*Q15*/
                            cldfb_par_fx = L_add_sat( cldfb_par_fx, Mpy_32_16_1( mixer_mat_fx[out_ch][in_ch][spar_band], tmp ) );     /*q1*/
#else
                            Word32 tmp = L_shl_sat( bin2band->pp_cldfb_weights_per_spar_band_fx[cldfb_band][spar_band], 9 );    /*Q22 -> Q31(sat)*/
                            cldfb_par_fx = L_add_sat( cldfb_par_fx, Mpy_32_32( mixer_mat_fx[out_ch][in_ch][spar_band], tmp ) ); /*q1*/
#endif
                            acc = W_mac_32_32( acc, mixer_mat_fx[out_ch][in_ch][spar_band], bin2band->pp_cldfb_weights_per_spar_band_fx[cldfb_band][spar_band] ); // q1+ Q23
                        }
                        cldfb_par_fx = W_shl_sat_l( acc, -23 ); // q1
                        Out_re_fx = Madd_32_32( Out_re_fx, cldfb_in_ts_re_fx[in_ch][ts][cldfb_band], cldfb_par_fx ); /*q1-25*/
                        Out_im_fx = Madd_32_32( Out_im_fx, cldfb_in_ts_im_fx[in_ch][ts][cldfb_band], cldfb_par_fx ); /*q1-25*/
                    }