Commit 0d5d694c authored by vaclav's avatar vaclav
Browse files

fix when SPLIT_REND_WITH_HEAD_ROT is disabled

parent 062a510e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -383,10 +383,12 @@ int16_t ivas_get_nchan_buffers_dec(
        }
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        nchan_out_buff = max( nchan_out_buff, st_ivas->hSplitBinRend.splitrend.multiBinPoseData.num_poses * BINAURAL_CHANNELS );
    }
#endif

    return nchan_out_buff;
}
+6 −5
Original line number Diff line number Diff line
@@ -60,13 +60,12 @@
#define MAX_BUFFER_LENGTH       ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS )
#define MAX_CLDFB_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS )
#define MAX_BIN_BUFFER_LENGTH   ( MAX_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS )

#define MAX_BIN_DELAY_SAMPLES 50 /* Maximum supported rendering latency for binaural IRs */

#else
#define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS )
#endif

#define MAX_BIN_DELAY_SAMPLES 50 /* Maximum supported rendering latency for binaural IRs */

/* Frame size required when rendering to binaural */
#define BINAURAL_RENDERING_FRAME_SIZE_MS 20

@@ -1445,7 +1444,7 @@ static ivas_error setRendInputActiveIsm(
        }
        if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, &inputIsm->tdRendWrapper.hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
            if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, inputIsm->tdRendWrapper.hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -8005,11 +8004,13 @@ static void renderMasaToBinaural(

    ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels );

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( is_split_rend_mode )
    {
        accumulateCLDFBArrayToBuffer( masaInput->decDummy->hSplitBinRend.hMultiBinCldfbData->Cldfb_RealBuffer_Binaural, masaInput->decDummy->hSplitBinRend.hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural, &outAudio );
    }
    else
#endif
    {
#ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP
        accumulate2dArrayToBuffer( tmpBuffer_buff, &outAudio );