Commit 515174be authored by multrus's avatar multrus
Browse files

[cleanup] accept REMOVE_UNUSED_CODE_IVAS_DEC

parent 3ea265be
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1571,10 +1571,6 @@ void ivas_sba_dirac_stereo_dec_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    Word32 *output[CPE_CHANNELS],                               /* i/o: output synthesis signal                 */
    const Word16 output_frame                                   /* i  : output frame length per channel         */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    const Word16 mcmasa                                         /* i  : McMASA flag                             */
#endif
);

ivas_error ivas_osba_render_sf_fx(
@@ -4271,10 +4267,6 @@ void ivas_ism_dtx_limit_noise_energy_for_near_silence_fx(
    SCE_DEC_HANDLE hSCE[],                                      /* i/o: SCE decoder structures                      */
    const Word16 sce_id_dtx,                                    /* i  : SCE DTX ID                                  */
    const Word16 nchan_transport                                /* i  : number of transport channels                */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    Word16 *Q_cngNoiseLevel 
#endif
);

ivas_error stereo_dft_enc_create_fx(
+0 −1
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@
#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 FIX_1904_HARM_GSC_ENC                           /* VA: #1904 Harmonization of EVS and IVAS GSC code */
#define FIX_1478_UNINIT_ON_BFI                          /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */
#define REMOVE_UNUSED_CODE_IVAS_DEC                     /* VA: remove unused code in ivas_jbm_dec_tc_fx() */
#define FIX_2294_CLANG_18_WARNINGS_ENC                  /* VA: Fix some encoder clang-18 warnings, desc. in 2294 */
#define REMOVE_CAM_FROM_IVAS                            /* VA: basop issue 210: remove obsoelte CAM code from IVAS */
#define FIX_2318_CLANG_DECODER                          /* VA: basop issue 2318: Initialize command-line parameter arg.non_diegetic_pan_gain_fx */
+0 −6
Original line number Diff line number Diff line
@@ -161,16 +161,11 @@ void ivas_ism_dtx_limit_noise_energy_for_near_silence_fx(
    SCE_DEC_HANDLE hSCE[],       /* i/o: SCE decoder structures          */
    const Word16 sce_id_dtx,     /* i  : SCE DTX ID                      */
    const Word16 nchan_transport /* i  : number of transport channels    */
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    Word16 *Q_cngNoiseLevel /* i  : stores Q factor of hFdCngCom->cngNoiseLevel for various channels*/
#endif
)
{
    Word32 fac_fx, cng_noise_nrg_obj_fx, cng_noise_nrg_dominant_fx;
    Word16 ch, cng_noise_level_len, Q_cng_noise_nrg_dominant, exp;
    HANDLE_FD_CNG_COM hFdCngCom;
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    Word16 Q_cngNoiseLevel[MAX_SCE];

    FOR( ch = 0; ch < nchan_transport; ch++ )
@@ -189,7 +184,6 @@ void ivas_ism_dtx_limit_noise_energy_for_near_silence_fx(
            move16();
        }
    }
#endif

    hFdCngCom = hSCE[sce_id_dtx]->hCoreCoder[0]->hFdCngDec->hFdCngCom;
    cng_noise_level_len = sub( hFdCngCom->stopFFTbin, hFdCngCom->startBand );
+0 −637

File changed.

Preview size limit exceeded, changes collapsed.

+0 −52
Original line number Diff line number Diff line
@@ -1232,18 +1232,12 @@ void ivas_sba_dirac_stereo_dec_fx(
    Decoder_Struct *st_ivas,      /* i/o: IVAS decoder structure              */
    Word32 *output[CPE_CHANNELS], /* i/o: output synthesis signal             */
    const Word16 output_frame     /* i  : output frame length per channel     Q0*/
#ifndef REMOVE_UNUSED_CODE_IVAS_DEC
    ,
    const Word16 mcmasa /* i  : McMASA flag                         Q0*/
#endif
)
{
    Word16 dtx_flag, fd_cng_flag;
    Word16 sba_mono_flag;
    Word16 memOffset;
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    Word32 output_Fs;
#endif
    Word32 tmp_buf[NS2SA( 48000, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS )];
    Word32 tmp_synth[L_FRAME16k];
    Word32 hb_gain[NB_DIV];
@@ -1256,7 +1250,6 @@ void ivas_sba_dirac_stereo_dec_fx(
    SCE_DEC_HANDLE hSCE;
    CPE_DEC_HANDLE hCPE;
    STEREO_DFT_DEC_DATA_HANDLE hStereoDft;
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    Word16 mcmasa;

    mcmasa = 0;
@@ -1406,49 +1399,23 @@ void ivas_sba_dirac_stereo_dec_fx(
    /*----------------------------------------------------------------*
     * Processing
     *----------------------------------------------------------------*/
#endif

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    FOR( i = 0; i < CPE_CHANNELS; i++ )
#else
    FOR( Word16 i = 0; i < CPE_CHANNELS; i++ )
#endif
    {
        set32_fx( DFT[i], 0, STEREO_DFT_BUF_MAX );
    }

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    q = hStereoDft->q_dft;
    move16();
    q_dft[0] = hStereoDft->q_dft;
    move16();
    q_dft[1] = hStereoDft->q_dft;
    move16();
#else
    hSCE = st_ivas->hSCE[0];
    hCPE = st_ivas->hCPE[0];
    hStereoDft = hCPE->hStereoDft;

    q = hCPE->hStereoDft->q_dft;
    move16();
    q_dft[0] = hCPE->hStereoDft->q_dft;
    move16();
    q_dft[1] = hCPE->hStereoDft->q_dft;
    move16();
#endif

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    Scale_sig32( hCPE->prev_hb_synth_fx[0], NS2SA_FX2( output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), negate( sub( Q11, hStereoDft->q_dft ) ) ); /*hSCE->q_prev_hb_synth_fx + hStereoDft->q_dft - Q11*/
#else
    Scale_sig32( hCPE->prev_hb_synth_fx[0], NS2SA_FX2( st_ivas->hDecoderConfig->output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), negate( sub( Q11, hCPE->hStereoDft->q_dft ) ) );  /*hSCE->q_prev_hb_synth_fx + hCPE->hStereoDft->q_dft - Q11*/
#endif
    IF( hSCE != NULL )
    {
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
        Scale_sig32( hSCE->prev_hb_synth_fx, NS2SA_FX2( output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), negate( sub( Q11, hStereoDft->q_dft ) ) ); /*hSCE->q_prev_hb_synth_fx + hStereoDft->q_dft - Q11*/
#else
        Scale_sig32( hSCE->prev_hb_synth_fx, NS2SA_FX2( st_ivas->hDecoderConfig->output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), negate( sub( Q11, hCPE->hStereoDft->q_dft ) ) ); /*hSCE->q_prev_hb_synth_fx + hCPE->hStereoDft->q_dft - Q11*/
#endif
        hSCE->q_prev_hb_synth_fx = hStereoDft->q_dft;
        move16();
    }
@@ -1479,11 +1446,7 @@ void ivas_sba_dirac_stereo_dec_fx(

    test();
    test();
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( hStereoDft->band_limits, output_Fs, hStereoDft->NFFT, ( ( EQ_16( st_ivas->ivas_format, SBA_FORMAT ) || EQ_16( 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, ( ( EQ_16( st_ivas->ivas_format, SBA_FORMAT ) || EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) && !mcmasa ) );
#endif

    stereo_dft_dec_update_fx( hStereoDft, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/ );

@@ -1530,13 +1493,8 @@ void ivas_sba_dirac_stereo_dec_fx(
    }

    /* DFT Stereo upmix */
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    stereo_dft_dec_fx( 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_fx( 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_fx( hCPE, DFT, 0, output[0], output_frame );
@@ -1594,23 +1552,14 @@ void ivas_sba_dirac_stereo_dec_fx(
        set32_fx( output[ch], 0, output_frame );
    }

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    Scale_sig32( hCPE->prev_hb_synth_fx[0], NS2SA_FX2( output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), sub( Q11, hStereoDft->q_dft ) ); /*hSCE->q_prev_hb_synth_fx + Q11 - hStereoDft->q_dft*/
#else
    Scale_sig32( hCPE->prev_hb_synth_fx[0], NS2SA_FX2( st_ivas->hDecoderConfig->output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), sub( Q11, hCPE->hStereoDft->q_dft ) );  /*hSCE->q_prev_hb_synth_fx + Q11 - hCPE->hStereoDft->q_dft*/
#endif
    IF( hSCE != NULL )
    {
#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
        Scale_sig32( hSCE->prev_hb_synth_fx, NS2SA_FX2( output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), sub( Q11, hStereoDft->q_dft ) ); /*hSCE->q_prev_hb_synth_fx + Q11 - hStereoDft->q_dft*/
#else
        Scale_sig32( hSCE->prev_hb_synth_fx, NS2SA_FX2( st_ivas->hDecoderConfig->output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ), sub( Q11, hCPE->hStereoDft->q_dft ) ); /*hSCE->q_prev_hb_synth_fx + Q11 - hCPE->hStereoDft->q_dft*/
#endif
        hSCE->q_prev_hb_synth_fx = Q11;
        move16();
    }

#ifdef REMOVE_UNUSED_CODE_IVAS_DEC
    /*----------------------------------------------------------------*
     * Adjust scaling of buffers
     *----------------------------------------------------------------*/
@@ -1710,7 +1659,6 @@ void ivas_sba_dirac_stereo_dec_fx(
        hCPE->q_output_mem_fx[ii] = Q11;
        move16();
    }
#endif

    return;
}