Commit 843414cb authored by Vidhya V P's avatar Vidhya V P
Browse files

Clang formatting added

parent ff365e2f
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1051,8 +1051,7 @@ static void ivas_get_active_bins(

static ivas_error ivas_filterbank_setup(
    IVAS_FB_MIXER_HANDLE hFbMixer,
    const int32_t sampling_rate
)
    const int32_t sampling_rate )
{
    int16_t i, j;
    const float *pAll_fb_fr[2];
@@ -1069,6 +1068,7 @@ static ivas_error ivas_filterbank_setup(
    set_s( hFbMixer->first_frame, 1, pCfg->num_out_chans );
    set_s( hFbMixer->first_frame + pCfg->num_out_chans, 0, IVAS_SPAR_MAX_CH - pCfg->num_out_chans );
#endif

    if ( pCfg->num_out_chans > 0 )
    {
        hFbMixer->pFb->filterbank_num_bands = ivas_get_num_bands( sampling_rate );
@@ -1100,6 +1100,7 @@ static ivas_error ivas_filterbank_setup(
    {
        return error;
    }

    if ( pCfg->num_out_chans > 0 )
    {
        ivas_filterbank_t *pFb = hFbMixer->pFb;
@@ -1114,7 +1115,6 @@ static ivas_error ivas_filterbank_setup(
        pFb->fb_bin_to_band.num_cldfb_bands = (int16_t) ( sampling_rate * INV_CLDFB_BANDWIDTH + 0.5f );
        /*pFb->fb_bin_to_band.cldfb_stride = ( int16_t )( ( sampling_rate / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX );*/ /* equals num_cldfb_bands*/
        pFb->fb_bin_to_band.short_stride = (int16_t) ( ( sampling_rate / FRAMES_PER_SEC ) / 4 );

        set_f( pFb->fb_bin_to_band.p_short_stride_bin_to_band, 0.0f, 2 * MDFT_FB_BANDS_240 );
        set_s( pFb->fb_bin_to_band.p_cldfb_map_to_spar_band, 0, CLDFB_NO_CHANNELS_MAX );
        set_s( pFb->fb_bin_to_band.p_spar_start_bands, 0, CLDFB_NO_CHANNELS_MAX );
@@ -1192,6 +1192,7 @@ static ivas_error ivas_filterbank_setup(
            ivas_calculate_abs_fr( pFb, sampling_rate, pCfg->active_w_mixing );
        }
    }

    return error;
}

+5 −7
Original line number Diff line number Diff line
@@ -659,6 +659,7 @@ ivas_error ivas_sba_dec_reconfigure(
#ifndef SBA_BR_SWITCHING_CLEAN_UP
        if ( hSpar != NULL && nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) )
        {

            // VE: dirty patch -> reconfiguration of SPAR modules should be used instead !!
            IVAS_FB_CFG *fb_cfg;
            int16_t active_w_mixing;
@@ -719,8 +720,7 @@ ivas_error ivas_sba_dec_reconfigure(
#else
        if ( hSpar != NULL )
        {
            if  ( ( hSpar->hPCA != NULL )
                && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE) || (sba_order_internal != 1 ) ) )
            if ( ( hSpar->hPCA != NULL ) && ( ( hDecoderConfig->ivas_total_brate != PCA_BRATE ) || ( sba_order_internal != 1 ) ) )
            {
                free( st_ivas->hSpar->hPCA );
                hSpar->hPCA = NULL;
@@ -792,7 +792,6 @@ ivas_error ivas_sba_dec_reconfigure(

            hDirAC = st_ivas->hDirAC;
        }

#ifndef SBA_BR_SWITCHING_RECONFIG
        if ( hDirAC != NULL )
#else
@@ -892,8 +891,7 @@ ivas_error ivas_sba_dec_reconfigure(
    }
#ifdef SBA_BR_SWITCHING_RECONFIG
#ifdef SBA_BR_SWITCHING_CLEAN_UP
    if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( sba_mode_old != st_ivas->sba_mode ) || ( st_ivas->sba_mode == SBA_MODE_SPAR ) )
        && (( (hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) )
    if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( sba_mode_old != st_ivas->sba_mode ) || ( st_ivas->sba_mode == SBA_MODE_SPAR ) ) && ( ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) )
    {
        DIRAC_CONFIG_FLAG flag_config;
        flag_config = DIRAC_OPEN;
@@ -974,7 +972,6 @@ ivas_error ivas_sba_dec_reconfigure(
#endif
#endif
#ifdef SBA_BR_SWITCHING

    else if ( st_ivas->renderer_type == RENDERER_DISABLE || ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->sba_mode != SBA_MODE_SPAR ) )
    {
        if ( st_ivas->hDirAC != NULL )
@@ -988,6 +985,7 @@ ivas_error ivas_sba_dec_reconfigure(
            vbap_free_data( &( st_ivas->hVBAPdata ) );
        }
    }

    if ( st_ivas->hDirAC != NULL && st_ivas->sba_mode == SBA_MODE_SPAR )
    {
        mvs2s( st_ivas->hDirAC->dirac_to_spar_md_bands, st_ivas->hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS );
+5 −3
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ ivas_error ivas_spar_dec_open(

        ivas_pca_dec_init( hSpar->hPCA );
    }

    /* mixer_mat intitialization */
    for ( i = 0; i < num_channels_internal; i++ )
    {
@@ -180,6 +181,7 @@ ivas_error ivas_spar_dec_open(
    ivas_output_init( &( st_ivas->hTransSetup ), st_ivas->transport_config );

    st_ivas->hSpar = hSpar;

    return error;
}

+4 −2
Original line number Diff line number Diff line
@@ -355,6 +355,7 @@ ivas_error ivas_sba_enc_reconfigure(
        st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, hEncoderConfig->sba_order );
#ifdef SBA_BR_SWITCHING
        st_ivas->sba_mode = ivas_sba_mode_select( ivas_total_brate );

        if ( st_ivas->sba_mode == SBA_MODE_SPAR )
        {
            if ( st_ivas->hSpar == NULL )
@@ -602,5 +603,6 @@ ivas_error ivas_sba_enc_reconfigure(
        }
#endif
    }

    return error;
}
+13 −11
Original line number Diff line number Diff line
@@ -156,7 +156,6 @@ ivas_error ivas_spar_enc_open(
            return error;
        }
    }

    /* PCA handle */
    hSpar->hPCA = NULL;
    if ( hEncoderConfig->Opt_PCA_ON )
@@ -174,8 +173,10 @@ ivas_error ivas_spar_enc_open(
    /*-----------------------------------------------------------------*
     * Configuration - set SPAR high-level parameters
     *-----------------------------------------------------------------*/

    ivas_spar_config( hEncoderConfig->ivas_total_brate, min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ),
                      &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &hSpar->core_nominal_brate, -1 );

    if ( st_ivas->nchan_transport == 1 )
    {
        hEncoderConfig->element_mode_init = IVAS_SCE;
@@ -224,15 +225,17 @@ ivas_error ivas_spar_enc_open(
            hSpar->hFrontVad = NULL;
        }

        /*-----------------------------------------------------------------*
         * Final assignment
         *-----------------------------------------------------------------*/


#ifdef SBA_BR_SWITCHING_CLEAN_UP
    }
#endif

    /*-----------------------------------------------------------------*
     * Final assignment
     *-----------------------------------------------------------------*/

    st_ivas->hSpar = hSpar;

    return error;
}

@@ -290,8 +293,7 @@ void ivas_spar_enc_close(
        ivas_FB_mixer_close( &hSpar->hFbMixer, input_Fs, spar_reconfig_flag );
#else
        ivas_FB_mixer_close( &hSpar->hFbMixer, input_Fs );
#endif
#ifndef SBA_BR_SWITCHING_CLEAN_UP

        /* Trans Det handle */
        ivas_spar_transient_det_close( &hSpar->hTranDet );
#endif