Loading lib_rend/lib_rend.c +37 −10 Original line number Diff line number Diff line Loading @@ -4747,8 +4747,13 @@ static ivas_error renderIsmToBinauralRoom( } if ( ( error = getEfapGains( *ismInput->base.ctx.pEfapOutWrapper, #ifdef EXTERNAL_ORIENTATIONS ( combinedOrientationEnabled ) ? rotatedPos.azimuth : ismInput->previousPos.azimuth, ( combinedOrientationEnabled ) ? rotatedPos.elevation : ismInput->previousPos.elevation, #else ( headRotData->headRotEnabled ) ? rotatedPos.azimuth : ismInput->previousPos.azimuth, ( headRotData->headRotEnabled ) ? rotatedPos.elevation : ismInput->previousPos.elevation, #endif previousPanGains ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -5069,7 +5074,6 @@ static ivas_error renderMcToBinaural( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { int8_t headRotEnabled; float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; IVAS_REND_AudioConfig inConfig; ivas_error error; Loading @@ -5078,6 +5082,8 @@ static ivas_error renderMcToBinaural( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; int16_t subframe_idx; #else int8_t headRotEnabled; #endif #ifdef JBM_TSM_ON_TCS float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; Loading @@ -5091,7 +5097,6 @@ static ivas_error renderMcToBinaural( push_wmops( "renderMcToBinaural" ); headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; inConfig = mcInput->base.inConfig; #ifdef EXTERNAL_ORIENTATIONS Loading @@ -5108,6 +5113,8 @@ static ivas_error renderMcToBinaural( } } } #else headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; #endif if ( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) || ( Loading Loading @@ -5191,7 +5198,6 @@ static ivas_error renderMcToBinauralRoom( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { int8_t headRotEnabled; float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; IVAS_REND_AudioConfig inConfig; ivas_error error; Loading @@ -5200,6 +5206,8 @@ static ivas_error renderMcToBinauralRoom( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; int16_t subframe_idx; #else int8_t headRotEnabled; #endif #ifdef JBM_TSM_ON_TCS float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; Loading @@ -5213,7 +5221,6 @@ static ivas_error renderMcToBinauralRoom( push_wmops( "renderMcToBinauralRoom" ); headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; inConfig = mcInput->base.inConfig; #ifdef EXTERNAL_ORIENTATIONS Loading @@ -5230,6 +5237,8 @@ static ivas_error renderMcToBinauralRoom( } } } #else headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; #endif if ( ( mcInput->hReverb != NULL && mcInput->hReverb->pConfig.roomAcoustics.use_brir == 0 && mcInput->hReverb->pConfig.roomAcoustics.late_reverb_on == 1 ) && ( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) || ( Loading Loading @@ -5311,7 +5320,6 @@ static ivas_error renderMcCustomLsToBinauralRoom( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { int8_t headRotEnabled; int16_t i; int16_t tmp; float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; Loading @@ -5323,6 +5331,8 @@ static ivas_error renderMcCustomLsToBinauralRoom( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; int16_t subframe_idx; #else int8_t headRotEnabled; #endif #ifdef JBM_TSM_ON_TCS float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; Loading @@ -5332,8 +5342,6 @@ static ivas_error renderMcCustomLsToBinauralRoom( tmpRotBuffer = outAudio; /* avoid compilation warning */ headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; #ifdef JBM_TSM_ON_TCS for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { Loading @@ -5355,6 +5363,8 @@ static ivas_error renderMcCustomLsToBinauralRoom( } } } #else headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; #endif /* apply rotation */ Loading Loading @@ -5390,7 +5400,11 @@ static ivas_error renderMcCustomLsToBinauralRoom( tmpMcBuffer.data = malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpMcBuffer.data, tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels ); #ifdef EXTERNAL_ORIENTATIONS tmpBufPtr = ( combinedOrientationEnabled ) ? &tmpRotBuffer : &mcInput->base.inputBuffer; #else tmpBufPtr = ( headRotEnabled ) ? &tmpRotBuffer : &mcInput->base.inputBuffer; #endif for ( i = 0; i < mcInput->base.inputBuffer.config.numChannels; i++ ) { renderBufferChannel( *tmpBufPtr, i, mcInput->panGains[i], tmpMcBuffer ); Loading @@ -5416,7 +5430,11 @@ static ivas_error renderMcCustomLsToBinauralRoom( return error; } #ifdef EXTERNAL_ORIENTATIONS if ( combinedOrientationEnabled ) #else if ( headRotEnabled ) #endif { free( tmpRotBuffer.data ); } Loading Loading @@ -5693,7 +5711,6 @@ static ivas_error renderSbaToBinauralRoom( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { int8_t headRotEnabled; int16_t i; int16_t tmp; float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; Loading @@ -5705,6 +5722,8 @@ static ivas_error renderSbaToBinauralRoom( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; int16_t subframe_idx; #else int8_t headRotEnabled; #endif #ifdef JBM_TSM_ON_TCS float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; Loading @@ -5721,8 +5740,6 @@ static ivas_error renderSbaToBinauralRoom( } #endif headRotEnabled = sbaInput->base.ctx.pHeadRotData->headRotEnabled; #ifdef EXTERNAL_ORIENTATIONS hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; Loading @@ -5737,6 +5754,8 @@ static ivas_error renderSbaToBinauralRoom( } } } #else headRotEnabled = sbaInput->base.ctx.pHeadRotData->headRotEnabled; #endif /* apply rotation */ Loading Loading @@ -5774,7 +5793,11 @@ static ivas_error renderSbaToBinauralRoom( tmpMcBuffer.data = malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpMcBuffer.data, tmpMcBuffer.config.numChannels * tmpMcBuffer.config.numSamplesPerChannel ); #ifdef EXTERNAL_ORIENTATIONS tmpBufPtr = ( combinedOrientationEnabled ) ? &tmpRotBuffer : &sbaInput->base.inputBuffer; #else tmpBufPtr = ( headRotEnabled ) ? &tmpRotBuffer : &sbaInput->base.inputBuffer; #endif for ( i = 0; i < sbaInput->base.inputBuffer.config.numChannels; i++ ) { renderBufferChannel( *tmpBufPtr, i, sbaInput->hoaDecMtx[i], tmpMcBuffer ); Loading @@ -5796,7 +5819,11 @@ static ivas_error renderSbaToBinauralRoom( accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio ); #ifdef EXTERNAL_ORIENTATIONS if ( combinedOrientationEnabled ) #else if ( headRotEnabled ) #endif { free( tmpRotBuffer.data ); } Loading Loading
lib_rend/lib_rend.c +37 −10 Original line number Diff line number Diff line Loading @@ -4747,8 +4747,13 @@ static ivas_error renderIsmToBinauralRoom( } if ( ( error = getEfapGains( *ismInput->base.ctx.pEfapOutWrapper, #ifdef EXTERNAL_ORIENTATIONS ( combinedOrientationEnabled ) ? rotatedPos.azimuth : ismInput->previousPos.azimuth, ( combinedOrientationEnabled ) ? rotatedPos.elevation : ismInput->previousPos.elevation, #else ( headRotData->headRotEnabled ) ? rotatedPos.azimuth : ismInput->previousPos.azimuth, ( headRotData->headRotEnabled ) ? rotatedPos.elevation : ismInput->previousPos.elevation, #endif previousPanGains ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -5069,7 +5074,6 @@ static ivas_error renderMcToBinaural( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { int8_t headRotEnabled; float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; IVAS_REND_AudioConfig inConfig; ivas_error error; Loading @@ -5078,6 +5082,8 @@ static ivas_error renderMcToBinaural( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; int16_t subframe_idx; #else int8_t headRotEnabled; #endif #ifdef JBM_TSM_ON_TCS float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; Loading @@ -5091,7 +5097,6 @@ static ivas_error renderMcToBinaural( push_wmops( "renderMcToBinaural" ); headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; inConfig = mcInput->base.inConfig; #ifdef EXTERNAL_ORIENTATIONS Loading @@ -5108,6 +5113,8 @@ static ivas_error renderMcToBinaural( } } } #else headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; #endif if ( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) || ( Loading Loading @@ -5191,7 +5198,6 @@ static ivas_error renderMcToBinauralRoom( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { int8_t headRotEnabled; float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; IVAS_REND_AudioConfig inConfig; ivas_error error; Loading @@ -5200,6 +5206,8 @@ static ivas_error renderMcToBinauralRoom( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; int16_t subframe_idx; #else int8_t headRotEnabled; #endif #ifdef JBM_TSM_ON_TCS float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; Loading @@ -5213,7 +5221,6 @@ static ivas_error renderMcToBinauralRoom( push_wmops( "renderMcToBinauralRoom" ); headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; inConfig = mcInput->base.inConfig; #ifdef EXTERNAL_ORIENTATIONS Loading @@ -5230,6 +5237,8 @@ static ivas_error renderMcToBinauralRoom( } } } #else headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; #endif if ( ( mcInput->hReverb != NULL && mcInput->hReverb->pConfig.roomAcoustics.use_brir == 0 && mcInput->hReverb->pConfig.roomAcoustics.late_reverb_on == 1 ) && ( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) || ( Loading Loading @@ -5311,7 +5320,6 @@ static ivas_error renderMcCustomLsToBinauralRoom( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { int8_t headRotEnabled; int16_t i; int16_t tmp; float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; Loading @@ -5323,6 +5331,8 @@ static ivas_error renderMcCustomLsToBinauralRoom( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; int16_t subframe_idx; #else int8_t headRotEnabled; #endif #ifdef JBM_TSM_ON_TCS float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; Loading @@ -5332,8 +5342,6 @@ static ivas_error renderMcCustomLsToBinauralRoom( tmpRotBuffer = outAudio; /* avoid compilation warning */ headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; #ifdef JBM_TSM_ON_TCS for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { Loading @@ -5355,6 +5363,8 @@ static ivas_error renderMcCustomLsToBinauralRoom( } } } #else headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; #endif /* apply rotation */ Loading Loading @@ -5390,7 +5400,11 @@ static ivas_error renderMcCustomLsToBinauralRoom( tmpMcBuffer.data = malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpMcBuffer.data, tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels ); #ifdef EXTERNAL_ORIENTATIONS tmpBufPtr = ( combinedOrientationEnabled ) ? &tmpRotBuffer : &mcInput->base.inputBuffer; #else tmpBufPtr = ( headRotEnabled ) ? &tmpRotBuffer : &mcInput->base.inputBuffer; #endif for ( i = 0; i < mcInput->base.inputBuffer.config.numChannels; i++ ) { renderBufferChannel( *tmpBufPtr, i, mcInput->panGains[i], tmpMcBuffer ); Loading @@ -5416,7 +5430,11 @@ static ivas_error renderMcCustomLsToBinauralRoom( return error; } #ifdef EXTERNAL_ORIENTATIONS if ( combinedOrientationEnabled ) #else if ( headRotEnabled ) #endif { free( tmpRotBuffer.data ); } Loading Loading @@ -5693,7 +5711,6 @@ static ivas_error renderSbaToBinauralRoom( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { int8_t headRotEnabled; int16_t i; int16_t tmp; float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; Loading @@ -5705,6 +5722,8 @@ static ivas_error renderSbaToBinauralRoom( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; int16_t subframe_idx; #else int8_t headRotEnabled; #endif #ifdef JBM_TSM_ON_TCS float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; Loading @@ -5721,8 +5740,6 @@ static ivas_error renderSbaToBinauralRoom( } #endif headRotEnabled = sbaInput->base.ctx.pHeadRotData->headRotEnabled; #ifdef EXTERNAL_ORIENTATIONS hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; Loading @@ -5737,6 +5754,8 @@ static ivas_error renderSbaToBinauralRoom( } } } #else headRotEnabled = sbaInput->base.ctx.pHeadRotData->headRotEnabled; #endif /* apply rotation */ Loading Loading @@ -5774,7 +5793,11 @@ static ivas_error renderSbaToBinauralRoom( tmpMcBuffer.data = malloc( tmpMcBuffer.config.numSamplesPerChannel * tmpMcBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpMcBuffer.data, tmpMcBuffer.config.numChannels * tmpMcBuffer.config.numSamplesPerChannel ); #ifdef EXTERNAL_ORIENTATIONS tmpBufPtr = ( combinedOrientationEnabled ) ? &tmpRotBuffer : &sbaInput->base.inputBuffer; #else tmpBufPtr = ( headRotEnabled ) ? &tmpRotBuffer : &sbaInput->base.inputBuffer; #endif for ( i = 0; i < sbaInput->base.inputBuffer.config.numChannels; i++ ) { renderBufferChannel( *tmpBufPtr, i, sbaInput->hoaDecMtx[i], tmpMcBuffer ); Loading @@ -5796,7 +5819,11 @@ static ivas_error renderSbaToBinauralRoom( accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio ); #ifdef EXTERNAL_ORIENTATIONS if ( combinedOrientationEnabled ) #else if ( headRotEnabled ) #endif { free( tmpRotBuffer.data ); } Loading