Commit fde8382b authored by vaclav's avatar vaclav
Browse files

accept FIX_I59_LFE_TD_DELAY and FIX_I59_LFE_CLDFB

parent 50db9351
Loading
Loading
Loading
Loading
+5 −19
Original line number Diff line number Diff line
@@ -55,12 +55,7 @@ int32_t 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_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
    const int32_t binaural_latency_ns /* i  : binauralization delay in ns         */
#endif
)
{
    int32_t delay = 0;
@@ -99,7 +94,6 @@ int32_t get_delay(
        {
            delay = IVAS_DEC_DELAY_NS;

#ifdef FIX_I59_LFE_TD_DELAY
            if ( hCldfb != NULL )
            {
                /* compensate for filterbank delay */
@@ -108,16 +102,8 @@ int32_t get_delay(

            /* compensate for binauralization delay */
            delay += binaural_latency_ns;
#else
            if ( hCldfb != NULL || renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
            {
                delay += IVAS_FB_DEC_DELAY_NS;
            }

            /* compensate for Binaural renderer HRTF delay */
            delay += binaural_latency_ns;
#endif
        }
    }

    return delay;
}
+0 −4
Original line number Diff line number Diff line
@@ -5029,11 +5029,7 @@ 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_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
);

void ivas_lfe_dec_close( 
+0 −2
Original line number Diff line number Diff line
@@ -144,8 +144,6 @@
#define SBA_BR_SWITCHING_2                              /* Issue 114: Changes for sba bit rate switching with reconfigurations*/
#define SBA_BR_SWITCHING                                /* Issue 114: Changes for sba bit rate switching*/
#define BRATE_SWITCHING_RENDERING                       /* Bitrate switching changes related to the renderers */
#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() */
#define FIX_FIX_I59                                     /* Issue 59:  small fix concerning LFE delay rounding */
#define FIX_I59_CREND                                   /* Issue 59: Fixes for gcc compiler warnings in ivas_crend_utest_utils.c */
+5 −10
Original line number Diff line number Diff line
@@ -696,12 +696,7 @@ int32_t 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_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
    const int32_t binaural_latency_ns /* i  : binauralization delay in ns           */
#endif
);

void decision_matrix_enc(
+1 −6
Original line number Diff line number Diff line
@@ -394,15 +394,10 @@ ivas_error ivas_dec(
                ivas_crend_process( st_ivas, output );
                ivas_binaural_add_LFE( st_ivas, output_frame, output );
            }
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
            else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
            {
#ifdef FIX_I59_LFE_CLDFB
                ivas_binaural_cldfb( st_ivas, output );
                ivas_binaural_add_LFE( st_ivas, output_frame, output );
#else
                ivas_binaural_add_LFE( st_ivas, output_frame, output );
                ivas_binaural_cldfb( st_ivas, output );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_MC )
            {
Loading