Commit debf58bb authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION

parent 42035e0c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -158,7 +158,6 @@

#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */
#define NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION    /* Ericsson: Issue 1196, Always apply filter interpolation for each subframe */
#define FIX_1113_CLDFB_REND_IN_ISAR                     /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */
#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING       /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */
#define FIX_1099_JBM_MD_HANDLE_ALLOC                    /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */
+0 −4
Original line number Diff line number Diff line
@@ -204,11 +204,7 @@ ivas_error ivas_td_binaural_renderer_sf(
        /* ism_md_subframe_update_jbm != subframe_idx: trigger update only for ism_md_subframe_update_jbm == subframe_idx,
           where then the two TDREND_GetMix()-arguments subframe_idx and ism_md_subframe_update are equal, and we want to enforce the update inside TDREND_GetMix to use subframe_idx == 0 */

#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
        if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0 ) ) != IVAS_ERR_OK )
#else
        if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm != subframe_idx ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
+0 −19
Original line number Diff line number Diff line
@@ -384,11 +384,7 @@ ivas_error ivas_td_binaural_renderer_unwrap(
        }

        /* Render subframe */
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
        if ( ( error = TDREND_GetMix( hBinRendererTd, output, subframe_length, subframe_idx ) ) != IVAS_ERR_OK )
#else
        if ( ( error = TDREND_GetMix( hBinRendererTd, output, subframe_length, subframe_idx, ism_md_subframe_update ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
@@ -429,12 +425,7 @@ ivas_error TDREND_GetMix(
    BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle                        */
    float *output[],                                   /* i/o: ISM object synth / rendered output in 0,1 */
    const int16_t subframe_length,                     /* i/o: subframe length                           */
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    const int16_t subframe_idx /* i  : Subframe index to 5 ms subframe           */
#else
    const int16_t subframe_idx,          /* i  : Subframe index to 5 ms subframe           */
    const int16_t ism_md_subframe_update /* i  : Number of subframes to delay ism metadata to sync with audio */
#endif
)
{
    int16_t i;
@@ -447,11 +438,6 @@ ivas_error TDREND_GetMix(
    float hrf_right_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH];
    int16_t intp_count;

#ifndef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    int16_t subframe_update_flag;

    subframe_update_flag = subframe_idx == ism_md_subframe_update;
#endif
    error = IVAS_ERR_OK;

    /* Clear the output buffer to accumulate rendered sources */
@@ -474,13 +460,8 @@ ivas_error TDREND_GetMix(
        /* Update rendering params if needed */
        if ( ( SrcRend_p->PlayStatus == TDREND_PLAYSTATUS_PLAYING ) && ( hBinRendererTd->Listener_p->PoseUpdated || SrcSpatial_p->Updated ) )
        {
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
            TDREND_SRC_REND_UpdateFiltersFromSpatialParams( hBinRendererTd, SrcRend_p, SrcSpatial_p, Src_p->hrf_left_prev,
                                                            Src_p->hrf_right_prev, hrf_left_delta, hrf_right_delta, &intp_count, &Src_p->filterlength, &Src_p->itd, &Src_p->Gain, Src_p );
#else
            TDREND_SRC_REND_UpdateFiltersFromSpatialParams( hBinRendererTd, SrcRend_p, SrcSpatial_p, Src_p->hrf_left_prev,
                                                            Src_p->hrf_right_prev, hrf_left_delta, hrf_right_delta, &intp_count, &Src_p->filterlength, &Src_p->itd, &Src_p->Gain, Src_p, subframe_update_flag );
#endif
        }

        /* Render source if needed */
+0 −9
Original line number Diff line number Diff line
@@ -285,13 +285,8 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams(
    int16_t *filterlength,                             /* o  : Length of filters                */
    int16_t *itd,                                      /* o  : ITD value                        */
    float *Gain,                                       /* o  : Gain value                       */
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    TDREND_SRC_t *Src_p /* i/o: Source pointer                   */
)
#else
    TDREND_SRC_t *Src_p, /* i/o: Source pointer                   */
    const int16_t subframe_update_flag )
#endif
{
    TDREND_MIX_Listener_t *Listener_p;
    TDREND_HRFILT_FiltSet_t *HrFiltSet_p;
@@ -382,11 +377,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams(
        Src_p->azim_prev = 360.0f; /* Dummy angle -- sets max interpolation if switching to TDREND_POSTYPE_ABSOLUTE */
    }

#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    if ( ( *intp_count > 0 ) )
#else
    if ( ( *intp_count > 0 ) && subframe_update_flag )
#endif
    {
        /* Set deltas for interpolation */
        v_sub( hrf_left, hrf_left_prev, hrf_left_delta, *filterlength );
+0 −10
Original line number Diff line number Diff line
@@ -652,12 +652,7 @@ ivas_error TDREND_GetMix(
    BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd,          /* i/o: TD renderer handle                        */
    float *output[],                                            /* i/o: ISM object synth/rendered output in 0,1 */
    const int16_t subframe_length,                              /* i/o: subframe length                           */
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    const int16_t subframe_idx                                  /* i  : Subframe index to 5 ms subframe           */
#else
    const int16_t subframe_idx,                                 /* i  : Subframe index to 5 ms subframe           */
    const int16_t ism_md_subframe_update                        /* i  : Number of subframes to delay metadata to sync with audio */
#endif
);

ivas_error TDREND_Update_listener_orientation(
@@ -746,12 +741,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams(
    int16_t *filterlength,                                      /* o  : Length of filters                       */
    int16_t *itd,                                               /* o  : ITD value                               */
    float *Gain,                                                /* o  : Gain value                              */
#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
    TDREND_SRC_t *Src_p                                         /* i/o: Source pointer                          */
#else
    TDREND_SRC_t *Src_p,
    const int16_t subframe_update_flag                          /* i  : Flag to determine update subframe idx   */
#endif
);

ivas_error TDREND_SRC_Alloc(