Commit 53fee1dd authored by multrus's avatar multrus
Browse files

[cleanup] accept OPT_SBA_DEC_V2_BE

parent d56119b2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@
/* Note: each compile switch (FIX_1101_...) is independent from the other ones */
#define OPT_MCT_ENC_V3_BE
#define OPT_BIN_REND_V2_NBE
#define OPT_SBA_DEC_V2_BE
#define OPT_SBA_ENC_V2_BE
#define OPT_SBA_ENC_V2_NBE
#define OPT_SBA_ENC_V1_BE
+0 −18
Original line number Diff line number Diff line
@@ -3044,16 +3044,10 @@ void IMDCT_ivas_fx(
        Word32 fac;
        // fac = shl_sat( mult_r( extract_h( L_shr_sat( hTcxDec->conceal_eof_gain32, sub( 1, hTcxDec->conceal_eof_gain_e ) ) ), st->last_concealed_gain_syn_deemph ), 1 );
        fac = Mpy_32_16_1( hTcxDec->conceal_eof_gain32, st->last_concealed_gain_syn_deemph ); // q = 31 - hTcxDec->conceal_eof_gain_e - last_concealed_gain_syn_deemph_e
#ifdef OPT_SBA_DEC_V2_BE
        Word16 eff_e = add( hTcxDec->conceal_eof_gain_e, st->last_concealed_gain_syn_deemph_e );
#endif /* OPT_SBA_DEC_V2_BE */
        FOR( Word16 ind = 0; ind < overlap; ind++ )
        {
#ifdef OPT_SBA_DEC_V2_BE
            old_syn_overl_fx[ind] = extract_h( L_shl_sat( Mpy_32_16_1( fac, old_syn_overl_fx[ind] ), eff_e ) ); // Q(-2)
#else                                                                                                           /* OPT_SBA_DEC_V2_BE */
            old_syn_overl_fx[ind] = extract_h( L_shl_sat( Mpy_32_16_1( fac, old_syn_overl_fx[ind] ), add( hTcxDec->conceal_eof_gain_e, st->last_concealed_gain_syn_deemph_e ) ) ); // Q(-2)
#endif                                                                                                          /* OPT_SBA_DEC_V2_BE */
            move16();
        }
    }
@@ -5455,16 +5449,10 @@ void decoder_tcx_noiseshaping_igf_fx(
        {
            /* If the exponent on the spec side (i>L_frame) is lesser, then shift all the values in the
            spec side by the difference to make both sides have the same exponent. */
#ifdef OPT_SBA_DEC_V2_BE
            Word16 diff_e = sub( frame_side_x_e, spec_side_x_e );
#endif /* OPT_SBA_DEC_V2_BE */
            FOR( i = L_frame; i < L_spec; i++ )
            {
#ifdef OPT_SBA_DEC_V2_BE
                x_fx[i] = L_shr( x_fx[i], diff_e );
#else  /* OPT_SBA_DEC_V2_BE */
                x_fx[i] = L_shr( x_fx[i], sub( frame_side_x_e, spec_side_x_e ) );
#endif /* OPT_SBA_DEC_V2_BE */
                move32();
            }
        }
@@ -5472,16 +5460,10 @@ void decoder_tcx_noiseshaping_igf_fx(
        {
            /* If the exponent on the spec side (i>L_frame) is greater, then shift all the values in the
            frame side (i<L_frame) by the difference to make both sides have the same exponent. */
#ifdef OPT_SBA_DEC_V2_BE
            Word16 diff_e = sub( spec_side_x_e, frame_side_x_e );
#endif /* OPT_SBA_DEC_V2_BE */
            FOR( i = 0; i < L_frame; i++ )
            {
#ifdef OPT_SBA_DEC_V2_BE
                x_fx[i] = L_shr( x_fx[i], diff_e );
#else  /* OPT_SBA_DEC_V2_BE */
                x_fx[i] = L_shr( x_fx[i], sub( spec_side_x_e, frame_side_x_e ) );
#endif /* OPT_SBA_DEC_V2_BE */
                move32();
            }
        }
+0 −15
Original line number Diff line number Diff line
@@ -1784,19 +1784,6 @@ void ivas_binRenderer_fx(

    /* Compute Convolution */
    /* memory reset for the binaural output */
#ifndef OPT_SBA_DEC_V2_BE
    FOR( pos_idx = 0; pos_idx < num_poses; pos_idx++ )
    {
        FOR( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ )
        {
            FOR( k = 0; k < numTimeSlots; k++ )
            {
                set32_fx( Cldfb_RealBuffer_Binaural_fx[pos_idx][chIdx][k], 0, CLDFB_NO_CHANNELS_MAX );
                set32_fx( Cldfb_ImagBuffer_Binaural_fx[pos_idx][chIdx][k], 0, CLDFB_NO_CHANNELS_MAX );
            }
        }
    }
#endif /* OPT_SBA_DEC_V2_BE */

    /* Note: on main, this nested for loop was removed under a "bit-exact optimization" under switch OPT_SBA_DEC_V2_BE */
    /*       this was found to clash with split rendering, so kept here. WMOPS impact should be assessed */
@@ -1968,7 +1955,6 @@ void ivas_binRenderer_fx(
        }
    }

#ifdef OPT_SBA_DEC_V2_BE
    Word16 len = sub( CLDFB_NO_CHANNELS_MAX, hBinRenderer->conv_band );

    FOR( pos_idx = 0; pos_idx < num_poses; pos_idx++ )
@@ -1981,7 +1967,6 @@ void ivas_binRenderer_fx(
            set32_fx( &Cldfb_ImagBuffer_Binaural_fx[pos_idx][1][k][hBinRenderer->conv_band], 0, len );
        }
    }
#endif /* OPT_SBA_DEC_V2_BE */

    pop_wmops();
    return;
+0 −5
Original line number Diff line number Diff line
@@ -610,13 +610,8 @@ void ivas_dirac_dec_output_synthesis_cov_param_mc_synthesise_slot_fx(
                            temp_imag = W_mac_32_32( temp_imag, mixing_matrix_res_smooth_fx[idx], diff_f_imag_fx[i] );
                            idx += nY;
                        }
#ifdef OPT_SBA_DEC_V2_BE
                        Cldfb_RealBuffer_fx[ch_idx][slot_idx_sfr][band] = W_shl_sat_l( temp_real, shifter );
                        Cldfb_ImagBuffer_fx[ch_idx][slot_idx_sfr][band] = W_shl_sat_l( temp_imag, shifter );
#else  /* OPT_SBA_DEC_V2_BE */
                        Cldfb_RealBuffer_fx[ch_idx][slot_idx_sfr][band] = W_extract_l( W_shr( temp_real, shifter ) );
                        Cldfb_ImagBuffer_fx[ch_idx][slot_idx_sfr][band] = W_extract_l( W_shr( temp_imag, shifter ) );
#endif /* OPT_SBA_DEC_V2_BE */
                    }
                }
            }
