From 738010b110ddeb0ef046c6fd5352d9771ac9a3f6 Mon Sep 17 00:00:00 2001 From: rtyag Date: Tue, 15 Aug 2023 16:21:47 +1000 Subject: [PATCH] 5 ms API cmd line arg --- apps/decoder.c | 18 +++++++++++++++++- apps/renderer.c | 26 ++++++++++++++++++++++++-- lib_com/options.h | 1 + 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index b46b6db31c..117180f838 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -152,7 +152,9 @@ typedef struct #endif uint16_t acousticEnvironmentId; uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; - +#ifdef API_5MS + bool framing_5ms; +#endif } DecArguments; @@ -950,6 +952,9 @@ static bool parseCmdlIVAS_dec( arg->delayCompensationEnabled = true; arg->voipMode = false; arg->complexityLevel = IVAS_DEC_COMPLEXITY_LEVEL_THREE; +#ifdef API_5MS + arg->framing_5ms = false; +#endif arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; @@ -1196,6 +1201,14 @@ static bool parseCmdlIVAS_dec( arg->inputFormat = IVAS_DEC_INPUT_FORMAT_MIME; i++; } +#ifdef API_5MS + else if ( strcmp( argv_to_upper, "-FR5" ) == 0 ) + { + arg->framing_5ms = true; + fprintf( stderr, "Warning: this is a placeholder for 5ms framing.\n" ); + i++; + } +#endif else if ( strcmp( argv_to_upper, "-T" ) == 0 ) { arg->enableHeadRotation = true; @@ -1529,6 +1542,9 @@ static void usage_dec( void ) #ifdef DEBUG_JBM_CMD_OPTION fprintf( stdout, "-VOIP_framesize : VoIP mode: acoustic frontend fetch frame size (must be multiples of 5!)\n" ); #endif +#endif +#ifdef API_5MS + fprintf( stdout, "-fr5 : option to perform rendering + head-tracking with 5ms frame size\n" ); #endif fprintf( stdout, "-fec_cfg_file : Optimal channel aware configuration computed by the JBM \n" ); fprintf( stdout, " as described in Section 6.3.1 of TS26.448. The output is \n" ); diff --git a/apps/renderer.c b/apps/renderer.c index 37bf0ea3d5..db9c0ced30 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -185,6 +185,9 @@ typedef struct bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; float syncMdDelay; +#ifdef API_5MS + bool framing_5ms; +#endif uint16_t directivityPatternId[RENDERER_MAX_ISM_INPUTS]; uint16_t acousticEnvironmentId; } CmdlnArgs; @@ -215,6 +218,9 @@ typedef enum #endif CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, +#ifdef API_5MS + CmdLnOptionId_framing5ms, +#endif CmdLnOptionId_syncMdDelay, CmdLnOptionId_directivityPatternId, CmdLnOptionId_acousticEnvironmentId @@ -357,6 +363,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "exof", .description = "External orientation trajectory file for simulation of external orientations", }, +#ifdef API_5MS + { + .id = CmdLnOptionId_framing5ms, + .match = "framing_5ms", + .matchShort = "fr5", + .description = "Render audio with 5 ms framing.", + }, +#endif { .id = CmdLnOptionId_syncMdDelay, .match = "sync_md_delay", @@ -2476,7 +2490,9 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); - +#ifdef API_5MS + args.framing_5ms = false; +#endif args.syncMdDelay = 0; for ( int32_t i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) @@ -2624,7 +2640,13 @@ static void parseOption( exit( -1 ); } break; - +#ifdef API_5MS + case CmdLnOptionId_framing5ms: + assert( numOptionValues == 0 ); + args->framing_5ms = true; + fprintf( stderr, "Warning: this is a placeholder for 5ms framing.\n" ); + break; +#endif case CmdLnOptionId_directivityPatternId: assert( numOptionValues <= RENDERER_MAX_ISM_INPUTS ); for ( int16_t i = 0; i < numOptionValues; ++i ) diff --git a/lib_com/options.h b/lib_com/options.h index 9769123af1..f706b241e3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,6 +172,7 @@ #define FIX_691_OSBA_CRASH /* FhG: Fix for issue 691: Crash for OSBA Stereo out */ #define FIX_694_OMASA_EXTREME /* Nokia: fix for crash in OMASA on extreme sample */ +#define API_5MS /*FhG, Dlb: add 5ms framing cmd line arg*/ /* ################## End BE DEVELOPMENT switches ######################### */ -- GitLab