Commit 2188b6a9 authored by Vidhya V P's avatar Vidhya V P
Browse files

Moved the spar reconfig flag to Spar structure

parent ee8912e3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -339,7 +339,9 @@ ivas_error ivas_init_encoder(
        /* In IVAS, ensure that minimum coded bandwidth is WB */
        hEncoderConfig->max_bwidth = max( hEncoderConfig->max_bwidth, WB );
    }
#ifndef SBA_MODE_CLEAN_UP
    hEncoderConfig->spar_reconfig_flag = 0;
#endif
    st_ivas->ism_mode = ISM_MODE_NONE;
    st_ivas->mc_mode = MC_MODE_NONE;
#ifndef SBA_MODE_CLEAN_UP
+4 −0
Original line number Diff line number Diff line
@@ -232,7 +232,11 @@ ivas_error ivas_sba_enc_reconfigure(
                return error;
            }
        }
#ifndef SBA_MODE_CLEAN_UP
        hEncoderConfig->spar_reconfig_flag = spar_reconfig_flag;
#else
        st_ivas->hSpar->spar_reconfig_flag = spar_reconfig_flag;
#endif
        if ( ( error = ivas_dirac_enc_reconfigure( st_ivas ) ) != IVAS_ERR_OK )
        {
            return error;
+7 −1
Original line number Diff line number Diff line
@@ -82,7 +82,9 @@ ivas_error ivas_spar_enc_open(
            return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR encoder" );
        }
    }

#ifdef SBA_MODE_CLEAN_UP
    hSpar->spar_reconfig_flag = 0;
#endif
    input_Fs = hEncoderConfig->input_Fs;
    sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER );
    nchan_inp = ivas_sba_get_nchan_metadata( sba_order_internal );
@@ -603,7 +605,11 @@ static ivas_error ivas_spar_enc_process(
    if ( hSpar->hMdEnc->table_idx != table_idx )
    {
        hSpar->hMdEnc->table_idx = table_idx;
#ifndef SBA_MODE_CLEAN_UP
        if ( ( ivas_total_brate != hEncoderConfig->last_ivas_total_brate ) && ( !hEncoderConfig->spar_reconfig_flag ) )
#else
        if ( ( ivas_total_brate != hEncoderConfig->last_ivas_total_brate ) && ( !hSpar->spar_reconfig_flag) )
#endif
        {
            if ( ( error = ivas_spar_md_enc_init( hSpar->hMdEnc, hEncoderConfig, sba_order ) ) != IVAS_ERR_OK )
            {
+5 −1
Original line number Diff line number Diff line
@@ -686,7 +686,9 @@ typedef struct ivas_spar_enc_lib_t
    int32_t core_nominal_brate;     /* Nominal bitrate for core coding  */
    FRONT_VAD_ENC_HANDLE hFrontVad; /* front-VAD handle    */
    ENC_CORE_HANDLE hCoreCoderVAD;  /* core-coder handle for front-VAD module */

#ifdef SBA_MODE_CLEAN_UP
    int16_t spar_reconfig_flag;
#endif
    int16_t front_vad_flag;
    int16_t front_vad_dtx_flag;
    int16_t force_front_vad;
@@ -1037,7 +1039,9 @@ typedef struct encoder_config_structure

    /* temp. development parameters */
    int16_t Opt_PCA_ON;                             /* flag indicating PCA operation in SBA */
#ifndef SBA_MODE_CLEAN_UP
    int16_t spar_reconfig_flag;
 #endif
#ifdef DEBUGGING
    /* debugging options */
    int16_t stereo_mode_cmdl;                       /* stereo mode forced from the command-line  */