Commit 501fbba3 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_ISM_XOVER_BR

parent 2ba8bab2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -179,7 +179,6 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_ISM_XOVER_BR                          /* FhG: issue 1072: select OSBA coding method depending on number of object and bitrate */
#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ 
#define NONBE_FIX_MC_LFE_LPF                            /* Dlb: Adding the LFE LPF filter back for MC content. */
#define NONBE_FIX_1052_SBA_EXT                          /* Dlb: SBA external output support */
+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 −12
Original line number Diff line number Diff line
@@ -346,23 +346,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;
            }
@@ -1445,16 +1437,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
@@ -155,9 +155,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

#ifdef SPLIT_REND_WITH_HEAD_ROT
    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++ )
        {
@@ -128,9 +124,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;
@@ -150,11 +144,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;
        }
@@ -461,9 +451,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 )
@@ -533,12 +521,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 )
        {
@@ -553,25 +537,16 @@ 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