Commit 2c56ff01 authored by norvell's avatar norvell
Browse files

Merge branch...

Merge branch '1045-different-td-binaural-renderer-alloc-free-depending-if-using-rom-of-hrtf-files' into 'main'

[Non BE] Enable TD renderer reset in BR switching under FIX_1045_ISM_BITRATE_SWITCHING

See merge request !1510
parents d07a75b8 f2ebded5
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@
#define NON_BE_FIX_1048_THRESHOLD_COH_BASOP             /* Nokia: Fix 1048 replace comparison with 0 with comparison to threshold, to align with BASOP*/
#define NONBE_FIX_1054_NEGATIVE_LVQ_INDEX               /* Nokia: issue 1054: Input to decode_comb in deindex_lvq_SHB should be positive */
#define NONBE_FIX_1063_DIV_BY_ZERO_SUMNRG               /* VoiceAge: issue 1063: division by zero for angle_rot feature in the UNCLR classifier */
#define NONBE_FIX_1045_ISM_BITRATE_SWITCHING            /* Eri: Difference between ROM/File HRTF in ISM bitrate switching */

/* ##################### End NON-BE switches ########################### */

+9 −0
Original line number Diff line number Diff line
@@ -274,6 +274,14 @@ static ivas_error ivas_ism_bitrate_switching_dec(
            }

            /* Close the TD Binaural renderer */
#ifdef NONBE_FIX_1045_ISM_BITRATE_SWITCHING
            ivas_td_binaural_close( &st_ivas->hBinRendererTd );

            if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
            {
                ivas_reverb_close( &st_ivas->hReverb );
            }
#else
            if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
            {
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
@@ -284,6 +292,7 @@ static ivas_error ivas_ism_bitrate_switching_dec(
                    ivas_reverb_close( &st_ivas->hReverb );
                }
            }
#endif
        }
        else
        {
+4 −0
Original line number Diff line number Diff line
@@ -1210,11 +1210,15 @@ static ivas_error ivas_mc_dec_reconfig(

            if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) )
            {
#ifdef NONBE_FIX_1045_ISM_BITRATE_SWITCHING
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
#else
                if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                    st_ivas->hHrtfTD = NULL;
                }
#endif
            }

#ifdef SPLIT_REND_WITH_HEAD_ROT
+8 −0
Original line number Diff line number Diff line
@@ -402,12 +402,20 @@ ivas_error ivas_omasa_dec_config(
            }
            else
            {
#ifdef NONBE_FIX_1045_ISM_BITRATE_SWITCHING
                if ( st_ivas->hBinRendererTd != NULL )
                {
                    /* TD renderer handle */
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                }
#else
                if ( st_ivas->hBinRendererTd != NULL && st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
                    /* TD renderer handle */
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                    st_ivas->hHrtfTD = NULL;
                }
#endif
                /* ISM renderer handle + ISM data handle */
                ivas_omasa_separate_object_renderer_close( st_ivas );
            }
+4 −0
Original line number Diff line number Diff line
@@ -532,11 +532,15 @@ ivas_error ivas_sba_dec_reconfigure(
            /* Time Domain binaural renderer handle */
            if ( st_ivas->hBinRendererTd != NULL )
            {
#ifdef NONBE_FIX_1045_ISM_BITRATE_SWITCHING
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
#else
                if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                    st_ivas->hHrtfTD = NULL;
                }
#endif
            }
            nchan_transport_old += st_ivas->nchan_ism;
            st_ivas->ism_mode = ISM_MODE_NONE;