Commit 894ce68d authored by Sumeyra Demir Kanik's avatar Sumeyra Demir Kanik
Browse files

Merge branch '817-double-precision-arithmetic-in-renderer-md' into 'main'

Resolve "Double precision arithmetic in Renderer MD"

See merge request !1142
parents 9f3787a5 a48c85b8
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -150,6 +150,9 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
/*#define SPLIT_REND_WITH_HEAD_ROT*/                    /* Dlb,FhG: Split Rendering contributions 21 and 35 */


#define FIX_817_DOUBLE_PREC_REND_MD                     /* Eri: Issue 817: Avoid double precision in renderer metadata module */

#define FIX_854_ARRAY_SIZE_MISMATCH                     /* VA: issue 854: correct the mismatch between definition and declaration of `ivas_core_dec() */
#define FIX_785_REMOVE_DEAD_CODE                        /* VA: issue 785: remove dead code */
#define FIX_852_FIX_HANDLE_DEREF                        /* VA: issue 852: Fix missing handle dereferencing of hIsmMetadaData in ivas_ism_metadata_close() */
+12 −0
Original line number Diff line number Diff line
@@ -5849,7 +5849,11 @@ static ivas_error renderIsmToBinaural(

    push_wmops( "renderIsmToBinaural" );
    /* Metadata Delay to sync with audio delay converted from ms to 5ms (1000/50/4) subframe index */
#ifdef FIX_817_DOUBLE_PREC_REND_MD
    ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / ( 1000 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) );
#else
    ism_md_subframe_update_ext = (int16_t) round( ismInput->ism_metadata_delay_ms / ( 1000 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) );
#endif
    copyBufferTo2dArray( ismInput->base.inputBuffer, tmpTDRendBuffer );

    if ( ( error = ivas_td_binaural_renderer_ext( &ismInput->tdRendWrapper, ismInput->base.inConfig, NULL, ismInput->base.ctx.pCombinedOrientationData, &ismInput->currentPos, ismInput->hReverb, ism_md_subframe_update_ext,
@@ -6072,7 +6076,11 @@ static ivas_error renderIsmToBinauralReverb(
    push_wmops( "renderIsmToBinauralRoom" );

    /* Metadata Delay to sync with audio delay converted from ms to 5ms (1000/50/4) subframe index */
#ifdef FIX_817_DOUBLE_PREC_REND_MD
    ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / ( 1000 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) );
#else
    ism_md_subframe_update_ext = (int16_t) round( ismInput->ism_metadata_delay_ms / ( 1000 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) );
#endif
    copyBufferTo2dArray( ismInput->base.inputBuffer, tmpRendBuffer );

    if ( ( error = ivas_td_binaural_renderer_ext( &ismInput->tdRendWrapper, ismInput->base.inConfig, NULL, ismInput->base.ctx.pCombinedOrientationData, &ismInput->currentPos, ismInput->hReverb,
@@ -6250,7 +6258,11 @@ static ivas_error renderIsmToSplitBinaural(
    pMultiBinPoseData = &pSplitRendWrapper->multiBinPoseData;

    /* Metadata Delay to sync with audio delay converted from ms to 5ms (1000/50/4) subframe index */
#ifdef FIX_817_DOUBLE_PREC_REND_MD
    ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / ( 1000 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) );
#else
    ism_md_subframe_update_ext = (int16_t) round( ismInput->ism_metadata_delay_ms / ( 1000 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) );
#endif

    pCombinedOrientationData = *ismInput->base.ctx.pCombinedOrientationData;