Commit e1167220 authored by janssontoftg's avatar janssontoftg
Browse files

- Dividing into separate defines for the three components of the fix.

- Correcting delay compensation for case when render_lfe is 0.
parent 6f1554c5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ float get_delay(
    const int32_t io_fs,              /* i  : input/output sampling frequency     */
    const IVAS_FORMAT ivas_format,    /* i  : IVAS format                         */
    HANDLE_CLDFB_FILTER_BANK hCldfb,  /* i  : Handle of Cldfb analysis            */
#ifndef FIX_I59
#ifndef FIX_I59_LFE_TD_DELAY
    RENDERER_TYPE renderer_type,      /* i  : IVAS rendering type                 */
    const int32_t binaural_latency_ns /* i  : binaural renderer HRTF delay in ns  */
#else
@@ -98,7 +98,7 @@ float get_delay(
        else /* IVAS */
        {
            delay = IVAS_DEC_DELAY_NS;
#ifdef FIX_I59
#ifdef FIX_I59_LFE_TD_DELAY
            if ( hCldfb != NULL )
            {
                /* compensate for filterbank delay */
+2 −2
Original line number Diff line number Diff line
@@ -4841,8 +4841,8 @@ void ivas_lfe_enc(
ivas_error ivas_create_lfe_dec( 
    LFE_DEC_HANDLE *hLFE_out,                                   /* o  : IVAS LFE decoder structure              */
    const int32_t output_Fs,                                    /* i  : output sampling rate                    */
#ifdef FIX_I59
    const int32_t binaural_latency_ns                           /* i  : additional LFE delay to sync with binaural renderer */
#ifdef FIX_I59_LFE_TD_DELAY
    const int32_t binauralization_delay_ns                      /* i  : additional LFE delay to sync with binaural renderer */
#else
    const float add_delay_s                                     /* i  : additional LFE delay to sync with binaural filter */
#endif
+3 −1
Original line number Diff line number Diff line
@@ -155,7 +155,9 @@
#define SRAM_REDUCTION_BINRENDERER                      /* Issue 145: reduction of static RAM usage in fastconv binaural renderer */
#define SRAM_REDUCTION_BINRENDERER_ROOM                 /* Issue 145: reduction of static RAM usage in fastconv binaural room renderer */
#define FIX_I120_INV_SQRT                               /* Issue 120: inv_sqrt() shall be used instead of 1 / sqrt() to measure the correct complexity */
#define FIX_I59                                         /* fix for issue 59: correcting delay of LFE and delay compensation */
#define FIX_I59_LFE_TD_DELAY                            /* Issue 59: correcting delay of LFE for TD renderer */
#define FIX_I59_LFE_CLDFB                               /* Issue 59: correcting LFE handling for fastconv binaural rendering */
#define FIX_I59_DELAY_ROUNDING                          /* Issue 59: rounding in sample domain instead of nanosec for IVAS_ENC_GetDelay() and IVAS_DEC_GetDelay() */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+1 −1
Original line number Diff line number Diff line
@@ -717,7 +717,7 @@ float get_delay(
    const int32_t io_fs,              /* i  : input/output sampling frequency */
    const IVAS_FORMAT ivas_format,    /* i  : IVAS format                     */
    HANDLE_CLDFB_FILTER_BANK hCldfb,  /* i  : Handle of Cldfb analysis        */
#ifndef FIX_I59
#ifndef FIX_I59_LFE_TD_DELAY
    RENDERER_TYPE renderer_type,      /* i  : IVAS rendering type                 */
    const int32_t binaural_latency_ns /* i  : binaural renderer HRTF delay in ns  */
#else
+1 −1
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ ivas_error ivas_dec(
            }
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
            {
#ifdef FIX_I59
#ifdef FIX_I59_LFE_CLDFB
                ivas_binaural_cldfb( st_ivas, output );
                ivas_binaural_add_LFE( st_ivas, output_frame, output );
#else
Loading