Commit 2aa77ea7 authored by bayers's avatar bayers
Browse files

rename defines for fixes to contain the correct issue number, add skipping...

rename defines for fixes to contain the correct issue number, add skipping over unused head positions and external orientations fpor 20ms split rendering
parent 8d942cfa
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -2196,6 +2196,18 @@ static ivas_error decodeG192(
                fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                goto cleanup;
            }
            if ( !arg.enable5ms )
            {
                /* Skip over 3 following head positions - they are given on 5ms grid */
                for ( i = 0; i < 3; ++i )
                {
                    if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) );
                        exit( -1 );
                    }
                }
            }
        }

        if ( arg.enableExternalOrientation )
@@ -2220,6 +2232,19 @@ static ivas_error decodeG192(
                fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                goto cleanup;
            }

            if ( !arg.enable5ms )
            {
                /* Skip over 3 following entries in file - they are given on 5ms grid */
                for ( i = 0; i < 3; ++i )
                {
                    if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) );
                        exit( -1 );
                    }
                }
            }
        }

        /* decode and get samples */
+5 −6
Original line number Diff line number Diff line
@@ -163,12 +163,11 @@
// 5 ms branch switches start
// TODO: Check all switches in this section, remove if they were accepted
#define FIX_566_2DIR_MASA_384K                          /* Nokia: Issued 566:  Bugfix in 384k MASA metadata encoding of second direction */
#define FIX_XXX_HEADTRACKER_INIT                        /* FhG: move setting of orientation tracking type to earlier    */
#define FIX_XXX_ISM_SBA_ASAN                            /* FhG: fix asan in the access of the interpolator*/
#define FIX_XXX_JBM_USAN                                /* FhG: fix usan in acessing transport channel buffers */
#define FIX_XXX_PARAMISM_JBM_ENER_CORRECTION            /* FhG: fix energy correction in ParamISM rendering */
#define NONBE_FIX_589_JBM_TC_OFFSETS
#define FIX_JBM_MC2SBA                                  /* FhG: fix check for transport vs. internal channel count in JBM prior to ivas_mc2sba() */
#define FIX_551_HEADTRACKER_INIT                        /* FhG: move setting of orientation tracking type to earlier    */
#define FIX_678_ISM_SBA_ASAN                            /* FhG: fix asan in the access of the interpolator*/
#define FIX_676_JBM_USAN                                /* FhG: fix usan in acessing transport channel buffers */
#define FIX_591_PARAMISM_JBM_ENER_CORRECTION            /* FhG: fix energy correction in ParamISM rendering */
#define FIX_JBM_MC2SBA                                  /* FhG: fix issue #679: check for transport vs. internal channel count in JBM prior to ivas_mc2sba() */
#define API_5MS                                         /* FhG: 5ms rendering capability */
#ifdef API_5MS 
#define API_5MS_BASELINE                                /* FhG: baseline with 20ms rendering and split rendering through 20ms branch */
+2 −2
Original line number Diff line number Diff line
@@ -859,7 +859,7 @@ ivas_error ivas_init_decoder_front(
        {
            return error;
        }
#ifdef FIX_XXX_HEADTRACKER_INIT
#ifdef FIX_551_HEADTRACKER_INIT
        if ( ( error = ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hDecoderConfig->orientation_tracking ) ) != IVAS_ERR_OK )
        {
            return error;
@@ -1052,7 +1052,7 @@ ivas_error ivas_init_decoder(
        }
    }

#ifndef FIX_XXX_HEADTRACKER_INIT
#ifndef FIX_551_HEADTRACKER_INIT
    /*-----------------------------------------------------------------*
     * Set head/orientation tracking
     *-----------------------------------------------------------------*/
+3 −3
Original line number Diff line number Diff line
@@ -1181,7 +1181,7 @@ void ivas_param_ism_dec_digest_tc(
    int32_t ivas_total_brate;
#ifndef API_5MS
    int16_t output_frame;
#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION
#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION
    int16_t fade_len;
#endif
    float gain, ene_tc, ene_sum, grad;
@@ -1203,7 +1203,7 @@ void ivas_param_ism_dec_digest_tc(
    ene_tc = 0.0f;
    ene_sum = 0.0f;
    last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain;
#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION
#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION
    fade_len = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) );
    output_frame = nCldfbSlots * hSpatParamRendCom->num_freq_bands;
#else
@@ -1341,7 +1341,7 @@ void ivas_param_ism_dec_digest_tc(
        /* Smoothing */
        gain = 0.75f * gain + 0.25f * last_gain;
        /* 10ms ramp */
#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION
#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION
        grad = ( gain - last_gain ) / (float) fade_len; /* slope between two consecutive gains, 480 samples length */
        for ( i = 0; i < fade_len; i++ )
#else
+1 −1
Original line number Diff line number Diff line
@@ -778,7 +778,7 @@ ivas_error ivas_jbm_dec_render(
        p_output[n] = &output[n][0];
    }

#ifdef FIX_XXX_JBM_USAN
#ifdef FIX_676_JBM_USAN
    for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ )
#else
    for ( n = 0; n < st_ivas->hTcBuffer->nchan_transport_internal; n++ )
Loading