Commit 4b6ee561 authored by vaclav's avatar vaclav
Browse files

changes under FIX_VE

parent a724899c
Loading
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -488,6 +488,13 @@ int main(
        }
    }

#ifdef FIX_VE
    if ( arg.renderFramesize != asked_frame_size )
    {
        fprintf( stderr, "\nChanged render framesize, only 20ms are allowed for decoding to split-rendering binaural output!\n" );
    }
#endif

    /*------------------------------------------------------------------------------------------*
     * Configure VoIP mode
     *------------------------------------------------------------------------------------------*/
@@ -2422,7 +2429,11 @@ static ivas_error decodeG192(
        }

        /* Head-tracking input simulation */
#ifdef FIX_VE
        if ( arg.enableHeadRotation )
#else
        if ( arg.enableHeadRotation || isSplitRend )
#endif
        {
            if ( headRotReader == NULL )
            {
@@ -2847,7 +2858,11 @@ static ivas_error decodeG192(
        }

        /* Head-tracking input simulation */
#ifdef FIX_VE
        if ( arg.enableHeadRotation )
#else
        if ( arg.enableHeadRotation || isSplitRend )
#endif
        {
            if ( headRotReader == NULL )
            {
+2 −0
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@
#define FIX_2278_OOB_INDEXING_IN_CLOSED_LOOP_PIT_SEARCH /* FhG: fix oob indexing USAN complaint */
#define FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE       /* FhG: correct allocation size for STEREO_MDCT_DEC_DATA struct */

#define FIX_VE

/* #################### End BE switches ################################## */

/* #################### Start NON-BE switches ############################ */
+17 −3
Original line number Diff line number Diff line
@@ -320,11 +320,18 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural(
        }
    }

#ifdef FIX_VE
    if ( pMultiBinPoseData->num_poses > 1 )
    {
#endif
        /* Save current head positions */
        for ( i = 0; i < st_ivas->hCombinedOrientationData->num_subframes; ++i )
        {
            originalHeadRot[i] = st_ivas->hCombinedOrientationData->Quaternions[i];
        }
#ifdef FIX_VE
    }
#endif

    original_subframes_rendered = st_ivas->hTcBuffer->subframes_rendered;
    original_slots_rendered = st_ivas->hTcBuffer->slots_rendered;
@@ -398,11 +405,18 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural(
        mvr2r( output_local[i], output[i], nSamplesRendered );
    }

#ifdef FIX_VE
    if ( pMultiBinPoseData->num_poses > 1 )
    {
#endif
    /* Restore original head rotation */
    for ( i = 0; i < st_ivas->hCombinedOrientationData->num_subframes; ++i )
    {
        st_ivas->hCombinedOrientationData->Quaternions[i] = originalHeadRot[i];
    }
#ifdef FIX_VE
    }
#endif

    /* restore original td renderer handle */
    st_ivas->hBinRendererTd = origTdRendHandle;
+15 −1
Original line number Diff line number Diff line
@@ -530,11 +530,12 @@ ivas_error IVAS_DEC_Configure(
    hDecoderConfig->Opt_aeid_on = acousticEnvironmentId != 65535 ? TRUE : FALSE;
    hDecoderConfig->Opt_ObjEdit_on = (int16_t) objEditEnabled;

#ifndef FIX_VE
    if ( outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        hDecoderConfig->Opt_Headrotation = 1;
    }

#endif
    if ( renderFramesize == IVAS_RENDER_FRAMESIZE_UNKNOWN )
    {
        return IVAS_ERR_WRONG_PARAMS;
@@ -593,8 +594,21 @@ ivas_error IVAS_DEC_EnableSplitRendering(

    hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig;

#ifdef FIX_VE
    if ( hDecoderConfig->Opt_Headrotation == 0 )
    {
        hIvasDec->st_ivas->hRenderConfig->split_rend_config.dof = 0;
        hIvasDec->st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
    }

    if ( hIvasDec->st_ivas->hRenderConfig->split_rend_config.dof != 0 )
    {
        hDecoderConfig->render_framesize = IVAS_RENDER_FRAMESIZE_20MS;
    }
#else
    hDecoderConfig->Opt_Headrotation = 1;
    hDecoderConfig->render_framesize = IVAS_RENDER_FRAMESIZE_20MS;
#endif

    return IVAS_ERR_OK;
}