Commit a90fd817 authored by norvell's avatar norvell
Browse files

Merge branch 'fix-directivity-precision' into 'main'

[Non BE][Rend non BE][Split non BE][allow regression] Fix directivity precision

See merge request !2979
parents c3c5aa50 5976d220
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1650,7 +1650,7 @@ static void resetHeadRotation(
        pPos[i].y_fx = 0;
        pPos[i].z_fx = 0;
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
        pPos[i].q_fact = 22;
        pPos[i].q_fact = 31;
#else
        pPos[i].q_fact = 25;
#endif
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ typedef struct
{
    float x, y, z;
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
    Word32 x_fx, y_fx, z_fx; /* Q22, Q22, Q22 */
    Word32 x_fx, y_fx, z_fx; /* qfact, qfact, qfact */
#else
    Word32 x_fx, y_fx, z_fx;
#endif
+5 −0
Original line number Diff line number Diff line
@@ -1937,7 +1937,12 @@ ivas_error TDREND_MIX_LIST_SetOrient_fx(

void TDREND_MIX_LIST_SetPos_fx(
    BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd,          /* i/o: TD renderer handle                          */
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
    const Word32 *Pos_p,                                        /* i  : Listener's position                         */
    const Word16 Pos_q                                          /* i  : Listener's position Q value                 */
#else
    const Word32 *Pos_p                                         /* i  : Listener's position                         */
#endif
);

ivas_error TDREND_Update_listener_orientation_fx(
+2 −4
Original line number Diff line number Diff line
@@ -264,11 +264,8 @@ ivas_error ivas_td_binaural_renderer_sf_fx(
            enableCombinedOrientation = st_ivas->hCombinedOrientationData->enableCombinedOrientation[st_ivas->hCombinedOrientationData->subframe_idx];
            move16();

#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
            /* Shifting x_fx, y_fx, z_fx to the same Q-factor as Listener_p->Pos_q (usually Q22) */
#else
#ifndef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
            /* Shifting x_fx, y_fx, z_fx to the same Q-factor as Listener_p->Pos_q (usually Q25) */
#endif
            Word16 pos_q = st_ivas->hBinRendererTd->Listener_p->Pos_q;
            move16();
            tmp_vector_fx->x_fx = L_shr( tmp_vector_fx->x_fx, sub( tmp_vector_fx->q_fact, pos_q ) );
@@ -276,6 +273,7 @@ ivas_error ivas_td_binaural_renderer_sf_fx(
            tmp_vector_fx->z_fx = L_shr( tmp_vector_fx->z_fx, sub( tmp_vector_fx->q_fact, pos_q ) );
            tmp_vector_fx->q_fact = pos_q;
            move16();
#endif
        }
        ELSE
        {
+0 −6
Original line number Diff line number Diff line
@@ -2109,15 +2109,9 @@ ivas_error IVAS_DEC_FeedHeadTrackData(
        return error;
    }

#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
    hHeadTrackData->Pos[subframe_idx].x_fx = max( min( IVAS_LISTENER_POSITION_MAX_Q22, Pos.x_fx ), -IVAS_LISTENER_POSITION_MAX_Q22 );
    hHeadTrackData->Pos[subframe_idx].y_fx = max( min( IVAS_LISTENER_POSITION_MAX_Q22, Pos.y_fx ), -IVAS_LISTENER_POSITION_MAX_Q22 );
    hHeadTrackData->Pos[subframe_idx].z_fx = max( min( IVAS_LISTENER_POSITION_MAX_Q22, Pos.z_fx ), -IVAS_LISTENER_POSITION_MAX_Q22 );
#else
    hHeadTrackData->Pos[subframe_idx].x_fx = Pos.x_fx;
    hHeadTrackData->Pos[subframe_idx].y_fx = Pos.y_fx;
    hHeadTrackData->Pos[subframe_idx].z_fx = Pos.z_fx;
#endif
    hHeadTrackData->Pos[subframe_idx].q_fact = Pos.q_fact;
    move32();
    move32();
Loading