Commit a2a53c13 authored by bayers's avatar bayers
Browse files

Merge branch '1008-external-target-interpolation-different-between-5ms-and-20ms' into 'main'

Resolve "External target interpolation different between 5ms and 20ms"

See merge request !1411
parents af8fe377 cb068b4c
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@
/*#define MEM_COUNT_DETAILS*/                   /* Output detailed memory analysis for the worst-case frame (writes to the file "mem_analysis.csv") */

#ifdef DEBUGGING

/*#define DEBUG_MODE_INFO*/                         /* output most important parameters to the subdirectory "res/" */
#ifdef DEBUG_MODE_INFO
/*#define DEBUG_MODE_ACELP*/                    /* output most important ACELP core parameters to the subdirectory "res/" */
@@ -72,6 +71,7 @@
/*#define DEBUG_MODE_INFO_PLC */                /* define to output PLC related parameters */
/*#define DEBUG_MODE_INFO_ALLRAD*/              /* define to output generated HOA decoding mtx */
/*#define DEBUG_MODE_LFE */                     /* define to output LFE relevant parameters */
/*#define DEBUG_MODE_ORIENTATION */             /* define to output combined orientation relevant parameters */               
#endif

#ifdef DEBUG_MODE_MDCT
@@ -161,7 +161,7 @@
#define FIX_1003_PARAMISM_BINAURAL_RECONFIG_USAN        /* FhG: fix for #1003: fix USAN caused by ParamISM reconfig                    */
#define FIX_1001_ARI_HM_OVERFLOW                        /* FhG: fix for undef behaviour in in the harmonic TCX model arithmetic coder */
#define FIX_901_PARAMMC_DEAD_CODE                       /* FhG: issue 901: remove dead ParamMC code             */

#define FIX_1008_EXTORIENT_TARGET_INTERPOLATION          /* FhG: issue #1008, external orientation init was wrong for 5ms */


/* #################### End BE switches ################################## */
+14 −0
Original line number Diff line number Diff line
@@ -898,14 +898,18 @@ ivas_error ivas_combined_orientation_open(
    ( *hCombinedOrientationData )->num_subframes = num_subframes;
    ( *hCombinedOrientationData )->interpolationCoefficient = 1.0f;
    ( *hCombinedOrientationData )->interpolationIncrement = 1.0f;
#ifndef FIX_1008_EXTORIENT_TARGET_INTERPOLATION
    if ( num_subframes == 1 )
    {
        ( *hCombinedOrientationData )->maximumFramesToTargetOrientation = 2000;
    }
    else
    {
#endif
        ( *hCombinedOrientationData )->maximumFramesToTargetOrientation = 500;
#ifndef FIX_1008_EXTORIENT_TARGET_INTERPOLATION
    }
#endif
    ( *hCombinedOrientationData )->lrSwitchedNext = 0;
    ( *hCombinedOrientationData )->lrSwitchedCurrent = 0;
    ( *hCombinedOrientationData )->lrSwitchInterpVal = 0.0f;
@@ -1331,6 +1335,16 @@ ivas_error combine_external_and_head_orientations(
        }
    }

#ifdef DEBUG_MODE_ORIENTATION
    for ( i = 0; i < hCombinedOrientationData->num_subframes; i++ )
    {
        dbgwrite( &hCombinedOrientationData->enableCombinedOrientation[i], sizeof( int16_t ), 1, 1, "res/dec_orientation_enabled.dat" );
        dbgwrite( &( hCombinedOrientationData->Quaternions[i].w ), sizeof( float ), 1, 1, "res/dec_orientation_quaternion_w.dat" );
        dbgwrite( &( hCombinedOrientationData->Quaternions[i].x ), sizeof( float ), 1, 1, "res/dec_orientation_quaternion_x.dat" );
        dbgwrite( &( hCombinedOrientationData->Quaternions[i].y ), sizeof( float ), 1, 1, "res/dec_orientation_quaternion_y.dat" );
        dbgwrite( &( hCombinedOrientationData->Quaternions[i].z ), sizeof( float ), 1, 1, "res/dec_orientation_quaternion_z.dat" );
    }
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
    hCombinedOrientationData->sr_pose_pred_axis = sr_pose_pred_axis;
#endif