Commit 7c6c5c47 authored by vaclav's avatar vaclav
Browse files

address reviewer's comments

parent d128bc21
Loading
Loading
Loading
Loading
+0 −60
Original line number Diff line number Diff line
@@ -2415,7 +2415,6 @@ static ivas_error decodeG192(
            }
        }

#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
        IVAS_RENDER_NUM_SUBFR num_subframes;
        if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK )
        {
@@ -2423,15 +2422,6 @@ static ivas_error decodeG192(
            goto cleanup;
        }

#else
        int16_t num_subframes;
        if ( ( error = IVAS_DEC_GetNumOrientationSubframes( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetNumOrientationSubframes failed: \n" );
            goto cleanup;
        }
#endif

        /* Head-tracking input simulation */
        if ( arg.enableHeadRotation )
        {
@@ -2439,11 +2429,7 @@ static ivas_error decodeG192(

            if ( headRotReader == NULL )
            {
#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
                for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
                for ( i = 0; i < num_subframes; i++ )
#endif
                {
                    Quaternions[i].w = -3.0f;
                    Quaternions[i].x = 0.0f;
@@ -2456,11 +2442,7 @@ static ivas_error decodeG192(
            }
            else
            {
#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
                for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
                for ( i = 0; i < num_subframes; i++ )
#endif
                {
                    if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK )
                    {
@@ -2470,11 +2452,7 @@ static ivas_error decodeG192(
                }
            }

#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
            for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
            for ( i = 0; i < num_subframes; i++ )
#endif
            {
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK )
                {
@@ -2492,11 +2470,7 @@ static ivas_error decodeG192(
            int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES];
            int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES];

#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
            for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
            for ( i = 0; i < num_subframes; i++ )
#endif
            {
                if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK )
                {
@@ -2505,11 +2479,7 @@ static ivas_error decodeG192(
                }
            }

#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
            for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
            for ( i = 0; i < num_subframes; i++ )
#endif
            {
                if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions[i], enableHeadRotation[i], enableExternalOrientation[i], enableRotationInterpolation[i], numFramesToTargetOrientation[i], i ) ) != IVAS_ERR_OK )
                {
@@ -3408,7 +3378,6 @@ static ivas_error decodeVoIP(
            }
        }

#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
        IVAS_RENDER_NUM_SUBFR num_subframes;
        if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK )
        {
@@ -3416,15 +3385,6 @@ static ivas_error decodeVoIP(
            goto cleanup;
        }

#else
        int16_t num_subframes;
        if ( ( error = IVAS_DEC_GetNumOrientationSubframes( hIvasDec, &num_subframes ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetNumOrientationSubframes failed: \n" );
            goto cleanup;
        }
#endif

        /* Head-tracking input simulation */
        if ( arg.enableHeadRotation )
        {
@@ -3432,11 +3392,7 @@ static ivas_error decodeVoIP(

            if ( headRotReader == NULL )
            {
#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
                for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
                for ( i = 0; i < num_subframes; i++ )
#endif
                {
                    Quaternions[i].w = -3.0f;
                    Quaternions[i].x = 0.0f;
@@ -3449,11 +3405,7 @@ static ivas_error decodeVoIP(
            }
            else
            {
#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
                for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
                for ( i = 0; i < num_subframes; i++ )
#endif
                {
                    if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK )
                    {
@@ -3464,11 +3416,7 @@ static ivas_error decodeVoIP(
                }
            }

#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
            for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
            for ( i = 0; i < num_subframes; i++ )
#endif
            {
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK )
                {
@@ -3486,11 +3434,7 @@ static ivas_error decodeVoIP(
            int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES];
            int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES];

#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
            for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
            for ( i = 0; i < num_subframes; i++ )
#endif
            {

                if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK )
@@ -3501,11 +3445,7 @@ static ivas_error decodeVoIP(
                }
            }

#ifdef FIX_945_REMOVE_DUPLICATED_API_FUNC
            for ( i = 0; i < (int16_t) num_subframes; i++ )
#else
            for ( i = 0; i < num_subframes; i++ )
#endif
            {
                if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions[i], enableHeadRotation[i], enableExternalOrientation[i], enableRotationInterpolation[i], numFramesToTargetOrientation[i], i ) ) != IVAS_ERR_OK )
                {
+1 −1
Original line number Diff line number Diff line
@@ -1145,7 +1145,7 @@ int main(

        /* ISAR frame size is set from command line, not renderer config file.
         * This will be ignored if output format is not split rendering. */
        renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) args.render_num_subframes * 5;
        renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) args.render_num_subframes * BINAURAL_RENDERING_FRAME_SIZE_MS;

        if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK )
        {
+0 −1
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_945_REMOVE_DUPLICATED_API_FUNC              /* VA: issue 945: remove duplicated API function for getting number of rendering subframes */


/* #################### End BE switches ################################## */
+0 −22
Original line number Diff line number Diff line
@@ -732,28 +732,6 @@ ivas_error IVAS_DEC_GetReferencesUpdateFrequency(
    return IVAS_ERR_OK;
}

#ifndef FIX_945_REMOVE_DUPLICATED_API_FUNC
/*---------------------------------------------------------------------*
 * IVAS_DEC_GetGetNumOrientationSubframes( )
 *
 * Get the number of subframes for head/external orientation per render frame
 *---------------------------------------------------------------------*/

ivas_error IVAS_DEC_GetNumOrientationSubframes(
    IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle   */
    int16_t *num_subframes    /* o  : render framesize      */
)
{
    if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || num_subframes == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

    *num_subframes = (int16_t) hIvasDec->st_ivas->hDecoderConfig->render_num_subframes;

    return IVAS_ERR_OK;
}
#endif

/*---------------------------------------------------------------------*
 * IVAS_DEC_EnableVoIP( )
+0 −7
Original line number Diff line number Diff line
@@ -375,13 +375,6 @@ ivas_error IVAS_DEC_GetReferencesUpdateFrequency(
    int16_t *update_frequency                   /* o  : update frequency                                                        */
);

#ifndef FIX_945_REMOVE_DUPLICATED_API_FUNC
ivas_error IVAS_DEC_GetNumOrientationSubframes(
    IVAS_DEC_HANDLE hIvasDec,                   /* i/o: IVAS decoder handle                                                     */
    int16_t *num_subframes                      /* o  : render framesize                                                        */
);

#endif
ivas_error IVAS_DEC_GetRenderFramesizeMs(
    IVAS_DEC_HANDLE hIvasDec,                   /* i/o: IVAS decoder handle                                                     */
    uint32_t *render_framesize_ms               /* o  : render framesize in ms                                                  */
Loading