Commit 76e51437 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch '439-orientation-tracking-parameter-aspects-common-api-types'...

Merge branch '439-orientation-tracking-parameter-aspects-common-api-types' into '439-orientation-tracking-parameter-aspects'

Moved HEAD_ORIENT_TRK_T to common_api_types.h to avoid including the private...

See merge request !643
parents 1958d7df 5b2ea567
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ int main(
    /*------------------------------------------------------------------------------------------*
     * Open decoder handle
     *------------------------------------------------------------------------------------------*/

#ifdef FIX_439_OTR_PARAMS
    if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.no_diegetic_pan ) ) != IVAS_ERR_OK )
#else
+24 −7
Original line number Diff line number Diff line
@@ -135,7 +135,11 @@ typedef struct
    char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
#ifdef FIX_439_OTR_PARAMS
    int8_t orientation_tracking;
#else
    int8_t orientationTracking;
#endif
    float noDiegeticPan;
    bool delayCompensationEnabled;
    bool quietModeEnabled;
@@ -708,7 +712,11 @@ int main(
        }
    }

#ifdef FIX_439_OTR_PARAMS
    if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientation_tracking ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientationTracking ) ) != IVAS_ERR_OK )
#endif
    {
        return error;
    }
@@ -1367,7 +1375,12 @@ static bool parseDiegeticPan(

static bool parseOrientationTracking(
    char *value,
    int8_t *tracking_type )
#ifdef FIX_439_OTR_PARAMS
    int8_t *orientation_tracking
#else
    int8_t *tracking_type
#endif
)
{

    to_upper( value );
@@ -1375,7 +1388,7 @@ static bool parseOrientationTracking(
    if ( strcmp( value, "NONE" ) == 0 )
    {
#ifdef FIX_439_OTR_PARAMS
        *tracking_type = HEAD_ORIENT_TRK_NONE;
        *orientation_tracking = HEAD_ORIENT_TRK_NONE;
#else
        *tracking_type = IVAS_ORIENT_TRK_NONE;
#endif
@@ -1383,7 +1396,7 @@ static bool parseOrientationTracking(
    else if ( strcmp( value, "REF" ) == 0 )
    {
#ifdef FIX_439_OTR_PARAMS
        *tracking_type = HEAD_ORIENT_TRK_REF;
        *orientation_tracking = HEAD_ORIENT_TRK_REF;
#else
        *tracking_type = IVAS_ORIENT_TRK_REF;
#endif
@@ -1391,7 +1404,7 @@ static bool parseOrientationTracking(
    else if ( strcmp( value, "AVG" ) == 0 )
    {
#ifdef FIX_439_OTR_PARAMS
        *tracking_type = HEAD_ORIENT_TRK_AVG;
        *orientation_tracking = HEAD_ORIENT_TRK_AVG;
#else
        *tracking_type = IVAS_ORIENT_TRK_AVG;
#endif
@@ -1399,7 +1412,7 @@ static bool parseOrientationTracking(
    else if ( strcmp( value, "REF_VEC" ) == 0 )
    {
#ifdef FIX_439_OTR_PARAMS
        *tracking_type = HEAD_ORIENT_TRK_REF_VEC;
        *orientation_tracking = HEAD_ORIENT_TRK_REF_VEC;
#else
        *tracking_type = IVAS_ORIENT_TRK_REF_VEC;
#endif
@@ -1407,7 +1420,7 @@ static bool parseOrientationTracking(
    else if ( strcmp( value, "REF_VEC_LEV" ) == 0 )
    {
#ifdef FIX_439_OTR_PARAMS
        *tracking_type = HEAD_ORIENT_TRK_REF_VEC_LEV;
        *orientation_tracking = HEAD_ORIENT_TRK_REF_VEC_LEV;
#else
        *tracking_type = IVAS_ORIENT_TRK_REF_VEC_LEV;
#endif
@@ -1635,7 +1648,7 @@ static CmdlnArgs defaultArgs(
    clearString( args.renderConfigFilePath );

#ifdef FIX_439_OTR_PARAMS
    args.orientationTracking = HEAD_ORIENT_TRK_NONE;
    args.orientation_tracking = HEAD_ORIENT_TRK_NONE;
#else
    args.orientationTracking = IVAS_ORIENT_TRK_NONE;
#endif
@@ -1739,7 +1752,11 @@ static void parseOption(
            break;
        case CmdLnOptionId_orientationTracking:
            assert( numOptionValues == 1 );
#ifdef FIX_439_OTR_PARAMS
            if ( !parseOrientationTracking( optionValues[0], &args->orientation_tracking ) )
#else
            if ( !parseOrientationTracking( optionValues[0], &args->orientationTracking ) )
#endif
            {
                fprintf( stderr, "Unknown option for orientation tracking: %s\n", optionValues[0] );
                exit( -1 );
+10 −0
Original line number Diff line number Diff line
@@ -93,6 +93,16 @@ typedef struct
    float x, y, z;
} IVAS_VECTOR3;

#ifdef FIX_439_OTR_PARAMS
typedef enum
{
  HEAD_ORIENT_TRK_NONE,
  HEAD_ORIENT_TRK_REF,
  HEAD_ORIENT_TRK_AVG,
  HEAD_ORIENT_TRK_REF_VEC,
  HEAD_ORIENT_TRK_REF_VEC_LEV
} HEAD_ORIENT_TRK_T;
#endif

typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE;
typedef struct ivas_masa_decoder_ext_out_meta_struct *MASA_DECODER_EXT_OUT_META_HANDLE;
+1 −10
Original line number Diff line number Diff line
@@ -1595,21 +1595,12 @@ typedef enum
} SFX_OpMode_t;


#ifndef FIX_439_OTR_PARAMS
/*----------------------------------------------------------------------------------*
 * Orientation tracking constants
 *----------------------------------------------------------------------------------*/

/* Orientation tracking types */
#ifdef FIX_439_OTR_PARAMS
typedef enum
{
    HEAD_ORIENT_TRK_NONE,
    HEAD_ORIENT_TRK_REF,
    HEAD_ORIENT_TRK_AVG,
    HEAD_ORIENT_TRK_REF_VEC,
    HEAD_ORIENT_TRK_REF_VEC_LEV
} HEAD_ORIENT_TRK_T;
#else
#define IVAS_ORIENT_TRK_NONE                    0
#define IVAS_ORIENT_TRK_REF                     1
#define IVAS_ORIENT_TRK_AVG                     2
+7 −5
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ ivas_error IVAS_DEC_Configure(
    const int16_t hrtfReaderEnabled,          /* i  : enable HRTF binary file input              */
    const int16_t enableHeadRotation,         /* i  : enable head rotation for binaural output   */
#ifdef FIX_439_OTR_PARAMS
    HEAD_ORIENT_TRK_T orientationTracking,    /* i  : head orientation tracking mode             */
    const HEAD_ORIENT_TRK_T orientation_tracking, /* i  : head orientation tracking type             */
#endif
    const int16_t renderConfigEnabled /* i  : enable Renderer config. file for binaural output */
)
@@ -453,7 +453,7 @@ ivas_error IVAS_DEC_Configure(
    hDecoderConfig->Opt_LsCustom = customLsOutputEnabled;
    hDecoderConfig->Opt_Headrotation = enableHeadRotation;
#ifdef FIX_439_OTR_PARAMS
    hDecoderConfig->orientation_tracking = orientationTracking;
    hDecoderConfig->orientation_tracking = orientation_tracking;
#endif
    hDecoderConfig->Opt_HRTF_binary = hrtfReaderEnabled;
    hDecoderConfig->Opt_RendConfigCustom = renderConfigEnabled;
@@ -2021,6 +2021,8 @@ static ivas_error printConfigInfo_dec(
                case HEAD_ORIENT_TRK_REF_VEC_LEV:
                    fprintf( stdout, "Orientation tracking:   REF_VEC_LEV\n" );
                    break;
                default:
                    break;
            }
        }
#else
Loading