Commit cf5b9622 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_386_CORECODER_RECONFIG

parent 1273b6f8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -3204,11 +3204,9 @@ void ivas_sba_config(
    int16_t *element_mode                                       /* o  : element mode of the core coder          */
);

#ifdef FIX_386_CORECODER_RECONFIG
void ivas_sba_set_cna_cng_flag(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);
#endif

ivas_error ivas_sba_dec_reconfigure(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
+0 −1
Original line number Diff line number Diff line
@@ -141,7 +141,6 @@
#define DISABLE_ADAP_RES_COD_TMP                        /* temporary fix for IVAS-403, disables adaptive residual coding */
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */

#define FIX_386_CORECODER_RECONFIG                      /* VA: Issue 386: Resolve ToDo comments in CoreCoder reconfig. */

#define SBA2MONO                                        /* FhG: Issue 365: Adapt processing of SBA mono output to be in line with stereo output (less delay, lower complexity) */
#define FIX_379_EXT_METADATA                            /* Eri: Extended metadata issues */
+0 −35
Original line number Diff line number Diff line
@@ -345,45 +345,10 @@ ivas_error ivas_corecoder_dec_reconfig(
     * Set CNA/CNG flags
     *-----------------------------------------------------------------*/

#ifdef FIX_386_CORECODER_RECONFIG
    if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT )
    {
        ivas_sba_set_cna_cng_flag( st_ivas );
    }
#else
    /// VE: this could be merged with part of ivas_init_decoder()
    if ( st_ivas->ivas_format == SBA_FORMAT )
    {
        if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->nchan_transport == 1 )
        {
            /* skip as done in init function */
        }
        else if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) )
        {
            st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 1;
            st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 1;
        }
        else if ( st_ivas->nchan_transport == 2 )
        {
            for ( n = 0; n < CPE_CHANNELS; n++ )
            {
                st_ivas->hCPE[0]->hCoreCoder[n]->cna_dirac_flag = 0;
                st_ivas->hCPE[0]->hCoreCoder[n]->cng_sba_flag = 1;
            }
        }
        else
        {
            for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
            {
                for ( n = 0; n < CPE_CHANNELS; n++ )
                {
                    st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cna_dirac_flag = 0;
                    st_ivas->hCPE[cpe_id]->hCoreCoder[n]->cng_sba_flag = 0;
                }
            }
        }
    }
#endif

    /* special case, if the decoder goes from 1TC DTX to 2TC active frame (in case the bitstream started with an SBA SID frame), allocate DTX memories */
    if ( hDecoderConfig->last_ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE >= 1 )
+0 −21
Original line number Diff line number Diff line
@@ -1008,28 +1008,7 @@ ivas_error ivas_init_decoder(
        }

        /* set CNA/CNG flags */
#ifdef FIX_386_CORECODER_RECONFIG
        ivas_sba_set_cna_cng_flag( st_ivas );
#else
        if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->nchan_transport == 1 )
        {
            st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 0; /* Todo: Check if these can be enabled */
            st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 0;
        }
        else if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) )
        {
            st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 1;
            st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 1;
        }
        else if ( st_ivas->nchan_transport == 2 )
        {
            for ( n = 0; n < CPE_CHANNELS; n++ )
            {
                st_ivas->hCPE[0]->hCoreCoder[n]->cna_dirac_flag = 0; /* Todo: Check if these can be enabled */
                st_ivas->hCPE[0]->hCoreCoder[n]->cng_sba_flag = 1;
            }
        }
#endif
    }
    else if ( st_ivas->ivas_format == MC_FORMAT )
    {
+0 −2
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@
#include "wmc_auto.h"


#ifdef FIX_386_CORECODER_RECONFIG
/*-------------------------------------------------------------------*
 * ivas_sba_set_cna_cng_flag()
 *
@@ -93,7 +92,6 @@ void ivas_sba_set_cna_cng_flag(

    return;
}
#endif


/*-------------------------------------------------------------------*
Loading