Commit e23c90a0 authored by Vidhya V P's avatar Vidhya V P
Browse files

Fixes for the updation of the branch with main

parent 077bc4b9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1395,8 +1395,8 @@ void ivas_binaural_cldfb_sf(
#ifdef FIX_SPLIT_REND_MERGE
                          st_ivas->hHeadTrackData,
#endif
#ifdef FIX_SPLIT_REND_MERGE
                          NULL,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                          &st_ivas->splitBinRend.splitrend.multiBinPoseData,
#endif
                          st_ivas->hCombinedOrientationData, subframeIdx, st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer );

+2 −19
Original line number Diff line number Diff line
@@ -70,9 +70,7 @@ ivas_error ivas_dec(
    float pan_left, pan_right;
    ivas_error error;
    float *p_output[MAX_OUTPUT_CHANNELS];
#ifdef FIX_BIT_EXACT
    int16_t i, j, k, l;
#endif

    error = IVAS_ERR_OK;

    push_wmops( "ivas_dec" );
@@ -763,22 +761,7 @@ ivas_error ivas_dec(
        hSplitBinRend = &st_ivas->splitBinRend;
        max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 );
        pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
#ifdef FIX_BIT_EXACT
        for ( i = 0; i < MAX_HEAD_ROT_POSES; i++ )
        {
            for ( j = 0; j < BINAURAL_CHANNELS; j++ )
            {
                for ( k = 0; k < CLDFB_NO_COL_MAX; k++ )
                {
                    for ( l = 0; l < CLDFB_NO_CHANNELS_MAX; l++ )
                    {
                        hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[i][j][k][l] = 0.0f;
                        hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[i][j][k][l] = 0.0f;
                    }
                }
            }
        }
#endif

        ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend,
                                            st_ivas->hHeadTrackData->Quaternions,
                                            st_ivas->hRenderConfig->split_rend_config.splitRendBitRate,
+23 −2
Original line number Diff line number Diff line
@@ -2937,7 +2937,7 @@ void ivas_dirac_dec_render_sf(
                          st_ivas->hHeadTrackData,
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
                          NULL,
                          &st_ivas->splitBinRend.splitrend.multiBinPoseData,
#endif
                          st_ivas->hCombinedOrientationData,
                          subframe_idx,
@@ -2946,7 +2946,28 @@ void ivas_dirac_dec_render_sf(
                          Cldfb_ImagBuffer_Binaural,
                          Cldfb_RealBuffer,
                          Cldfb_ImagBuffer );

#ifdef SPLIT_REND_WITH_HEAD_ROT
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CLDFB ) ||
             ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            int16_t pos_idx;
#ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG
            for ( pos_idx = 0; pos_idx < st_ivas->hBinRenderer->numPoses; pos_idx++ )
#else
            for ( pos_idx = 0; pos_idx < st_ivas->hBinRenderer->numPoses; pos_idx++ )
#endif
            {
                for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ )
                {
                    for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
                    {
                        mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->splitBinRend.hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[pos_idx][ch][index_slot + slot_idx], hDirAC->num_freq_bands );
                        mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->splitBinRend.hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[pos_idx][ch][index_slot + slot_idx], hDirAC->num_freq_bands );
                    }
                }
            }
        }
#endif
        /* Inverse CLDFB*/
        for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
        {
+36 −1
Original line number Diff line number Diff line
@@ -1422,12 +1422,13 @@ static ivas_error setRendInputActiveIsm(

    error = IVAS_ERR_OK;

    if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_IR
    if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL
#ifdef SPLIT_REND_LC3PLUS
         || outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CLDFB || outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
    )
    {
#ifndef FIX_SPLIT_REND_MERGE
        if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), hRendCfg,
                                            NULL, *rendCtx.pOutSampleRate
#ifdef SPLIT_REND_WITH_HEAD_ROT
@@ -1438,6 +1439,12 @@ static ivas_error setRendInputActiveIsm(
        {
            return error;
        }
#else
        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#endif
    }
    else if ( outConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || outConfig == IVAS_REND_AUDIO_CONFIG_MASA2 )
    {
@@ -1448,17 +1455,45 @@ static ivas_error setRendInputActiveIsm(
    }
    else
    {
#ifndef FIX_SPLIT_REND_MERGE
        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
        {
            return error;
        }
        if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
#else
        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
        {
            return error;
        }
        if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            
            if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
        else if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_IR)
        {
            if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), hRendCfg,
                                                NULL, *rendCtx.pOutSampleRate
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                ,
                                                1
#endif
                                                ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
#endif
    }