Commit 9a37f583 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'float-pc' of ssh://forge.3gpp.org:29419/sa4/audio/ivas-basop...

Merge branch 'float-pc' of ssh://forge.3gpp.org:29419/sa4/audio/ivas-basop into 1605_ref_port_fl1389
parents 5b0d08ed 30f20459
Loading
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -200,7 +200,14 @@
#define BE_FIX_567_DOUBLE_STEREO_DMX                          /* NTT: Fix formal issues */   
#define NONBE_FIX_567_DOUBLE_STEREO_DMX                       /* Orange: Double-precision replaced by single-precision */  
#define NONBE_FIX_947_STEREO_DMX_EVS_POC                      /* Orange: Fix clicks on POC */
#ifdef NONBE_FIX_947_STEREO_DMX_EVS_POC
#define NONBE_FIX_947_STEREO_DMX_ROMOPT                       /* Orange: ROM optimisation for POC*/  
#endif
#define NONBE_FIX_947_STEREO_DMX_EVS_PHA                      /* Orange: Fix issues on PHA */
#ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA
#define NONBE_FIX_947_STEREO_DMX_FADOPT                       /* Orange: Fading optimisation */  
#endif 

#define NONBE_FIX_951_MCMASA_5MS_RENDERING                    /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2kbps to BINAURAL */

#define NONBE_FIX_979_OSBA_STEREO_5MS                   /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */
@@ -211,6 +218,9 @@
#define NONBE_FIX_975_JBM_USAN                          /* FhG: Fix issue #975, USAN in JBM decoding ad 13.2kbps */
#define FIX_944_REMOVE_LS_RENDERER_CALL_IN_STEREO       /* VA: issue 994: remove an obsolete call of function ivas_ls_setup_conversion() in stereo */

#define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING   /* FhG: fix usan error in MCT with bw swicthing */
#define NONBE_FIX_986_MC_BW_SWITCHING                   /* FhG: fix crash in bw and br switching with MC */

/* #################### End BASOP porting switches ############################ */

/* clang-format on */
+0 −10
Original line number Diff line number Diff line
@@ -245,16 +245,6 @@ void ivas_renderer_select(
                            *renderer_type = RENDERER_BINAURAL_FASTCONV;
                        }

#if 0 // def DEBUGGING  /*temp disabling this as paramMC crashes with CREND*/
                        if ( st_ivas->hRenderConfig->renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_CREND )
                        {
                            *renderer_type = RENDERER_BINAURAL_MIXER_CONV;
                        }
                        else if ( st_ivas->hRenderConfig->renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_FASTCONV )
                        {
                            *renderer_type = RENDERER_BINAURAL_FASTCONV;
                        }
#endif
                        if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation )
                        {
                            /* force HOA3 domain for rotation*/
+21 −0
Original line number Diff line number Diff line
@@ -713,6 +713,26 @@ int16_t set_bw_mct(
    }

    bw_changed = 0;
#ifdef NONBE_FIX_986_MC_BW_SWITCHING
    if ( mct_bwidth != last_mct_bwidth )
    {
        bw_changed = 1;
    }

    /*
     * always set bw for all CPEs even if it is the same value as before,
     * in case of bw + br switching when changing to MCT, this overwrites
     * potentially incorrect initial values
     */
    for ( cpe_id = 0; cpe_id < nCPE; cpe_id++ )
    {
        for ( ch = 0; ch < CPE_CHANNELS; ch++ )
        {
            st = hCPE[cpe_id]->hCoreCoder[ch];
            st->bwidth = mct_bwidth;
        }
    }
#else
    if ( mct_bwidth != last_mct_bwidth )
    {
        bw_changed = 1;
@@ -726,6 +746,7 @@ int16_t set_bw_mct(
            }
        }
    }
#endif

    return bw_changed;
}
+8 −0
Original line number Diff line number Diff line
@@ -578,7 +578,15 @@ ivas_error ivas_cpe_enc(
        if ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->element_mode != hCPE->last_element_mode || ( hCPE->element_mode == IVAS_CPE_TD && sts[0]->bits_frame_nominal != last_bits_frame_nominal ) || sts[n]->last_bwidth != sts[n]->bwidth ) && ( n == 0 || hCPE->element_mode == IVAS_CPE_MDCT ) )
        {
            int16_t igf;

#ifdef NONBE_FIX_986_MC_BW_SWITCHING
            int16_t bw;

            bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : sts[n]->max_bwidth;
            igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, bw, sts[n]->rf_mode );
#else
            igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->rf_mode );
#endif
            if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK )
            {
                return error;
+8 −2
Original line number Diff line number Diff line
@@ -279,8 +279,14 @@ void ivas_mct_core_enc(

        if ( switch_bw )
        {
            initMdctStereoEncData( hMCT->hBlockData[ch]->hStereoMdct, ivas_format, sts[ch_core]->element_mode, sts[ch_core]->element_brate, sts[ch_core]->bwidth,
                                   sts[ch_core]->igf, sts[ch_core]->hIGFEnc->igfData.igfInfo.grid, 0 );
#ifdef FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING
            H_IGF_GRID igf_grid;

            igf_grid = sts[ch_core]->igf ? sts[ch_core]->hIGFEnc->igfData.igfInfo.grid : NULL;
            initMdctStereoEncData( hMCT->hBlockData[ch]->hStereoMdct, ivas_format, sts[ch_core]->element_mode, sts[ch_core]->element_brate, sts[ch_core]->bwidth, sts[ch_core]->igf, igf_grid, 0 );
#else
            initMdctStereoEncData( hMCT->hBlockData[ch]->hStereoMdct, ivas_format, sts[ch_core]->element_mode, sts[ch_core]->element_brate, sts[ch_core]->bwidth, sts[ch_core]->igf, sts[ch_core]->hIGFEnc->igfData.igfInfo.grid, 0 );
#endif
        }

        if ( sts[ch_core]->igf )
Loading