Commit 13f84214 authored by multrus's avatar multrus
Browse files

[cleanup] accept LBR_ADAP_SMOOTHING_OPT

parent 65e7a439
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -150,7 +150,6 @@



#define LBR_ADAP_SMOOTHING_OPT                          /* FhG: Issue 436: complexity optimization of adaptive smoothing in low-bitrate SBA */

#define FIX_425_MASA_BRSW_RENDERER                      /* Nokia: Issue 425: renderer not reconfigure in MASA bitrate switching */

+0 −11
Original line number Diff line number Diff line
@@ -1713,14 +1713,7 @@ void ivas_spar_dec_upmixer(

        if ( ( hDecoderConfig->ivas_total_brate < IVAS_24k4 ) && ( ( hDecoderConfig->output_config == AUDIO_CONFIG_HOA2 ) || ( hDecoderConfig->output_config == AUDIO_CONFIG_HOA3 ) ) )
        {
#ifdef LBR_ADAP_SMOOTHING_OPT
            ivas_spar_calc_smooth_facs( cldfb_in_ts_re[0], cldfb_in_ts_im[0], num_spar_bands, &hSpar->hFbMixer->pFb->fb_bin_to_band, hSpar->hMdDec->smooth_fac, hSpar->hMdDec->smooth_buf );
#else
        for ( in_ch = 0; in_ch < numch_in; in_ch++ )
        {
            ivas_spar_calc_smooth_facs( cldfb_in_ts_re[in_ch], cldfb_in_ts_im[in_ch], num_spar_bands, &hSpar->hFbMixer->pFb->fb_bin_to_band, hSpar->hMdDec->smooth_fac[in_ch], hSpar->hMdDec->smooth_buf[in_ch] );
        }
#endif
        }

#ifdef JBM_TSM_ON_TCS
@@ -1744,11 +1737,7 @@ void ivas_spar_dec_upmixer(
                    {
                        for ( in_ch = 0; in_ch < numch_in; in_ch++ )
                        {
#ifdef LBR_ADAP_SMOOTHING_OPT
                            mixer_mat[out_ch][in_ch][spar_band] = ( 1 - hSpar->hMdDec->smooth_fac[spar_band] ) * mixer_mat[out_ch][in_ch][spar_band] + hSpar->hMdDec->smooth_fac[spar_band] * hSpar->hMdDec->mixer_mat_prev2[out_ch][in_ch][spar_band];
#else
                        mixer_mat[out_ch][in_ch][spar_band] = ( 1 - hSpar->hMdDec->smooth_fac[in_ch][spar_band] ) * mixer_mat[out_ch][in_ch][spar_band] + hSpar->hMdDec->smooth_fac[in_ch][spar_band] * hSpar->hMdDec->mixer_mat_prev2[out_ch][in_ch][spar_band];
#endif
                            hSpar->hMdDec->mixer_mat_prev2[out_ch][in_ch][spar_band] = mixer_mat[out_ch][in_ch][spar_band];
                        }
                    }
+0 −14
Original line number Diff line number Diff line
@@ -618,25 +618,11 @@ ivas_error ivas_spar_md_dec_init(
    set_f( hMdDec->spar_md.en_ratio_slow, 0.0f, IVAS_MAX_NUM_BANDS );
    set_f( hMdDec->spar_md.ref_pow_slow, 0.0f, IVAS_MAX_NUM_BANDS );

#ifdef LBR_ADAP_SMOOTHING_OPT
    set_zero( hMdDec->smooth_fac, IVAS_MAX_NUM_BANDS );
    for ( i = 0; i < IVAS_MAX_NUM_BANDS; i++ )
    {
        set_zero( hMdDec->smooth_buf[i], 2 * SBA_DIRAC_NRG_SMOOTH_LONG + 1 );
    }
#else
    for ( i = 0; i < IVAS_SPAR_MAX_CH; i++ )
    {
        set_zero( hMdDec->smooth_fac[i], IVAS_MAX_NUM_BANDS );
    }
    for ( i = 0; i < IVAS_SPAR_MAX_CH; i++ )
    {
        for ( j = 0; j < IVAS_MAX_NUM_BANDS; j++ )
        {
            set_zero( hMdDec->smooth_buf[i][j], 2 * SBA_DIRAC_NRG_SMOOTH_LONG + 1 );
        }
    }
#endif
    for ( i = 0; i < IVAS_SPAR_MAX_CH; i++ )
    {
        for ( j = 0; j < IVAS_SPAR_MAX_CH; j++ )
+0 −5
Original line number Diff line number Diff line
@@ -865,13 +865,8 @@ typedef struct ivas_spar_md_dec_state_t
    int16_t spar_hoa_dirac2spar_md_flag;
    int16_t HOA_md_ind[IVAS_SPAR_MAX_CH];
#endif
#ifdef LBR_ADAP_SMOOTHING_OPT
    float smooth_buf[IVAS_MAX_NUM_BANDS][2 * SBA_DIRAC_NRG_SMOOTH_LONG + 1];
    float smooth_fac[IVAS_MAX_NUM_BANDS];
#else
    float smooth_buf[IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS][2 * SBA_DIRAC_NRG_SMOOTH_LONG + 1];
    float smooth_fac[IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS];
#endif
    float mixer_mat_prev2[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS];

} ivas_spar_md_dec_state_t;