Commit 46be5f6c authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

EVS_FLOAT_ENC macro cleanup for EVS fixed path

parent b2ab5321
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -148,7 +148,8 @@ ivas_error ivas_sba_enc_reconfigure(
);

void destroy_sce_enc(
    SCE_ENC_HANDLE hSCE                                         /* i/o: SCE encoder structure                   */
    SCE_ENC_HANDLE hSCE,                                        /* i/o: SCE encoder structure                   */
    Flag is_evs                                                 /* i  : Flag to indicate EVS encoder            */  
);

void destroy_cpe_enc(
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@
#define FIX_TMP_714
#define BASOP_NOGLOB_TMP_715
#define EVS_FUNC_MODIFIED
#define EVS_FLOAT_ENC
//#define EVS_FLOAT_ENC
#define FIX_667_DISABLE_INITIAL_PLC_SUPPRESSION
#define IVAS_CNST
#define REMOVE_IVAS_UNUSED_PARAMETERS_WARNING  /*temporary operation on unused EVS parameters to remove warnings, these parameters will be used in IVAS */
+1 −1
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ ivas_error ivas_corecoder_enc_reconfig(
                mvr2r( st_ivas->hSCE[sce_id]->hCoreCoder[0]->input_buff, input_buff[sce_id], len_inp_memory );
            }

            destroy_sce_enc( st_ivas->hSCE[sce_id] );
            destroy_sce_enc( st_ivas->hSCE[sce_id], ( EQ_16( st_ivas->hEncoderConfig->element_mode_init, EVS_MONO ) && !st_ivas->hEncoderConfig->stereo_dmx_evs ) );
            st_ivas->hSCE[sce_id] = NULL;
        }

+33 −15
Original line number Diff line number Diff line
@@ -735,20 +735,29 @@ ivas_error ivas_init_encoder(
    if ( ivas_format == MONO_FORMAT )
    {
        st_ivas->nSCE = 1; /* in mono, there is always only one SCE */
        move16();
        st_ivas->nCPE = 0;
        move16();
        st_ivas->nchan_transport = 1;
        move16();
        sce_id = 0;
#ifdef EVS_FLOAT_ENC
        if ( ( error = create_sce_enc( st_ivas, sce_id, ivas_total_brate ) ) != IVAS_ERR_OK )
        move16();

        test();
        IF( NE_16( st_ivas->hEncoderConfig->element_mode_init, EVS_MONO ) || st_ivas->hEncoderConfig->stereo_dmx_evs )
        {
            IF( NE_32( ( error = create_sce_enc( st_ivas, sce_id, ivas_total_brate ) ), IVAS_ERR_OK ) )
            {
                return error;
            }
#else
        if ( ( error = create_evs_sce_enc( st_ivas, sce_id, ivas_total_brate ) ) != IVAS_ERR_OK )
        }
        ELSE
        {
            IF( NE_32( ( error = create_evs_sce_enc( st_ivas, sce_id, ivas_total_brate ) ), IVAS_ERR_OK ) )
            {
                return error;
            }
#endif
        }

        /* prepare stereo downmix for EVS */
        if ( hEncoderConfig->stereo_dmx_evs == 1 )
@@ -1357,20 +1366,29 @@ ivas_error ivas_init_encoder_fx(
    IF( EQ_16( ivas_format, MONO_FORMAT ) )
    {
        st_ivas->nSCE = 1; /* in mono, there is always only one SCE */
        move16();
        st_ivas->nCPE = 0;
        move16();
        st_ivas->nchan_transport = 1;
        move16();
        sce_id = 0;
#ifndef EVS_FLOAT_ENC
        if ( ( error = create_evs_sce_enc( st_ivas, sce_id, ivas_total_brate ) ) != IVAS_ERR_OK )
        move16();

        test();
        IF( EQ_16( st_ivas->hEncoderConfig->element_mode_init, EVS_MONO ) && !st_ivas->hEncoderConfig->stereo_dmx_evs )
        {
            IF( NE_32( ( error = create_evs_sce_enc( st_ivas, sce_id, ivas_total_brate ) ), IVAS_ERR_OK ) )
            {
                return error;
            }
#else
        IF( ( error = create_sce_enc_fx( st_ivas, sce_id, ivas_total_brate ) ) != IVAS_ERR_OK )
        }
        ELSE
        {
            IF( NE_32( ( error = create_sce_enc_fx( st_ivas, sce_id, ivas_total_brate ) ), IVAS_ERR_OK ) )
            {
                return error;
            }
#endif
        }

        /* prepare stereo downmix for EVS */
        IF( hEncoderConfig->stereo_dmx_evs == 1 )
@@ -2024,7 +2042,7 @@ void ivas_destroy_enc(
    {
        if ( st_ivas->hSCE[i] != NULL )
        {
            destroy_sce_enc( st_ivas->hSCE[i] );
            destroy_sce_enc( st_ivas->hSCE[i], ( EQ_16( st_ivas->hEncoderConfig->element_mode_init, EVS_MONO ) && !st_ivas->hEncoderConfig->stereo_dmx_evs ) );
            st_ivas->hSCE[i] = NULL;
        }
    }
+15 −14
Original line number Diff line number Diff line
@@ -471,7 +471,7 @@ ivas_error create_sce_enc_fx(
    return error;
}
#endif
#ifndef EVS_FLOAT_ENC

/*-------------------------------------------------------------------------
 * create_evs_sce_enc()
 *
@@ -578,7 +578,7 @@ ivas_error create_evs_sce_enc(

    return error;
}
#endif

/*-------------------------------------------------------------------------
 * destroy_sce_enc()
 *
@@ -586,26 +586,27 @@ ivas_error create_evs_sce_enc(
 *-------------------------------------------------------------------------*/

void destroy_sce_enc(
    SCE_ENC_HANDLE hSCE /* i/o: SCE encoder structure       */
    SCE_ENC_HANDLE hSCE, /* i/o: SCE encoder structure       */
    Flag is_evs          /* i  : Flag to indicate EVS encoder*/
)
{
    Encoder_State *st;

    st = hSCE->hCoreCoder[0];

#ifndef EVS_FLOAT_ENC
    if ( st != NULL && hSCE->hCoreCoder[0]->element_mode == EVS_MONO )
    IF( st != NULL )
    {
        IF( EQ_16( st->element_mode, EVS_MONO ) && is_evs )
        {
            destroy_encoder_fx( hSCE->hCoreCoder[0] );
            st = NULL;
        }
    else
#endif
        if ( st != NULL )
        ELSE
        {
            destroy_core_enc( st );
            st = NULL;
        }
    }

    ivas_destroy_MD_bstr_enc( &( hSCE->hMetaData ) );

Loading