diff --git a/apps/renderer.c b/apps/renderer.c index 0bc791bda8e4d94f11c241b63c8910c014520846..ed7a596c562c113f32f5b5ad675a19533d03d75f 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -174,6 +174,9 @@ typedef struct int8_t orientation_tracking; int16_t nonDiegeticPan; float nonDiegeticPanGain; +#ifdef FIX_706_REND_COMPLEXITY_LEVELS + IVAS_REND_COMPLEXITY_LEVEL complexityLevel; +#endif bool delayCompensationEnabled; bool quietModeEnabled; bool sceneDescriptionInput; @@ -207,6 +210,9 @@ typedef enum CmdLnOptionId_orientationTracking, CmdlnOptionId_lfePosition, CmdlnOptionId_lfeMatrix, +#ifdef FIX_706_REND_COMPLEXITY_LEVELS + CmdLnOptionId_complexityLevel, +#endif CmdLnOptionId_noDelayCmp, CmdLnOptionId_quietModeEnabled, CmdLnOptionId_inputMetadata, @@ -333,6 +339,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "ndc", .description = "[flag] Turn off delay compensation", }, +#ifdef FIX_706_REND_COMPLEXITY_LEVELS + { + .id = CmdLnOptionId_complexityLevel, + .match = "complexity_level", + .matchShort = "level", + .description = "Complexity level, level = (1, 2, 3), will be defined after characterisation.", + }, +#endif { .id = CmdLnOptionId_quietModeEnabled, .match = "quiet", @@ -2654,6 +2668,21 @@ static void parseOption( strncpy( args->inLfePanningMatrixFile, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); args->lfeCustomRoutingEnabled = true; break; +#ifdef FIX_706_REND_COMPLEXITY_LEVELS + case CmdLnOptionId_complexityLevel: + assert( numOptionValues == 1 ); + args->complexityLevel = (int32_t) ( strtol( optionValues[0], NULL, 10 ) ); + if ( args->complexityLevel < IVAS_REND_COMPLEXITY_LEVEL_ONE || args->complexityLevel > IVAS_REND_COMPLEXITY_LEVEL_THREE ) + { + fprintf( stdout, "Invalid complexity level specified.\n" ); + exit( -1 ); + } + else if ( args->complexityLevel == IVAS_REND_COMPLEXITY_LEVEL_ONE || args->complexityLevel == IVAS_REND_COMPLEXITY_LEVEL_TWO ) + { + fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); + } + break; +#endif case CmdLnOptionId_noDelayCmp: assert( numOptionValues == 0 ); args->delayCompensationEnabled = false; diff --git a/lib_com/options.h b/lib_com/options.h old mode 100755 new mode 100644 index 1864d5672d15d89f98cdf8e9cee6bcebf295c0a9..949bbb9333c19f47a90f1df5400c6f1038397f6d --- a/lib_com/options.h +++ b/lib_com/options.h @@ -178,6 +178,8 @@ #define FIX_LARGE_RENDERER_DELAY_COMP /* Fix renderer delay compensation with delays greater than 1 frame */ #define API_5MS /*FhG, Dlb: add 5ms framing cmd line arg*/ +#define FIX_706_REND_COMPLEXITY_LEVELS /* VoiceAge: Implement complexity levels to renderer */ + /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index c246f5e83003d24918851ddcdaf50b9fd12c7283..6a3b7e7eae6def57d643f175795fec95e6c571d2 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -120,6 +120,15 @@ typedef enum typedef uint16_t IVAS_REND_InputId; +#ifdef FIX_706_REND_COMPLEXITY_LEVELS +typedef enum _IVAS_REND_COMPLEXITY_LEVEL +{ + IVAS_REND_COMPLEXITY_LEVEL_ONE = 1, + IVAS_REND_COMPLEXITY_LEVEL_TWO = 2, + IVAS_REND_COMPLEXITY_LEVEL_THREE = 3 +} IVAS_REND_COMPLEXITY_LEVEL; +#endif + /* clang-format off */ /*----------------------------------------------------------------------------------*