Commit f82c3b61 authored by vaclav's avatar vaclav
Browse files

introduce REMOVE_UNUSED_CODE_IVAS_DEC

parent 6941acb1
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3567,8 +3567,11 @@ int16_t ivas_sba_remapTCs(
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         */
    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(
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@
#define FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE       /* FhG: correct allocation size for STEREO_MDCT_DEC_DATA struct */
#define FIX_2271_OOB_INDEXING_IN_PIT_OL2                /* VA: Fix for issue 2271, to silence clang18 */
#define FIX_2273_OOB_INDEXING_IN_PIT_FR4                /* VA: Fix to silence clang on ptr init */
#define REMOVE_UNUSED_CODE_IVAS_DEC                     /* VA: remove unused code in ivas_jbm_dec_tc_fx() */()

/* #################### End BE switches ################################## */

+16 −2
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ ivas_error ivas_jbm_dec_tc(
     * 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 */
@@ -120,7 +121,9 @@ ivas_error ivas_jbm_dec_tc(
        st_ivas->hSCE[0] = NULL;
#endif
    }
    else if ( st_ivas->ivas_format == STEREO_FORMAT )
    else
#endif
        if ( st_ivas->ivas_format == STEREO_FORMAT )
    {
        st_ivas->hCPE[0]->element_brate = ivas_total_brate;
        if ( ( error = ivas_cpe_dec( st_ivas, 0, p_output, output_frame, 0 ) ) != IVAS_ERR_OK )
@@ -197,7 +200,6 @@ ivas_error ivas_jbm_dec_tc(
    {
        set_s( nb_bits_metadata, 0, MAX_SCE );


        /* read parameters from the bitstream */
        if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->hQMetaData != NULL )
        {
@@ -267,7 +269,11 @@ ivas_error ivas_jbm_dec_tc(
                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 ) ) )
        {
@@ -469,7 +475,11 @@ ivas_error ivas_jbm_dec_tc(

            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 */
@@ -695,7 +705,11 @@ ivas_error ivas_jbm_dec_tc(

            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 */
+7 −1
Original line number Diff line number Diff line
@@ -827,8 +827,11 @@ void ivas_sba_dirac_stereo_smooth_parameters(
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     */
    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;
@@ -842,6 +845,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;
#endif

    hSCE = st_ivas->hSCE[0];
    hCPE = st_ivas->hCPE[0];