Commit 46134dbf authored by Jouni Paulus's avatar Jouni Paulus
Browse files

Merge remote-tracking branch 'origin/main' into...

Merge remote-tracking branch 'origin/main' into 539-chirp-artifacts-in-MASA-at-384-kbps-for-a-specific-sample
parents fb8c7c0c 5fd23c7d
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@
#define FIX_UNCLR_ISSUE                                 /* VoiceAge: issue 574: Fix UNCLR mis-classifications in noisy speech stereo */
#define FIX_TCX_LOWRATE_LIMITATION                      /* VA: issue 577: TCX bitrate limitation only when DEBUGGING is active */
#define FIX_575_LOW_OVERLAP_PLC_RECOVERY                /* FhG: Issue 575 fix for PLC and transistion to TCX5*/
#define FIX_569_TD_FILTER_LENGTH                        /* Eri: Issue 569: If an HRTF binary file exceeds the SFX_SPAT_BIN_MAX_FILTER_LENGTH the decoder crashes. This truncates the filter when generated from the model.  */
#define ISM_FB_16k4                                     /* VA: Issue: 579: change BW from SWB to FB in NxISM conditions to match the EVS codec */
#define FIX_580_PARAMMC_ENER_BURSTS                     /* FhG: issue 580: energy bursts due to ILD holding when energy relations change too much */
#define UPDATE_FASTCONV_SBA_FILTER                      /* Dlb: Issue 584: Update SBA CLDFB-Domain HRTFs */
+11 −3
Original line number Diff line number Diff line
@@ -97,6 +97,9 @@ void GetFilterFromAngle(
    TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR filter set structure  */
    const float Elev,                     /* i  : Elevation, degrees       */
    float Azim,                           /* i  : Azimuth, degrees         */
#ifdef FIX_569_TD_FILTER_LENGTH
    const int16_t filterlength, /* i  : Filter length            */
#endif
    float *hrf_left,  /* o  : Left HR filter           */
    float *hrf_right, /* o  : Right HR filter          */
    int16_t *itd      /* o  : ITD value                */
@@ -105,8 +108,13 @@ void GetFilterFromAngle(

    GenerateFilter( Elev, Azim, &HrFiltSet_p->ModelParams, &HrFiltSet_p->ModelEval );

#ifdef FIX_569_TD_FILTER_LENGTH
    mvr2r( HrFiltSet_p->ModelEval.hrfModL, hrf_left, filterlength );
    mvr2r( HrFiltSet_p->ModelEval.hrfModR, hrf_right, filterlength );
#else
    mvr2r( HrFiltSet_p->ModelEval.hrfModL, hrf_left, HrFiltSet_p->ModelParams.K );
    mvr2r( HrFiltSet_p->ModelEval.hrfModR, hrf_right, HrFiltSet_p->ModelParams.K );
#endif
    /* 4. Evaluate the ITD */
    if ( HrFiltSet_p->ModelParams.UseItdModel )
    {
+8 −0
Original line number Diff line number Diff line
@@ -275,7 +275,11 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams(
    Listener_p = hBinRendererTd->Listener_p;
    HrFiltSet_p = hBinRendererTd->HrFiltSet_p;

#ifdef FIX_569_TD_FILTER_LENGTH
    *filterlength = min( HrFiltSet_p->FiltLength, SFX_SPAT_BIN_MAX_FILTER_LENGTH );
#else
    *filterlength = HrFiltSet_p->FiltLength;
#endif

    /* 1. Map source pos to the coordinate system of the listener */
    switch ( SrcSpatial_p->PosType )
@@ -312,7 +316,11 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams(
        Azim = -1.0f * _180_OVER_PI * (float) atan2f( ListRelPos[1], ListRelPos[0] );
    }

#ifdef FIX_569_TD_FILTER_LENGTH
    GetFilterFromAngle( HrFiltSet_p, Elev, Azim, *filterlength, hrf_left, hrf_right, itd );
#else
    GetFilterFromAngle( HrFiltSet_p, Elev, Azim, hrf_left, hrf_right, itd );
#endif

    /* 6. Evaluate the directional and distance gains */
    /* Directional gain */
+3 −0
Original line number Diff line number Diff line
@@ -314,6 +314,9 @@ void GetFilterFromAngle(
    TDREND_HRFILT_FiltSet_t *HrFiltSet_p,                       /* i/o: HR filter set structure                 */
    const float Elev,                                           /* i  : Elevation, degrees                      */
    float Azim,                                                 /* i  : Azimuth, degrees                        */
#ifdef FIX_569_TD_FILTER_LENGTH
    const int16_t filterlength,                                 /* i  : Filter length                           */
#endif
    float *LeftFilter,                                          /* o  : Left HR filter                          */
    float *RightFilter,                                         /* o  : Right HR filter                         */
    int16_t *itd                                                /* o  : ITD value                               */