Commit 25460070 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_ISM_XOVER_BR

parent b3a7e5db
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -156,7 +156,6 @@

/* #################### Start BASOP porting switches ############################ */

#define NONBE_FIX_ISM_XOVER_BR                          /* FhG: issue 1072: select OSBA coding method depending on number of object and bitrate */
#define NONBE_FIX_984_OMASA_EXT_OUTPUT                  /* Nok: issue 1497 - porting OMASA EXT MR   */
#define FIX_1161_REDUCE_OMASA_HEAP                      /* VA: reduction of OMASA heap memory */
#define CONF_DISTATT                                    /* Eri: Make distance attenuation configurable */
+0 −8
Original line number Diff line number Diff line
@@ -270,11 +270,7 @@ ivas_error ivas_corecoder_dec_reconfig(
        }
        else if ( st_ivas->hMCT != NULL && st_ivas->nCPE > 1 )
        {
#ifdef NONBE_FIX_ISM_XOVER_BR
            if ( ( error = mct_dec_reconfigure( st_ivas, nchan_transport_real != nchan_transport_old ) ) != IVAS_ERR_OK )
#else
            if ( ( error = mct_dec_reconfigure( st_ivas, st_ivas->nchan_transport != nchan_transport_old ) ) != IVAS_ERR_OK )
#endif
            {
                return error;
            }
@@ -355,11 +351,7 @@ ivas_error ivas_corecoder_dec_reconfig(
     * Set CNA/CNG flags
     *-----------------------------------------------------------------*/

#ifdef NONBE_FIX_ISM_XOVER_BR
    if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT )
#else
    if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT )
#endif
    {
        ivas_sba_set_cna_cng_flag( st_ivas );
    }
+0 −14
Original line number Diff line number Diff line
@@ -724,25 +724,15 @@ ivas_error ivas_dec_setup(

                /*correct number of CPEs for discrete ISM coding*/
                if ( st_ivas->ini_frame > 0 && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
#ifdef NONBE_FIX_ISM_XOVER_BR
                {
                    int16_t n;

                    n = st_ivas->nchan_transport + st_ivas->nchan_ism;
                    st_ivas->nCPE = ( n + 1 ) >> 1;
                }
#else
                {
                    st_ivas->nCPE += ( st_ivas->nchan_ism + 1 ) >> 1;
                }
#endif
            }

#ifdef NONBE_FIX_ISM_XOVER_BR
            if ( ivas_osba_ism_mode_select( ivas_total_brate, st_ivas->nchan_ism ) == ISM_SBA_MODE_DISC )
#else
            if ( ivas_total_brate >= IVAS_256k )
#endif
            {
                st_ivas->ism_mode = ISM_SBA_MODE_DISC;
            }
@@ -1856,16 +1846,12 @@ ivas_error ivas_init_decoder(

        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
#ifdef NONBE_FIX_ISM_XOVER_BR
            {
                int16_t n_all;

                n_all = st_ivas->nchan_transport + st_ivas->nchan_ism;
                st_ivas->nCPE = ( n_all + 1 ) >> 1;
            }
#else
            st_ivas->nCPE += ( st_ivas->nchan_ism + 1 ) >> 1;
#endif
            st_ivas->element_mode_init = IVAS_CPE_MDCT;
        }

+0 −2
Original line number Diff line number Diff line
@@ -153,9 +153,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm(
        return error;
    }

#ifdef NONBE_FIX_ISM_XOVER_BR
    ivas_combined_orientation_set_to_start_index( st_ivas->hCombinedOrientationData );
#endif


    if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
+0 −25
Original line number Diff line number Diff line
@@ -70,11 +70,7 @@ void ivas_sba_set_cna_cng_flag(
        st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 1;
        st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 1;
    }
#ifdef NONBE_FIX_ISM_XOVER_BR
    else if ( st_ivas->nchan_transport == 2 && st_ivas->ivas_format != SBA_ISM_FORMAT )
#else
    else if ( st_ivas->nchan_transport == 2 )
#endif
    {
        for ( n = 0; n < CPE_CHANNELS; n++ )
        {
@@ -124,9 +120,7 @@ ivas_error ivas_sba_dec_reconfigure(
    ivas_error error;
    ISM_MODE ism_mode_old;
    int16_t granularity_new;
#ifdef NONBE_FIX_ISM_XOVER_BR
    int16_t nchan_transport;
#endif

    ism_mode_old = st_ivas->ism_mode;
    hDecoderConfig = st_ivas->hDecoderConfig;
@@ -146,11 +140,7 @@ ivas_error ivas_sba_dec_reconfigure(

    if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
#ifdef NONBE_FIX_ISM_XOVER_BR
        if ( ivas_osba_ism_mode_select( ivas_total_brate, st_ivas->nchan_ism ) == ISM_SBA_MODE_DISC )
#else
        if ( ivas_total_brate >= IVAS_256k )
#endif
        {
            st_ivas->ism_mode = ISM_SBA_MODE_DISC;
        }
@@ -444,9 +434,7 @@ ivas_error ivas_sba_dec_reconfigure(
     * Allocate, initialize, and configure SCE/CPE/MCT handles
     *-----------------------------------------------------------------*/

#ifdef NONBE_FIX_ISM_XOVER_BR
    nchan_transport = st_ivas->nchan_transport;
#endif
    if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
        if ( ism_mode_old == ISM_MODE_NONE && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
@@ -515,12 +503,8 @@ ivas_error ivas_sba_dec_reconfigure(
                return error;
            }

#ifdef NONBE_FIX_ISM_XOVER_BR
            nchan_transport += st_ivas->nchan_ism;
            st_ivas->nCPE = ( nchan_transport + 1 ) >> 1;
#else
            st_ivas->nCPE += ( st_ivas->nchan_ism + 1 ) >> 1;
#endif
        }
        else if ( ism_mode_old == ISM_SBA_MODE_DISC && st_ivas->ism_mode == ISM_MODE_NONE )
        {
@@ -534,24 +518,15 @@ ivas_error ivas_sba_dec_reconfigure(
            {
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
            }
#ifdef NONBE_FIX_ISM_XOVER_BR
            nchan_transport = st_ivas->nchan_transport;
#endif
            nchan_transport_old += st_ivas->nchan_ism;
            st_ivas->ism_mode = ISM_MODE_NONE;
        }
        else if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
#ifdef NONBE_FIX_ISM_XOVER_BR
            nchan_transport = st_ivas->nchan_transport + st_ivas->nchan_ism;
            st_ivas->nCPE = ( nchan_transport + 1 ) >> 1;
            nchan_transport_old += st_ivas->nchan_ism;
#else
            st_ivas->nCPE += ( st_ivas->nchan_ism + 1 ) >> 1;
            nCPE_old = st_ivas->nCPE;
            nchan_transport_old = st_ivas->nchan_transport;
            nchan_transport_old += st_ivas->nchan_ism;
#endif
        }
    }

Loading