From 28dc2fc0196297a0c0976e075cea72023ea2189f Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Wed, 22 Apr 2026 14:41:02 +0200 Subject: [PATCH 01/12] Fix for non-diegetic panning with FIX_BASOP_2023_TDREND_DISTATT_PRECISION --- lib_rend/ivas_objectRenderer_sources_fx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib_rend/ivas_objectRenderer_sources_fx.c b/lib_rend/ivas_objectRenderer_sources_fx.c index 4f0ccb8cf..8c7ac49c9 100644 --- a/lib_rend/ivas_objectRenderer_sources_fx.c +++ b/lib_rend/ivas_objectRenderer_sources_fx.c @@ -493,22 +493,16 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( set32_fx( hrf_left, 0, *filterlength ); set32_fx( hrf_right, 0, *filterlength ); #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - hrf_left[0] = L_shr( L_add( SrcSpatial_p->Pos_p_fx[1], ONE_IN_Q22 ), 1 ); // Q22 - move32(); - hrf_right[0] = L_sub( ONE_IN_Q22, hrf_left[0] ); // Q22 - move32(); - hrf_left_e = 9; - move16(); - hrf_right_e = 9; + hrf_left[0] = L_shr( L_add( L_shl( SrcSpatial_p->Pos_p_fx[1], 3 ), ONE_IN_Q25 ), 1 ); // Q25 #else hrf_left[0] = L_shr( L_add( SrcSpatial_p->Pos_p_fx[1], ONE_IN_Q25 ), 1 ); // Q25 +#endif move32(); hrf_right[0] = L_sub( ONE_IN_Q25, hrf_left[0] ); // Q25 move32(); hrf_left_e = 6; move16(); hrf_right_e = 6; -#endif move16(); *intp_count = MAX_INTERPOLATION_STEPS; // Q22 move16(); -- GitLab From 039552f6072d75ee27142b2411812a2309984fcb Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 10:50:35 +0200 Subject: [PATCH 02/12] Change to adaptive precision for listener position --- lib_com/options.h | 4 +-- lib_dec/ivas_objectRenderer_internal_fx.c | 6 ++-- lib_dec/lib_dec_fx.c | 6 ---- lib_rend/ivas_objectRenderer_fx.c | 27 ++++-------------- lib_rend/ivas_objectRenderer_hrFilt_fx.c | 2 ++ lib_rend/ivas_objectRenderer_mix_fx.c | 2 +- lib_rend/ivas_objectRenderer_sources_fx.c | 34 ++++++----------------- lib_rend/ivas_stat_rend.h | 2 +- lib_util/float_to_fix_ops.c | 19 +++++++++++++ lib_util/float_to_fix_ops.h | 2 ++ lib_util/rotation_file_reader.c | 15 +++++++--- 11 files changed, 55 insertions(+), 64 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 33519e38f..4dea767da 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -48,7 +48,7 @@ /* ################### Start DEBUGGING switches ######################## */ #ifndef RELEASE -/*#define DEBUGGING*/ /* Activate debugging part of the code */ +#define DEBUGGING /* Activate debugging part of the code */ #endif /*#define WMOPS*/ /* Activate complexity and memory counters */ /*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ @@ -58,7 +58,7 @@ #ifdef DEBUGGING /*#define DBG_BITSTREAM_ANALYSIS*/ /* Write bitstream with annotations to a text file */ -#define DEBUG_MODE_INFO /* Define to output most important parameters to the subdirectory "res/" */ +/*#define DEBUG_MODE_INFO*/ /* Define to output most important parameters to the subdirectory "res/" */ #define DEBUG_MODE_INFO_TWEAK /* Enable command line switch to specify subdirectory for debug info output inside "./res/" */ #define DEBUG_FORCE_MDCT_STEREO_MODE /* Force stereo mode decision for MDCT stereo: -stereo 3 1 forces L/R coding and -stereo 3 2 forces full M/S coding */ /*#define DEBUG_FORCE_DIR*/ /* Force modes/parameters by reading from external binary files */ diff --git a/lib_dec/ivas_objectRenderer_internal_fx.c b/lib_dec/ivas_objectRenderer_internal_fx.c index 814ba4254..8806a6aef 100644 --- a/lib_dec/ivas_objectRenderer_internal_fx.c +++ b/lib_dec/ivas_objectRenderer_internal_fx.c @@ -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 { diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index c49bf2433..07a53676b 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -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(); diff --git a/lib_rend/ivas_objectRenderer_fx.c b/lib_rend/ivas_objectRenderer_fx.c index bfa5d3039..d24ce2816 100644 --- a/lib_rend/ivas_objectRenderer_fx.c +++ b/lib_rend/ivas_objectRenderer_fx.c @@ -82,11 +82,7 @@ ivas_error ivas_td_binaural_open_unwrap_fx( TDREND_PosType_t PosType; Word16 nS; const Word32 *ls_azimuth_fx, *ls_elevation_fx; -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - Word32 Pos_fx[3]; // Q22 -#else Word32 Pos_fx[3]; // Q25 -#endif Word32 Dir_fx[3]; // Q30 TDREND_DirAtten_t *DirAtten_p; TDREND_DistAtten_t DistAtten; @@ -189,9 +185,6 @@ ivas_error ivas_td_binaural_open_unwrap_fx( { /* Set source positions according to loudspeaker layout */ angles_to_vec_fx( ONE_IN_Q9, ls_azimuth_fx[nS], ls_elevation_fx[nS], Pos_fx ); -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - Scale_sig32( Pos_fx, 3, -3 ); /* Q25 -> Q22 */ -#endif Dir_fx[0] = ONE_IN_Q30; move32(); @@ -654,11 +647,7 @@ ivas_error TDREND_Update_object_positions_fx( ) { Word16 nS; -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - Word32 Pos_fx[3]; // Q22 -#else Word32 Pos_fx[3]; // Q25 -#endif Word32 Dir_fx[3]; // Q30 ivas_error error; @@ -671,12 +660,7 @@ ivas_error TDREND_Update_object_positions_fx( { /* Update the source positions */ /* Source position and direction */ -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION angles_to_vec_fx( hIsmMetaData[nS]->radius_fx /*Q9*/, hIsmMetaData[nS]->azimuth_fx, hIsmMetaData[nS]->elevation_fx, Pos_fx ); - Scale_sig32( Pos_fx, 3, -3 ); /* Q25 -> Q22 */ -#else - angles_to_vec_fx( hIsmMetaData[nS]->radius_fx /*Q9*/, hIsmMetaData[nS]->azimuth_fx, hIsmMetaData[nS]->elevation_fx, Pos_fx ); -#endif angles_to_vec_fx( ONE_IN_Q14, hIsmMetaData[nS]->yaw_fx, hIsmMetaData[nS]->pitch_fx, Dir_fx ); // DirAtten_p->ConeInnerAngle_fx = DEG_360_IN_Q22; @@ -699,11 +683,7 @@ ivas_error TDREND_Update_object_positions_fx( { Pos_fx[0] = 0; /* Pos[1] = hIsmMetaData[nS]->azimuth / 90.f; */ -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - Pos_fx[1] = L_shl( Mpy_32_32_r( hIsmMetaData[nS]->azimuth_fx, 23860929 /* 1 / 90.f in Q31 */ ), 0 ); /* Q22 */ -#else Pos_fx[1] = L_shl( Mpy_32_32_r( hIsmMetaData[nS]->azimuth_fx, 23860929 /* 1 / 90.f in Q31 */ ), Q3 ); /* Q25 */ -#endif move32(); Pos_fx[2] = 0; move32(); @@ -1013,7 +993,7 @@ ivas_error ivas_td_binaural_renderer_ext_fx( Word16 idx = subframe_idx; move16(); #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - Word16 pos_q = Q22; + Word16 pos_q = Q31; #else Word16 pos_q = Q25; #endif @@ -1022,6 +1002,10 @@ ivas_error ivas_td_binaural_renderer_ext_fx( test(); IF( *hCombinedOrientationData != NULL && ( *hCombinedOrientationData )->listenerPos != NULL ) { +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + pos_q = ( *hCombinedOrientationData )->listenerPos[idx].q_fact; + move16(); +#else ( *hCombinedOrientationData )->listenerPos[idx].x_fx = L_shr( ( *hCombinedOrientationData )->listenerPos[idx].x_fx, sub( ( *hCombinedOrientationData )->listenerPos[idx].q_fact, pos_q ) ); move32(); ( *hCombinedOrientationData )->listenerPos[idx].y_fx = L_shr( ( *hCombinedOrientationData )->listenerPos[idx].y_fx, sub( ( *hCombinedOrientationData )->listenerPos[idx].q_fact, pos_q ) ); @@ -1030,6 +1014,7 @@ ivas_error ivas_td_binaural_renderer_ext_fx( move32(); ( *hCombinedOrientationData )->listenerPos[idx].q_fact = pos_q; move16(); +#endif } FOR( Word16 i = 0; i < 3; i++ ) { diff --git a/lib_rend/ivas_objectRenderer_hrFilt_fx.c b/lib_rend/ivas_objectRenderer_hrFilt_fx.c index 88be20e0c..13c2f1b72 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt_fx.c +++ b/lib_rend/ivas_objectRenderer_hrFilt_fx.c @@ -74,6 +74,8 @@ ivas_error TDREND_REND_RenderSourceHRFilt_fx( Word16 left_filter_e; Word16 right_filter_e; + dbgwrite( &Src_p->Gain_fx, sizeof( int ), 1, 1, "Gain_fx.int" ); + TDREND_Apply_ITD_fx( Src_p->InputFrame_p_fx, LeftOutputFrame_fx, RightOutputFrame_fx, &Src_p->previtd, Src_p->itd, Src_p->mem_itd_fx, subframe_length ); diff --git a/lib_rend/ivas_objectRenderer_mix_fx.c b/lib_rend/ivas_objectRenderer_mix_fx.c index e9c181692..36bf42753 100644 --- a/lib_rend/ivas_objectRenderer_mix_fx.c +++ b/lib_rend/ivas_objectRenderer_mix_fx.c @@ -205,7 +205,7 @@ ivas_error TDREND_MIX_Init_fx( /* Init virtual and rendering listeners for spatial mixers */ TDREND_SPATIAL_VecInit_fx( hBinRendererTd->Listener_p->Pos_fx, 0, 0, 0 ); #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - hBinRendererTd->Listener_p->Pos_q = Q22; + hBinRendererTd->Listener_p->Pos_q = Q31; #else hBinRendererTd->Listener_p->Pos_q = Q25; #endif diff --git a/lib_rend/ivas_objectRenderer_sources_fx.c b/lib_rend/ivas_objectRenderer_sources_fx.c index 8c7ac49c9..c07476318 100644 --- a/lib_rend/ivas_objectRenderer_sources_fx.c +++ b/lib_rend/ivas_objectRenderer_sources_fx.c @@ -61,11 +61,7 @@ static void TDREND_SRC_SPATIAL_Dealloc( TDREND_SRC_SPATIAL_t *SrcSpatial_p ); ivas_error TDREND_MIX_SRC_SetPos_fx( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ const Word16 SrcInd, /* i : Source index */ -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - const Word32 *Vec_p /* i : Position vector Q22 */ -#else const Word32 *Vec_p /* i : Position vector Q25 */ -#endif ) { TDREND_SRC_SPATIAL_t *SrcSpatial_p; @@ -77,15 +73,6 @@ ivas_error TDREND_MIX_SRC_SetPos_fx( ELSE { SrcSpatial_p = hBinRendererTd->Sources[SrcInd]->SrcSpatial_p; -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - SrcSpatial_p->Pos_p_fx[0] = L_shr( SrcSpatial_p->Pos_p_fx[0], sub( SrcSpatial_p->q_Pos_p, Q22 ) ); // Q22 - move32(); - SrcSpatial_p->Pos_p_fx[1] = L_shr( SrcSpatial_p->Pos_p_fx[1], sub( SrcSpatial_p->q_Pos_p, Q22 ) ); // Q22 - move32(); - SrcSpatial_p->Pos_p_fx[2] = L_shr( SrcSpatial_p->Pos_p_fx[2], sub( SrcSpatial_p->q_Pos_p, Q22 ) ); // Q22 - move32(); - SrcSpatial_p->q_Pos_p = Q22; -#else SrcSpatial_p->Pos_p_fx[0] = L_shr( SrcSpatial_p->Pos_p_fx[0], sub( SrcSpatial_p->q_Pos_p, Q25 ) ); // Q25 move32(); SrcSpatial_p->Pos_p_fx[1] = L_shr( SrcSpatial_p->Pos_p_fx[1], sub( SrcSpatial_p->q_Pos_p, Q25 ) ); // Q25 @@ -93,17 +80,12 @@ ivas_error TDREND_MIX_SRC_SetPos_fx( SrcSpatial_p->Pos_p_fx[2] = L_shr( SrcSpatial_p->Pos_p_fx[2], sub( SrcSpatial_p->q_Pos_p, Q25 ) ); // Q25 move32(); SrcSpatial_p->q_Pos_p = Q25; -#endif move16(); test(); test(); IF( NE_32( SrcSpatial_p->Pos_p_fx[0], Vec_p[0] ) || NE_32( SrcSpatial_p->Pos_p_fx[1], Vec_p[1] ) || NE_32( SrcSpatial_p->Pos_p_fx[2], Vec_p[2] ) ) { -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - Copy32( Vec_p, SrcSpatial_p->Pos_p_fx, 3 ); // Q22 -#else Copy32( Vec_p, SrcSpatial_p->Pos_p_fx, 3 ); // Q25 -#endif SrcSpatial_p->Updated = TRUE; move16(); } @@ -343,7 +325,8 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( Word32 elev_delta; Word16 ListRelPos_e, ListRelDist_e; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - Word32 Pos_p_q21[3], Lis_p_q21[3]; + Word16 pos_q; + Word32 Src_p_aligned[3], Lis_p_aligned[3]; #endif /* Evaluate the HR filters from the source and listener positions and orientations */ @@ -357,11 +340,12 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( /* Absolute position */ #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - /* Q22 -> Q21 for 1 bit headroom. Relative position has twice the range of the position */ - Copy_Scale_sig32( SrcSpatial_p->Pos_p_fx, Pos_p_q21, 3, -1 ); - Copy_Scale_sig32( Listener_p->Pos_fx, Lis_p_q21, 3, -1 ); - TDREND_SPATIAL_VecMapToNewCoordSystem_fx( Pos_p_q21, Lis_p_q21, Listener_p->Front_fx, Listener_p->Up_fx, Listener_p->Right_fx, ListRelPos, ListRelPosAbs ); - ListRelPos_e = 11; // Q21 + Q30 - 31 = Q20, exp = 31 - 20 = 11 + pos_q = s_min( SrcSpatial_p->q_Pos_p, Listener_p->Pos_q ); + move16(); + Copy_Scale_sig32( SrcSpatial_p->Pos_p_fx, Src_p_aligned, 3, sub( pos_q, SrcSpatial_p->q_Pos_p ) ); + Copy_Scale_sig32( Listener_p->Pos_fx, Lis_p_aligned, 3, sub( pos_q, Listener_p->Pos_q ) ); + TDREND_SPATIAL_VecMapToNewCoordSystem_fx( Src_p_aligned, Lis_p_aligned, Listener_p->Front_fx, Listener_p->Up_fx, Listener_p->Right_fx, ListRelPos, ListRelPosAbs ); + ListRelPos_e = sub( 62, add( pos_q, Q30 ) ); // Qq + Q30 - 31, exp = 62 - q - 30 #else TDREND_SPATIAL_VecMapToNewCoordSystem_fx( SrcSpatial_p->Pos_p_fx, Listener_p->Pos_fx, Listener_p->Front_fx, Listener_p->Up_fx, Listener_p->Right_fx, ListRelPos, ListRelPosAbs ); ListRelPos_e = 7; // output q of above function is Q25 + Q30 - 31. so exp will be 62 - Q25 - Q30. @@ -406,7 +390,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( IF( SrcSpatial_p->DirAttenEnabled ) { #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - *SrcRend_p->DirGain_p_fx = TDREND_SRC_SPATIAL_GetDirGain_fx( &SrcSpatial_p->DirAtten, SrcSpatial_p->Front_p_fx, ListRelPosAbs, 9 /*exp: 31 - 22 = 9 */ ); + *SrcRend_p->DirGain_p_fx = TDREND_SRC_SPATIAL_GetDirGain_fx( &SrcSpatial_p->DirAtten, SrcSpatial_p->Front_p_fx, ListRelPosAbs, sub( 31, pos_q ) ); #else *SrcRend_p->DirGain_p_fx = TDREND_SRC_SPATIAL_GetDirGain_fx( &SrcSpatial_p->DirAtten, SrcSpatial_p->Front_p_fx, ListRelPosAbs, 6 ); #endif diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index f2d1e4875..9c5b31de0 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -1225,7 +1225,7 @@ typedef struct Word16 Updated; TDREND_PosType_t PosType; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - Word32 Pos_p_fx[3 * SPAT_BIN_MAX_INPUT_CHANNELS]; // Q22 + Word32 Pos_p_fx[3 * SPAT_BIN_MAX_INPUT_CHANNELS]; // Q q_Pos_p #else Word32 Pos_p_fx[3 * SPAT_BIN_MAX_INPUT_CHANNELS]; // Q25 #endif diff --git a/lib_util/float_to_fix_ops.c b/lib_util/float_to_fix_ops.c index 4bab0a6b1..8ae696fe0 100644 --- a/lib_util/float_to_fix_ops.c +++ b/lib_util/float_to_fix_ops.c @@ -127,3 +127,22 @@ Word32 floatToFixed_32( return (Word32) val; } + + + +Word16 float_to_fix_find_q +( + const float val +) +{ + Word16 bits; + float absVal; + + absVal = fabsf( val ); + if ( absVal < 1e-10f ) + { + return Q31; + } + bits = (Word16) floorf( log2f( absVal ) ) + 1; + return (Word16) ( 31 - bits ); +} diff --git a/lib_util/float_to_fix_ops.h b/lib_util/float_to_fix_ops.h index 0cd23cbc6..be23e5a16 100644 --- a/lib_util/float_to_fix_ops.h +++ b/lib_util/float_to_fix_ops.h @@ -16,4 +16,6 @@ float fixedToFloat( const Word32 i, const Word16 Q ); float fix16_to_float( const Word16 number, const Word16 Q ); +Word16 float_to_fix_find_q( const float val ); + #endif /* FLOAT_TO_FIX_OPS_H */ diff --git a/lib_util/rotation_file_reader.c b/lib_util/rotation_file_reader.c index 2652fde91..e6dcead2d 100644 --- a/lib_util/rotation_file_reader.c +++ b/lib_util/rotation_file_reader.c @@ -33,6 +33,7 @@ #include "rotation_file_reader.h" #include #include +#include #include "float_to_fix_ops.h" @@ -115,6 +116,9 @@ ivas_error HeadRotationFileReading( { float w, x, y, z; float posx, posy, posz; +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + float maxAbsPos; +#endif int32_t read_values; posx = 0.0f; @@ -159,10 +163,13 @@ ivas_error HeadRotationFileReading( pPos->x = min( max( -IVAS_LISTENER_POSITION_MAX, posx ), IVAS_LISTENER_POSITION_MAX ); pPos->y = min( max( -IVAS_LISTENER_POSITION_MAX, posy ), IVAS_LISTENER_POSITION_MAX ); pPos->z = min( max( -IVAS_LISTENER_POSITION_MAX, posz ), IVAS_LISTENER_POSITION_MAX ); - pPos->x_fx = floatToFixed_32( pPos->x, Q22 ); - pPos->y_fx = floatToFixed_32( pPos->y, Q22 ); - pPos->z_fx = floatToFixed_32( pPos->z, Q22 ); - pPos->q_fact = Q22; + + maxAbsPos = max( max( fabs( pPos->x ), fabs( pPos->y ) ), fabs( pPos->z ) ); + pPos->q_fact = float_to_fix_find_q( maxAbsPos ); + + pPos->x_fx = floatToFixed_32( pPos->x, pPos->q_fact ); + pPos->y_fx = floatToFixed_32( pPos->y, pPos->q_fact ); + pPos->z_fx = floatToFixed_32( pPos->z, pPos->q_fact ); #else pPos->x = posx; pPos->y = posy; -- GitLab From 82593e304ff48a63474424069c7eb3a5fb38a9c7 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 10:58:20 +0200 Subject: [PATCH 03/12] Restore debugging macro --- lib_com/options.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 07bde1d89..b7f1ae377 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -48,7 +48,7 @@ /* ################### Start DEBUGGING switches ######################## */ #ifndef RELEASE -#define DEBUGGING /* Activate debugging part of the code */ +/*#define DEBUGGING*/ /* Activate debugging part of the code */ #endif /*#define WMOPS*/ /* Activate complexity and memory counters */ /*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ @@ -58,7 +58,7 @@ #ifdef DEBUGGING /*#define DBG_BITSTREAM_ANALYSIS*/ /* Write bitstream with annotations to a text file */ -/*#define DEBUG_MODE_INFO*/ /* Define to output most important parameters to the subdirectory "res/" */ +#define DEBUG_MODE_INFO /* Define to output most important parameters to the subdirectory "res/" */ #define DEBUG_MODE_INFO_TWEAK /* Enable command line switch to specify subdirectory for debug info output inside "./res/" */ #define DEBUG_FORCE_MDCT_STEREO_MODE /* Force stereo mode decision for MDCT stereo: -stereo 3 1 forces L/R coding and -stereo 3 2 forces full M/S coding */ /*#define DEBUG_FORCE_DIR*/ /* Force modes/parameters by reading from external binary files */ -- GitLab From 63f843f15bc6a88fb8789913a6e2115396bb56a7 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 11:00:39 +0200 Subject: [PATCH 04/12] Removal of debug code --- lib_rend/ivas_objectRenderer_hrFilt_fx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib_rend/ivas_objectRenderer_hrFilt_fx.c b/lib_rend/ivas_objectRenderer_hrFilt_fx.c index 13c2f1b72..88be20e0c 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt_fx.c +++ b/lib_rend/ivas_objectRenderer_hrFilt_fx.c @@ -74,8 +74,6 @@ ivas_error TDREND_REND_RenderSourceHRFilt_fx( Word16 left_filter_e; Word16 right_filter_e; - dbgwrite( &Src_p->Gain_fx, sizeof( int ), 1, 1, "Gain_fx.int" ); - TDREND_Apply_ITD_fx( Src_p->InputFrame_p_fx, LeftOutputFrame_fx, RightOutputFrame_fx, &Src_p->previtd, Src_p->itd, Src_p->mem_itd_fx, subframe_length ); -- GitLab From 829f404d48125b4a055fb208cdf9013e71ac6b03 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 11:09:45 +0200 Subject: [PATCH 05/12] Clang format --- lib_rend/ivas_objectRenderer_sources_fx.c | 2 +- lib_util/float_to_fix_ops.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib_rend/ivas_objectRenderer_sources_fx.c b/lib_rend/ivas_objectRenderer_sources_fx.c index c07476318..9efb843e8 100644 --- a/lib_rend/ivas_objectRenderer_sources_fx.c +++ b/lib_rend/ivas_objectRenderer_sources_fx.c @@ -61,7 +61,7 @@ static void TDREND_SRC_SPATIAL_Dealloc( TDREND_SRC_SPATIAL_t *SrcSpatial_p ); ivas_error TDREND_MIX_SRC_SetPos_fx( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ const Word16 SrcInd, /* i : Source index */ - const Word32 *Vec_p /* i : Position vector Q25 */ + const Word32 *Vec_p /* i : Position vector Q25 */ ) { TDREND_SRC_SPATIAL_t *SrcSpatial_p; diff --git a/lib_util/float_to_fix_ops.c b/lib_util/float_to_fix_ops.c index 8ae696fe0..4e020fc9c 100644 --- a/lib_util/float_to_fix_ops.c +++ b/lib_util/float_to_fix_ops.c @@ -129,11 +129,8 @@ Word32 floatToFixed_32( } - -Word16 float_to_fix_find_q -( - const float val -) +Word16 float_to_fix_find_q( + const float val ) { Word16 bits; float absVal; -- GitLab From 4e3a0c1ba169e78f4f3320bf9b1ced2d3dd15977 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 11:24:21 +0200 Subject: [PATCH 06/12] Fix for non-diegetic panning --- lib_rend/ivas_objectRenderer_sources_fx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib_rend/ivas_objectRenderer_sources_fx.c b/lib_rend/ivas_objectRenderer_sources_fx.c index c07476318..06c68e05c 100644 --- a/lib_rend/ivas_objectRenderer_sources_fx.c +++ b/lib_rend/ivas_objectRenderer_sources_fx.c @@ -476,11 +476,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( move32(); set32_fx( hrf_left, 0, *filterlength ); set32_fx( hrf_right, 0, *filterlength ); -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - hrf_left[0] = L_shr( L_add( L_shl( SrcSpatial_p->Pos_p_fx[1], 3 ), ONE_IN_Q25 ), 1 ); // Q25 -#else hrf_left[0] = L_shr( L_add( SrcSpatial_p->Pos_p_fx[1], ONE_IN_Q25 ), 1 ); // Q25 -#endif move32(); hrf_right[0] = L_sub( ONE_IN_Q25, hrf_left[0] ); // Q25 move32(); -- GitLab From 3c36f20311697d131fa15ae97455859c70112784 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 12:24:44 +0200 Subject: [PATCH 07/12] Fix compilation warning and literal in L_shl --- lib_rend/ivas_objectRenderer_sources_fx.c | 4 ++++ lib_util/rotation_file_reader.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_rend/ivas_objectRenderer_sources_fx.c b/lib_rend/ivas_objectRenderer_sources_fx.c index fcfec595a..48b83b462 100644 --- a/lib_rend/ivas_objectRenderer_sources_fx.c +++ b/lib_rend/ivas_objectRenderer_sources_fx.c @@ -476,7 +476,11 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( move32(); set32_fx( hrf_left, 0, *filterlength ); set32_fx( hrf_right, 0, *filterlength ); +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + hrf_left[0] = L_shr( L_add( L_shl( SrcSpatial_p->Pos_p_fx[1], sub( Q25, SrcSpatial_p->q_Pos_p ) ), ONE_IN_Q25 ), 1 ); // Q25 +#else hrf_left[0] = L_shr( L_add( SrcSpatial_p->Pos_p_fx[1], ONE_IN_Q25 ), 1 ); // Q25 +#endif move32(); hrf_right[0] = L_sub( ONE_IN_Q25, hrf_left[0] ); // Q25 move32(); diff --git a/lib_util/rotation_file_reader.c b/lib_util/rotation_file_reader.c index e6dcead2d..5fa236a7f 100644 --- a/lib_util/rotation_file_reader.c +++ b/lib_util/rotation_file_reader.c @@ -164,7 +164,7 @@ ivas_error HeadRotationFileReading( pPos->y = min( max( -IVAS_LISTENER_POSITION_MAX, posy ), IVAS_LISTENER_POSITION_MAX ); pPos->z = min( max( -IVAS_LISTENER_POSITION_MAX, posz ), IVAS_LISTENER_POSITION_MAX ); - maxAbsPos = max( max( fabs( pPos->x ), fabs( pPos->y ) ), fabs( pPos->z ) ); + maxAbsPos = max( max( fabsf( pPos->x ), fabsf( pPos->y ) ), fabsf( pPos->z ) ); pPos->q_fact = float_to_fix_find_q( maxAbsPos ); pPos->x_fx = floatToFixed_32( pPos->x, pPos->q_fact ); -- GitLab From a4087c46eb9501d6b03806c758a943f9361597c2 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 13:04:40 +0200 Subject: [PATCH 08/12] Fix 1-bit headroom in TDREND_SPATIAL_VecNormalize_fx --- lib_rend/ivas_objectRenderer_vec_fx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib_rend/ivas_objectRenderer_vec_fx.c b/lib_rend/ivas_objectRenderer_vec_fx.c index 81268e578..6f01adcd6 100644 --- a/lib_rend/ivas_objectRenderer_vec_fx.c +++ b/lib_rend/ivas_objectRenderer_vec_fx.c @@ -77,8 +77,13 @@ Word32 TDREND_SPATIAL_VecNorm_fx( { Word32 tmp; Word16 tmp_e; +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + tmp = L_add( L_add( Mpy_32_32( L_shr( Vec_p[0], 1 ), Vec_p[0] ), Mpy_32_32( L_shr( Vec_p[1], 1 ), Vec_p[1] ) ), Mpy_32_32( L_shr( Vec_p[2], 1 ), Vec_p[2] ) ); + tmp_e = add( shl( in_exp, 1 ), 1 ); // 2 * in_exp + 1 +#else tmp = L_add( L_add( Mpy_32_32( Vec_p[0], Vec_p[0] ), Mpy_32_32( Vec_p[1], Vec_p[1] ) ), Mpy_32_32( Vec_p[2], Vec_p[2] ) ); tmp_e = shl( in_exp, 1 ); // 2 * in_exp +#endif tmp = Sqrt32( tmp, &tmp_e ); *out_exp = tmp_e; move16(); @@ -96,8 +101,13 @@ void TDREND_SPATIAL_VecNormalize_fx( Word32 sqrd_sum; Word16 exp, shift; +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + sqrd_sum = L_add( Mpy_32_32( L_shr( Vec_p_fx[0], 1 ), Vec_p_fx[0] ), L_add( Mpy_32_32( L_shr( Vec_p_fx[1], 1 ), Vec_p_fx[1] ), Mpy_32_32( L_shr( Vec_p_fx[2], 1 ), Vec_p_fx[2] ) ) ); + exp = add( shl( sub( 31, q ), 1 ), 1 ); +#else sqrd_sum = L_add( Mpy_32_32( Vec_p_fx[0], Vec_p_fx[0] ), L_add( Mpy_32_32( Vec_p_fx[1], Vec_p_fx[1] ), Mpy_32_32( Vec_p_fx[2], Vec_p_fx[2] ) ) ); exp = shl( sub( 31, q ), 1 ); +#endif scaler_fx = ISqrt32( sqrd_sum, &exp ); VecNorm_p_fx[0] = Mpy_32_32( scaler_fx, Vec_p_fx[0] ); // Q: ( q + ( 31 - exp ) ) - 31 -- GitLab From 7745411efd9289458dfd3b52dbcd15c733457ea3 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 16:21:13 +0200 Subject: [PATCH 09/12] Add missing forwarding of Listener position q_fact --- lib_com/common_api_types.h | 2 +- lib_com/ivas_prot_fx.h | 5 +++++ lib_rend/ivas_objectRenderer_fx.c | 20 ++++++++++++++++++++ lib_rend/ivas_objectRenderer_mix_fx.c | 13 +++++++++++++ lib_rend/ivas_objectRenderer_sources_fx.c | 3 +-- 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 0a693d045..68f818067 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -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 diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index 02d720e2f..36bdc823d 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -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( diff --git a/lib_rend/ivas_objectRenderer_fx.c b/lib_rend/ivas_objectRenderer_fx.c index d24ce2816..6d51eff51 100644 --- a/lib_rend/ivas_objectRenderer_fx.c +++ b/lib_rend/ivas_objectRenderer_fx.c @@ -729,6 +729,9 @@ ivas_error TDREND_Update_listener_orientation_fx( Word32 Rmat_fx[3][3]; Word16 orient_q, headPosition_q; Word32 Pos_p_fx[3]; +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + Word16 Pos_q; +#endif ivas_error error; IF( headRotEnabled ) @@ -767,6 +770,9 @@ ivas_error TDREND_Update_listener_orientation_fx( Pos_p_fx[0] = ( *Pos_fx ).x_fx; // Q Pos_fx->q_fact Pos_p_fx[1] = ( *Pos_fx ).y_fx; // Q Pos_fx->q_fact Pos_p_fx[2] = ( *Pos_fx ).z_fx; // Q Pos_fx->q_fact +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + Pos_q = ( *Pos_fx ).q_fact; +#endif } ELSE { @@ -774,10 +780,16 @@ ivas_error TDREND_Update_listener_orientation_fx( Pos_p_fx[0] = 0; Pos_p_fx[1] = 0; Pos_p_fx[2] = 0; +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + Pos_q = Q31; +#endif } move32(); move32(); move32(); +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + move16(); +#endif } ELSE { @@ -806,10 +818,18 @@ ivas_error TDREND_Update_listener_orientation_fx( move32(); Pos_p_fx[2] = 0; move32(); +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + Pos_q = Q31; + move16(); +#endif } /* Set the listener position and orientation:*/ +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + TDREND_MIX_LIST_SetPos_fx( hBinRendererTd, Pos_p_fx, Pos_q ); +#else TDREND_MIX_LIST_SetPos_fx( hBinRendererTd, Pos_p_fx ); +#endif error = TDREND_MIX_LIST_SetOrient_fx( hBinRendererTd, FrontVec_fx, UpVec_fx, orient_q ); diff --git a/lib_rend/ivas_objectRenderer_mix_fx.c b/lib_rend/ivas_objectRenderer_mix_fx.c index 36bf42753..892ef6fa8 100644 --- a/lib_rend/ivas_objectRenderer_mix_fx.c +++ b/lib_rend/ivas_objectRenderer_mix_fx.c @@ -55,7 +55,12 @@ static ivas_error DefaultBSplineModel_fx( TDREND_HRFILT_FiltSet_t *HrFiltSet_p, 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 */ // Q Pos_fx->q_fact + const Word16 Pos_q /* i : Listener's position Q value */ +#else const Word32 *Pos_p /* i : Listener's position */ // Q Pos_fx->q_fact +#endif ) { TDREND_MIX_Listener_t *Listener_p; @@ -63,10 +68,18 @@ void TDREND_MIX_LIST_SetPos_fx( Listener_p = hBinRendererTd->Listener_p; test(); test(); +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + test(); + IF( NE_32( Pos_p[0], Listener_p->Pos_fx[0] ) || NE_32( Pos_p[1], Listener_p->Pos_fx[1] ) || NE_32( Pos_p[2], Listener_p->Pos_fx[2] ) || NE_16( Pos_q, Listener_p->Pos_q ) ) +#else IF( NE_32( Pos_p[0], Listener_p->Pos_fx[0] ) || NE_32( Pos_p[1], Listener_p->Pos_fx[1] ) || NE_32( Pos_p[2], Listener_p->Pos_fx[2] ) ) +#endif { /* Set position */ Copy32( Pos_p, Listener_p->Pos_fx, 3 ); // Q Pos_fx->q_fact +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + Listener_p->Pos_q = Pos_q; +#endif /* Set pose update flag */ Listener_p->PoseUpdated = TRUE; diff --git a/lib_rend/ivas_objectRenderer_sources_fx.c b/lib_rend/ivas_objectRenderer_sources_fx.c index 48b83b462..ace7f6acc 100644 --- a/lib_rend/ivas_objectRenderer_sources_fx.c +++ b/lib_rend/ivas_objectRenderer_sources_fx.c @@ -340,8 +340,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( /* Absolute position */ #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - pos_q = s_min( SrcSpatial_p->q_Pos_p, Listener_p->Pos_q ); - move16(); + pos_q = min( SrcSpatial_p->q_Pos_p, Listener_p->Pos_q ); Copy_Scale_sig32( SrcSpatial_p->Pos_p_fx, Src_p_aligned, 3, sub( pos_q, SrcSpatial_p->q_Pos_p ) ); Copy_Scale_sig32( Listener_p->Pos_fx, Lis_p_aligned, 3, sub( pos_q, Listener_p->Pos_q ) ); TDREND_SPATIAL_VecMapToNewCoordSystem_fx( Src_p_aligned, Lis_p_aligned, Listener_p->Front_fx, Listener_p->Up_fx, Listener_p->Right_fx, ListRelPos, ListRelPosAbs ); -- GitLab From 1e34b300678fc07d4192e75b38ac99d75bf1c8bf Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 16:26:54 +0200 Subject: [PATCH 10/12] Fix min->s_min --- lib_rend/ivas_objectRenderer_sources_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_objectRenderer_sources_fx.c b/lib_rend/ivas_objectRenderer_sources_fx.c index ace7f6acc..748ea0d0d 100644 --- a/lib_rend/ivas_objectRenderer_sources_fx.c +++ b/lib_rend/ivas_objectRenderer_sources_fx.c @@ -340,7 +340,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx( /* Absolute position */ #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - pos_q = min( SrcSpatial_p->q_Pos_p, Listener_p->Pos_q ); + pos_q = s_min( SrcSpatial_p->q_Pos_p, Listener_p->Pos_q ); Copy_Scale_sig32( SrcSpatial_p->Pos_p_fx, Src_p_aligned, 3, sub( pos_q, SrcSpatial_p->q_Pos_p ) ); Copy_Scale_sig32( Listener_p->Pos_fx, Lis_p_aligned, 3, sub( pos_q, Listener_p->Pos_q ) ); TDREND_SPATIAL_VecMapToNewCoordSystem_fx( Src_p_aligned, Lis_p_aligned, Listener_p->Front_fx, Listener_p->Up_fx, Listener_p->Right_fx, ListRelPos, ListRelPosAbs ); -- GitLab From 65a980958ffd92f4e77d7bc274bed21e52d29f1e Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 23 Apr 2026 16:33:58 +0200 Subject: [PATCH 11/12] Minor fixes --- apps/decoder.c | 2 +- lib_rend/ivas_objectRenderer_fx.c | 8 ++++++++ lib_rend/ivas_objectRenderer_mix_fx.c | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index 054a21906..1414eeb62 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -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 diff --git a/lib_rend/ivas_objectRenderer_fx.c b/lib_rend/ivas_objectRenderer_fx.c index 6d51eff51..b9b92a56f 100644 --- a/lib_rend/ivas_objectRenderer_fx.c +++ b/lib_rend/ivas_objectRenderer_fx.c @@ -1039,10 +1039,18 @@ ivas_error ivas_td_binaural_renderer_ext_fx( FOR( Word16 i = 0; i < 3; i++ ) { pTDRend->hBinRendererTd->Listener_p->Pos_fx[i] = L_shr( pTDRend->hBinRendererTd->Listener_p->Pos_fx[i], sub( pTDRend->hBinRendererTd->Listener_p->Pos_q, pos_q ) ); +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + move32(); +#else pTDRend->hBinRendererTd->Listener_p->Pos_q = pos_q; move32(); move16(); +#endif } +#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION + pTDRend->hBinRendererTd->Listener_p->Pos_q = pos_q; + move16(); +#endif } IF( NE_32( ( error = ivas_td_binaural_renderer_unwrap_fx( hReverb, transport_config, pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, *hCombinedOrientationData, diff --git a/lib_rend/ivas_objectRenderer_mix_fx.c b/lib_rend/ivas_objectRenderer_mix_fx.c index 892ef6fa8..557cfa5b1 100644 --- a/lib_rend/ivas_objectRenderer_mix_fx.c +++ b/lib_rend/ivas_objectRenderer_mix_fx.c @@ -79,6 +79,7 @@ void TDREND_MIX_LIST_SetPos_fx( Copy32( Pos_p, Listener_p->Pos_fx, 3 ); // Q Pos_fx->q_fact #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION Listener_p->Pos_q = Pos_q; + move16(); #endif /* Set pose update flag */ -- GitLab From 5976d220edd086ae3c110159180b07abaa1816fe Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 23 Apr 2026 20:02:46 +0200 Subject: [PATCH 12/12] formatting --- lib_rend/ivas_objectRenderer_mix_fx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib_rend/ivas_objectRenderer_mix_fx.c b/lib_rend/ivas_objectRenderer_mix_fx.c index 557cfa5b1..2924da908 100644 --- a/lib_rend/ivas_objectRenderer_mix_fx.c +++ b/lib_rend/ivas_objectRenderer_mix_fx.c @@ -54,10 +54,11 @@ static ivas_error DefaultBSplineModel_fx( TDREND_HRFILT_FiltSet_t *HrFiltSet_p, --------------------------------------------------------------------*/ void TDREND_MIX_LIST_SetPos_fx( - BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ + 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 */ // Q Pos_fx->q_fact - const Word16 Pos_q /* i : Listener's position Q value */ + const Word32 *Pos_p, + /* i : Listener's position */ // Q Pos_fx->q_fact + const Word16 Pos_q /* i : Listener's position Q value */ #else const Word32 *Pos_p /* i : Listener's position */ // Q Pos_fx->q_fact #endif -- GitLab