Commit 9789007e authored by vaclav's avatar vaclav
Browse files

cleaning" remove one level of dereferencing of st_ivas->hDecoderConfig/st_ivas->hEncoderConfig

parent 99b3c819
Loading
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -70,8 +70,8 @@ ivas_error ivas_sba_dec_reinit(

    error = IVAS_ERR_OK;

    output_Fs = st_ivas->hDecoderConfig->output_Fs;
    hDecoderConfig = st_ivas->hDecoderConfig;
    output_Fs = hDecoderConfig->output_Fs;
    output_config = hDecoderConfig->output_config;
    ivas_total_brate = hDecoderConfig->ivas_total_brate;

@@ -90,7 +90,7 @@ ivas_error ivas_sba_dec_reinit(
    {
        if ( st_ivas->ivas_format == ISM_FORMAT )
        {
            ivas_param_ism_dec_close( st_ivas->hDirAC, st_ivas->hDecoderConfig->output_config );
            ivas_param_ism_dec_close( st_ivas->hDirAC, hDecoderConfig->output_config );
        }
        else
        {
@@ -102,7 +102,7 @@ ivas_error ivas_sba_dec_reinit(
    /* Spar handle */
    if ( st_ivas->hSpar != NULL )
    {
        ivas_spar_dec_close( st_ivas->hSpar, st_ivas->hDecoderConfig->output_Fs );
        ivas_spar_dec_close( st_ivas->hSpar, hDecoderConfig->output_Fs );
        st_ivas->hSpar = NULL;
    }

@@ -247,7 +247,7 @@ ivas_error ivas_sba_dec_reinit(
     *------------------------------------------------------------------------------------------*/

    /* Allocate and initialize Custom loudspeaker layout handle */
    if ( st_ivas->hDecoderConfig->Opt_LsCustom )
    if ( hDecoderConfig->Opt_LsCustom )
    {
        if ( ( error = ivas_ls_custom_open( &( st_ivas->hLsSetupCustom ) ) ) != IVAS_ERR_OK )
        {
@@ -256,7 +256,7 @@ ivas_error ivas_sba_dec_reinit(
    }

    /* Allocate and initialize Head-Tracking handle */
    if ( st_ivas->hDecoderConfig->Opt_Headrotation )
    if ( hDecoderConfig->Opt_Headrotation )
    {
        if ( ( error = ivas_headTrack_open( &( st_ivas->hHeadTrackData ) ) ) != IVAS_ERR_OK )
        {
@@ -265,7 +265,7 @@ ivas_error ivas_sba_dec_reinit(
    }

    /* Allocate HRTF binary handle */
    if ( st_ivas->hDecoderConfig->Opt_HRTF_binary )
    if ( hDecoderConfig->Opt_HRTF_binary )
    {
        if ( ( error = ivas_HRTF_binary_open( &( st_ivas->hHrtfTD ) ) ) != IVAS_ERR_OK )
        {
@@ -321,7 +321,7 @@ ivas_error ivas_sba_dec_reinit(

            st_ivas->hSpar->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND );

            ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ),
            ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ),
                                     st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 );
        }
    }
@@ -449,13 +449,13 @@ ivas_error ivas_sba_dec_reinit(

        set_f( st_ivas->mem_hp20_out[i], 0.0f, L_HP20_MEM );
    }
    if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM )
    if ( hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL || hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM )
    {
        if ( ( error = ivas_render_config_open( &( st_ivas->hRenderConfig ) ) ) != IVAS_ERR_OK )
        {
            return error;
        }
        if ( ivas_render_config_init_from_rom( &st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM ) != IVAS_ERR_OK )
        if ( ivas_render_config_init_from_rom( &st_ivas->hRenderConfig, hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_ROOM ) != IVAS_ERR_OK )
        {
            return IVAS_ERR_INTERNAL_FATAL;
        }
@@ -629,7 +629,7 @@ ivas_error ivas_sba_dec_reconfigure(
        /* PCA handle */
        if ( hSpar != NULL )
        {
            if ( st_ivas->hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order_internal == 1 )
            if ( hDecoderConfig->ivas_total_brate == PCA_BRATE && sba_order_internal == 1 )
            {
                if ( ( hSpar->hPCA = (PCA_DEC_STATE *) count_malloc( sizeof( PCA_DEC_STATE ) ) ) == NULL )
                {
+6 −6
Original line number Diff line number Diff line
@@ -328,15 +328,14 @@ ivas_error ivas_sba_enc_reconfigure(
    int16_t nSCE_old, nCPE_old, nchan_transport_old;
    int32_t ivas_total_brate;
    ivas_error error;
    ENCODER_CONFIG_HANDLE hEncoderConfig;

    error = IVAS_ERR_OK;

    ivas_total_brate = st_ivas->hEncoderConfig->ivas_total_brate;
#ifdef SBA_BR_SWITCHING_2
    ENCODER_CONFIG_HANDLE hEncoderConfig;
    hEncoderConfig = st_ivas->hEncoderConfig;
#endif
    if ( ivas_total_brate != st_ivas->hEncoderConfig->last_ivas_total_brate )
    ivas_total_brate = hEncoderConfig->ivas_total_brate;

    if ( ivas_total_brate != hEncoderConfig->last_ivas_total_brate )
    {
#ifdef SBA_BR_SWITCHING_2
        DIRAC_ENC_HANDLE hDirAC = st_ivas->hDirAC;
@@ -346,7 +345,8 @@ ivas_error ivas_sba_enc_reconfigure(
        nCPE_old = st_ivas->nCPE;
        nSCE_old = st_ivas->nSCE;

        st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->hEncoderConfig->sba_order );
        st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, hEncoderConfig->sba_order );

#ifdef SBA_BR_SWITCHING_2
        st_ivas->sba_mode = ivas_sba_mode_select( ivas_total_brate );