Commit 52631efb authored by vaclav's avatar vaclav
Browse files

introduce TMP_FIX_SPLIT_REND

parent 0ae069f0
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -195,7 +195,8 @@

#define OBJ_EDITING_API                                /* object editing changes related to the API */
#ifdef OBJ_EDITING_API
#define FIX_HRTF_LOAD_API
#define FIX_HRTF_LOAD_API  // solves API conflicts between HRTF and object-editing features
#define TMP_FIX_SPLIT_REND // temporary fix to split-rendering (it follows the later state of the framework but it is needed now because of current test-conditions)
#endif

/* #################### End BASOP porting switches ############################ */
+17 −2
Original line number Diff line number Diff line
@@ -299,11 +299,12 @@ static ivas_error isar_set_split_rend_setup(
    splitRendBits->isar_frame_size_ms = 0;
    splitRendBits->lc3plus_highres = 0;

#ifndef TMP_FIX_SPLIT_REND
    if ( ( hSplitBinRend->hMultiBinCldfbData = (ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE) malloc( sizeof( ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA ) ) ) == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for split rendering structure" );
    }

#endif
    ISAR_PRE_REND_GetMultiBinPoseData( hSplitBinConfig, &hSplitBinRend->splitrend.multiBinPoseData, ( hCombinedOrientationData != NULL ) ? hCombinedOrientationData->sr_pose_pred_axis : DEFAULT_AXIS );

    if ( hCombinedOrientationData != NULL )
@@ -2207,8 +2208,9 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
            ivas_syn_output( pOutput, numSamplesPerChannelToDecode, st_ivas->hDecoderConfig->nchan_out, (int16_t *) pcmBuf_out );
    }

#ifndef TMP_FIX_SPLIT_REND
    free( st_ivas->hSplitBinRend->hMultiBinCldfbData );

#endif
    return error;
}

@@ -5198,6 +5200,11 @@ static void ivas_destroy_handle_isar(
{
    if ( *hSplitBinRend != NULL )
    {
#ifdef TMP_FIX_SPLIT_REND
        free( ( *hSplitBinRend )->hMultiBinCldfbData );
        ( *hSplitBinRend )->hMultiBinCldfbData = NULL;

#endif
        ISAR_PRE_REND_close( &( *hSplitBinRend )->splitrend, NULL );

        if ( ( *hSplitBinRend )->hCldfbDataOut != NULL )
@@ -5395,6 +5402,14 @@ static ivas_error ivas_dec_init_split_rend(
        cldfb_in_flag = 1;
    }

#ifdef TMP_FIX_SPLIT_REND
    /* note: this is intra-frame heap memory */
    if ( ( st_ivas->hSplitBinRend->hMultiBinCldfbData = (ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE) malloc( sizeof( ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA ) ) ) == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for split rendering structure" );
    }
#endif

    ISAR_PRE_REND_GetMultiBinPoseData( &st_ivas->hRenderConfig->split_rend_config, &st_ivas->hSplitBinRend->splitrend.multiBinPoseData, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->sr_pose_pred_axis : DEFAULT_AXIS );

    if ( cldfb_in_flag == 1 && ( st_ivas->hSplitBinRend->splitrend.multiBinPoseData.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) )