Commit a04a8650 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_752_OSBA_MISCONFIG_MCT

parent 3c15fe28
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2738,11 +2738,7 @@ ivas_error preview_indices(
            /* Read SBA planar flag and SBA order */
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS] == 1 );

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
            if ( total_brate >= IVAS_256k )
#else
            if ( total_brate > IVAS_256k )
#endif
            {
                st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS + 2] == 1 );
                st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS + 1] == 1 );
+0 −1
Original line number Diff line number Diff line
@@ -175,7 +175,6 @@
/* all switches in this category should start with "NONBE_" */


#define NONBE_FIX_752_OSBA_MISCONFIG_MCT                      /* FhG: issue 752: misconfiguration of MCT causes crashes for coding with sampling rate under 48kHz at 256kbps*/
#define NONBE_FIX_787_PARAM_UPMIX_LEVEL                       /* Dlb: issue 787: fix level of Mono/Stereo for ParamUpmix mode */
#define NONBE_FIX_727_MC_PARAMUPMIX_HEADROTATION              /* Dlb : issue 727 : headrotation in MC paramupmix mode*/
#define NONBE_FIX_779_ISM_FREE_REVERB_HANDLE                  /* VA: issue 779: fix Crash in ISM rate switching with BINAURAL_ROOM_REVERB */
+0 −8
Original line number Diff line number Diff line
@@ -60,9 +60,7 @@ ivas_error ivas_corecoder_dec_reconfig(
    int16_t n, sce_id, cpe_id, output_frame;
    int16_t nSCE_existing, nCPE_existing;
    int32_t ivas_total_brate;
#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
    int16_t nchan_transport_real;
#endif
    MC_MODE last_mc_mode;
    DECODER_CONFIG_HANDLE hDecoderConfig;
    ivas_error error;
@@ -85,14 +83,12 @@ ivas_error ivas_corecoder_dec_reconfig(
        last_mc_mode = MC_MODE_NONE;
    }

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
    nchan_transport_real = st_ivas->nchan_transport;

    if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
    {
        nchan_transport_real += st_ivas->nchan_ism;
    }
#endif
    /*-----------------------------------------------------------------*
     * Allocate, initialize, and configure SCE/CPE/MCT handles
     *-----------------------------------------------------------------*/
@@ -116,11 +112,7 @@ ivas_error ivas_corecoder_dec_reconfig(
        }
    }

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
    if ( nchan_transport_real == nchan_transport_old && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old )
#else
    if ( st_ivas->nchan_transport == nchan_transport_old && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old )
#endif
    {
        for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ )
        {
+0 −12
Original line number Diff line number Diff line
@@ -1593,12 +1593,6 @@ ivas_error ivas_init_decoder(
            st_ivas->hCPE[0]->hCoreCoder[0] = st_ivas->hSCE[0]->hCoreCoder[0]; /* don't allocate unnecessary core coder, simply point to core coder of SCE element */
            st_ivas->hCPE[0]->hCoreCoder[1] = NULL;
        }
#ifndef NONBE_FIX_752_OSBA_MISCONFIG_MCT
        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            st_ivas->nchan_transport += st_ivas->nchan_ism;
        }
#endif

        if ( st_ivas->nCPE > 1 )
        {
@@ -1607,12 +1601,6 @@ ivas_error ivas_init_decoder(
                return error;
            }
        }
#ifndef NONBE_FIX_752_OSBA_MISCONFIG_MCT
        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            st_ivas->nchan_transport -= st_ivas->nchan_ism;
        }
#endif

        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
+0 −8
Original line number Diff line number Diff line
@@ -348,12 +348,10 @@ ivas_error create_mct_dec(
    if ( ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMMC ) || st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT )
    {
        hMCT->nchan_out_woLFE = st_ivas->nchan_transport;
#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            hMCT->nchan_out_woLFE += st_ivas->nchan_ism;
        }
#endif
    }
    else if ( st_ivas->mc_mode == MC_MODE_MCT )
    {
@@ -370,12 +368,10 @@ ivas_error create_mct_dec(

    cp_bitrate = st_ivas->hDecoderConfig->ivas_total_brate / hMCT->nchan_out_woLFE * CPE_CHANNELS;

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
    if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
    {
        cp_bitrate = st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport * CPE_CHANNELS;
    }
#endif

    /* indicate LFE for appropriate core-coder channel */
    for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
@@ -475,12 +471,10 @@ ivas_error mct_dec_reconfigure(
        if ( ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMMC ) || st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT )
        {
            hMCT->nchan_out_woLFE = st_ivas->nchan_transport;
#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
            if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
            {
                hMCT->nchan_out_woLFE += st_ivas->nchan_ism;
            }
#endif
        }
        else if ( st_ivas->mc_mode == MC_MODE_MCT )
        {
@@ -512,12 +506,10 @@ ivas_error mct_dec_reconfigure(
    }

    cp_bitrate = st_ivas->hDecoderConfig->ivas_total_brate / hMCT->nchan_out_woLFE * CPE_CHANNELS;
#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
    if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
    {
        cp_bitrate = st_ivas->hDecoderConfig->ivas_total_brate / st_ivas->nchan_transport * CPE_CHANNELS;
    }
#endif

    /* set correct nominal bitrates and igf config already here, otherwise we
     * run into a number of problems */
Loading