+0 −42
Original line number Diff line number Diff line
@@ -1159,7 +1159,6 @@ void ivas_spar_get_parameters_fx(
    move16();
    Word16 add_weight_fx = sub( MAX_WORD16, weight_fx );
    Word16 add_weight_20ms_fx = sub( MAX_WORD16, weight_20ms_fx );
#ifdef OPT_SBA_DEC_V2_BE
    Word16 out_flag[IVAS_MAX_FB_MIXER_OUT_CH];

    Word32 band_bool = LT_16( split_band, IVAS_MAX_NUM_BANDS );
@@ -1221,47 +1220,6 @@ void ivas_spar_get_parameters_fx(
            }
        }
    }
#else  /* OPT_SBA_DEC_V2_BE */
    FOR( spar_band = 0; spar_band < num_spar_bands; spar_band++ )
    {
        FOR( out_ch = 0; out_ch < num_ch_out; out_ch++ )
        {
            test();
            IF( LT_16( split_band, IVAS_MAX_NUM_BANDS )
                /* 20ms cross-fade for Transport channels in all frequency bands */
                && ( 0 == ivas_is_res_channel( out_ch, hSpar->hMdDec->spar_md_cfg.nchan_transport ) ) /* sub-frame processing for missing channels in all frequency bands*/
            )
            {
                FOR( in_ch = 0; in_ch < num_ch_in; in_ch++ )
                {
                    IF( GT_16( hSpar->i_subframe, 3 ) )
                    {
                        par_mat_fx[out_ch][in_ch][spar_band] = Madd_32_16( Mpy_32_16_1( hSpar->hMdDec->mixer_mat_prev_fx[ts1][out_ch][in_ch][spar_band], weight_fx ),
                                                                           hSpar->hMdDec->mixer_mat_prev_fx[ts0][out_ch][in_ch][spar_band], add_weight_fx );
                        move32();
                    }
                    ELSE
                    {
                        par_mat_fx[out_ch][in_ch][spar_band] = hSpar->hMdDec->mixer_mat_fx[out_ch][in_ch][spar_band]; /*hSpar->hMdDec->Q_mixer_mat*/
                        move32();
                    }
                }
            }
            ELSE
            {
                FOR( in_ch = 0; in_ch < num_ch_in; in_ch++ )
                {
                    /* 20ms Transport channel reconstruction with matching encoder/decoder processing */
                    Word16 prev_idx = SPAR_DIRAC_SPLIT_START_BAND < IVAS_MAX_NUM_BANDS ? 1 : 0; /* if SPAR_DIRAC_SPLIT_START_BAND == IVAS_MAX_NUM_BANDS, then the sub-frame mixer_mat delay line is not active */
                    move16();
                    par_mat_fx[out_ch][in_ch][spar_band] = Madd_32_16( Mpy_32_16_1( hSpar->hMdDec->mixer_mat_prev_fx[prev_idx][out_ch][in_ch][spar_band], add_weight_20ms_fx ),
                                                                       hSpar->hMdDec->mixer_mat_fx[out_ch][in_ch][spar_band], weight_20ms_fx ); /*hSpar->hMdDec->Q_mixer_mat*/
                    move32();
                }
            }
        }
    }
#endif /* OPT_SBA_DEC_V2_BE */
    return;
}

Loading