Commit 8760d00c authored by multrus's avatar multrus
Browse files

[cleanup] accept REMOVE_UNUSED_CODE_IVAS_DEC

parent e599395f
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -3580,10 +3580,6 @@ void ivas_sba_dirac_stereo_dec(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    float *output[CPE_CHANNELS],                                /* o  : output synthesis signal                 */
    const int16_t output_frame                                  /* i  : output frame length per channel         */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    const int16_t mcmasa                                        /* i  : McMASA flag                             */
#endif
);

void ivas_sba_dirac_stereo_config(
+0 −1
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define REMOVE_UNUSED_CODE_IVAS_DEC                     /* VA: remove unused code in ivas_jbm_dec_tc_fx() */
#define REMOVE_CAM_FROM_IVAS                            /* VA: basop issue 210: remove obsoelte CAM code from IVAS */
#define FIX_2344_ALIGN_PREPROC                          /* VA: basop issue 2344: Align pre_proc_ivas() between FLP and BASOP */
#define FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA              /* Nokia: Fix float issue 1501, uninitialized value in ivas_masa_combine_directions for OMASA */
+0 −30
Original line number Diff line number Diff line
@@ -106,24 +106,6 @@ ivas_error ivas_dec(
     * Decoding + pre-rendering
     *----------------------------------------------------------------*/

#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    if ( st_ivas->bfi && st_ivas->ini_frame == 0 )
    {
        /* zero output when first frame(s) is lost */
        for ( n = 0; n < nchan_out; n++ )
        {
            set_f( p_output[n], 0.0f, output_frame );
        }

#ifdef DEBUG_MODE_INFO
        create_sce_dec( st_ivas, 0, ivas_total_brate );
        output_debug_mode_info_dec( st_ivas->hSCE[0]->hCoreCoder, 1, output_frame, NULL );
        destroy_sce_dec( st_ivas->hSCE[0] );
        st_ivas->hSCE[0] = NULL;
#endif
    }
    else
#endif
        if ( st_ivas->ivas_format == STEREO_FORMAT )
    {
        st_ivas->hCPE[0]->element_brate = ivas_total_brate;
@@ -270,11 +252,7 @@ ivas_error ivas_dec(
                ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, ivas_total_brate, st_ivas->last_active_ivas_total_brate ) );
            }

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
            ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame );
#else
            ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame, st_ivas->ivas_format == MC_FORMAT );
#endif
        }
        else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) )
        {
@@ -476,11 +454,7 @@ ivas_error ivas_dec(

            ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ) );

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
            ivas_sba_dirac_stereo_dec( st_ivas, &p_output[sba_ch_idx], output_frame );
#else
            ivas_sba_dirac_stereo_dec( st_ivas, &p_output[sba_ch_idx], output_frame, 0 );
#endif
        }

        /* HP filtering */
@@ -706,11 +680,7 @@ ivas_error ivas_dec(

            if ( st_ivas->sba_dirac_stereo_flag ) /* use the flag to trigger the DFT upmix */
            {
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
                ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame );
#else
                ivas_sba_dirac_stereo_dec( st_ivas, p_output, output_frame, 1 );
#endif
            }

            /* HP filtering */
+0 −17
Original line number Diff line number Diff line
@@ -828,18 +828,12 @@ void ivas_sba_dirac_stereo_dec(
    Decoder_Struct *st_ivas,     /* i/o: IVAS decoder structure              */
    float *output[CPE_CHANNELS], /* i/o: output synthesis signal             */
    const int16_t output_frame   /* i  : output frame length per channel     */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    const int16_t mcmasa /* i  : McMASA flag                         */
#endif
)
{
    int16_t dtx_flag, fd_cng_flag;
    int16_t sba_mono_flag;
    int16_t memOffset;
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    int32_t output_Fs;
#endif
    float tmp_buf[NS2SA( 48000, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS )];
    float tmp_synth[L_FRAME16k];
    float hb_gain[NB_DIV];
@@ -848,11 +842,9 @@ void ivas_sba_dirac_stereo_dec(
    SCE_DEC_HANDLE hSCE;
    CPE_DEC_HANDLE hCPE;
    STEREO_DFT_DEC_DATA_HANDLE hStereoDft;
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    int16_t mcmasa = st_ivas->ivas_format == MC_FORMAT;

    output_Fs = st_ivas->hDecoderConfig->output_Fs;
#endif

    hSCE = st_ivas->hSCE[0];
    hCPE = st_ivas->hCPE[0];
@@ -873,11 +865,7 @@ void ivas_sba_dirac_stereo_dec(
    memOffset = NS2SA( output_frame * FRAMES_PER_SEC, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS );

    ivas_sba_dirac_stereo_config( hStereoDft->hConfig );
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( hStereoDft->band_limits, output_Fs, hStereoDft->NFFT, ( ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) && !mcmasa ) );
#else
    hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( hStereoDft->band_limits, st_ivas->hDecoderConfig->output_Fs, hStereoDft->NFFT, ( ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT ) && !mcmasa ) );
#endif
    stereo_dft_dec_update( hStereoDft, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/ );
    if ( st_ivas->nchan_transport > 1 )
    {
@@ -909,13 +897,8 @@ void ivas_sba_dirac_stereo_dec(
    }

    /* DFT Stereo upmix */
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    stereo_dft_dec( hStereoDft, hCPE->hCoreCoder[0], DFT, NULL, NULL, 1 /*st_ivas->sba_dirac_stereo_flag*/, sba_mono_flag, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hMdDec : NULL, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hFbMixer->cross_fade_start_offset : 0,
                    output_Fs, st_ivas->nchan_transport, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ) );
#else
    stereo_dft_dec( hStereoDft, hCPE->hCoreCoder[0], DFT, NULL, NULL, 1 /*st_ivas->sba_dirac_stereo_flag*/, sba_mono_flag, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hMdDec : NULL, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hFbMixer->cross_fade_start_offset : 0,
                    st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport, ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->last_active_ivas_total_brate ) );
#endif

    /* DFT synthesis */
    stereo_dft_dec_synthesize( hCPE, DFT, 0, output[0], output_frame );