From 1e96b4bcbea1f1aaeb6b1f7e432229f734ca79d7 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Fri, 9 Jan 2026 14:38:08 +0100 Subject: [PATCH] remove unused code --- apps/renderer.c | 16 ++++++++++++++++ lib_com/options.h | 1 + lib_rend/lib_rend.h | 2 ++ lib_rend/lib_rend_fx.c | 9 +++++++++ 4 files changed, 28 insertions(+) diff --git a/apps/renderer.c b/apps/renderer.c index 70e68c757..c494ee0f1 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -172,7 +172,9 @@ typedef struct int16_t numInMetadataFiles; char outMetadataFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char headRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; +#ifndef FIX_1494_SET_SPLITBFI_UNUSED char splitRendBFIFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; +#endif char referenceVectorFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char externalOrientationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; @@ -223,7 +225,9 @@ typedef enum CmdLnOptionId_listFormats, CmdLnOptionId_inputGain, CmdLnOptionId_outputMetadata, +#ifndef FIX_1494_SET_SPLITBFI_UNUSED CmdLnOptionId_SplitRendBFIFile, +#endif CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, CmdLnOptionId_framing, @@ -282,12 +286,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "om", .description = "coded metadata file for BINAURAL_SPLIT_PCM output mode", }, +#ifndef FIX_1494_SET_SPLITBFI_UNUSED { .id = CmdLnOptionId_SplitRendBFIFile, .match = "post_rend_bfi_file", .matchShort = "prbfi", .description = "Split rendering option: bfi file", }, +#endif { .id = CmdLnOptionId_refRotFile, .match = "reference_rotation_file", @@ -763,7 +769,9 @@ int main( IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[RENDERER_MAX_INPUT_CHANNELS]; IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[RENDERER_MAX_INPUT_CHANNELS]; int16_t cldfb_in_flag, CLDFBframeSize_smpls; +#ifndef FIX_1494_SET_SPLITBFI_UNUSED SplitRendBFIFileReader *splitRendBFIReader = NULL; +#endif Vector3PairFileReader *referenceVectorReader = NULL; hrtfFileReader *hrtfFileReader = NULL; IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; @@ -893,11 +901,13 @@ int main( } } +#ifndef FIX_1494_SET_SPLITBFI_UNUSED if ( !isEmptyString( args.splitRendBFIFilePath ) ) { convert_backslash( args.splitRendBFIFilePath ); SplitRendBFIFileReader_open( args.splitRendBFIFilePath, &splitRendBFIReader ); } +#endif if ( !isEmptyString( args.externalOrientationFilePath ) ) { if ( RotationFileReader_open( args.externalOrientationFilePath, &externalOrientationFileReader ) != IVAS_ERR_OK ) @@ -2183,7 +2193,9 @@ cleanup: } split_rend_reader_writer_close( &hSplitRendFileReadWrite ); +#ifndef FIX_1494_SET_SPLITBFI_UNUSED SplitRendBFIFileReader_close( &splitRendBFIReader ); +#endif for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i ) { @@ -2785,7 +2797,9 @@ static CmdlnArgs defaultArgs( clearString( args.headRotationFilePath ); clearString( args.outMetadataFilePath ); +#ifndef FIX_1494_SET_SPLITBFI_UNUSED clearString( args.splitRendBFIFilePath ); +#endif clearString( args.referenceVectorFilePath ); clearString( args.referenceRotationFilePath ); clearString( args.customHrtfFilePath ); @@ -2892,10 +2906,12 @@ static void parseOption( assert( numOptionValues == 1 ); strncpy( args->outMetadataFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; +#ifndef FIX_1494_SET_SPLITBFI_UNUSED case CmdLnOptionId_SplitRendBFIFile: assert( numOptionValues == 1 ); strncpy( args->splitRendBFIFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; +#endif case CmdLnOptionId_referenceVectorFile: assert( numOptionValues == 1 ); strncpy( args->referenceVectorFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); diff --git a/lib_com/options.h b/lib_com/options.h index 6a07f86b9..85843d709 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -113,6 +113,7 @@ #define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR /* Dolby: Remove unused psNoiseGen from ISAR */ #define FIX_1478_UNINIT_ON_BFI /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */ #define FIX_1487_ACCESS_OF_UNINIT_VAL_FROM_ARR_ISM_DTX /* FhG/VA: init nb_bits_metadata to zero */ +#define FIX_1494_SET_SPLITBFI_UNUSED /* Dolby: Fix issue 1494, remove unused function setting BFI flag in ISAR renderer */ /* #################### End BE switches ################################## */ diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 5e202001a..ff8ce19bd 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -344,9 +344,11 @@ ivas_error IVAS_REND_SetReferenceVector( const IVAS_VECTOR3 refPos /* i : Reference position */ ); +#ifndef FIX_1494_SET_SPLITBFI_UNUSED ivas_error IVAS_REND_SetSplitRendBFI( IVAS_REND_HANDLE hIvasRend, const Word16 bfi); +#endif ivas_error IVAS_REND_SetExternalOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index eaed6ebf5..c0882c664 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -94,7 +94,9 @@ typedef struct const EFAP_WRAPPER *pEfapOutWrapper; IVAS_REND_HeadRotData *pHeadRotData; // for now removing the const qualifier TODO: will modify later const RENDER_CONFIG_HANDLE *hhRendererConfig; +#ifndef FIX_1494_SET_SPLITBFI_UNUSED const Word16 *pSplitRendBFI; +#endif const SPLIT_REND_WRAPPER *pSplitRendWrapper; const COMBINED_ORIENTATION_HANDLE *pCombinedOrientationData; const IVAS_DefaultReverbSize *pSelectedRoomReverbSize; @@ -216,7 +218,9 @@ struct IVAS_REND EFAP_WRAPPER efapOutWrapper; IVAS_LSSETUP_CUSTOM_STRUCT customLsOut; +#ifndef FIX_1494_SET_SPLITBFI_UNUSED Word16 splitRendBFI; +#endif SPLIT_REND_WRAPPER *splitRendWrapper; IVAS_REND_AudioBuffer splitRendEncBuffer; IVAS_REND_HeadRotData headRotData; @@ -1365,7 +1369,9 @@ static rendering_context getRendCtx( ctx.pEfapOutWrapper = &hIvasRend->efapOutWrapper; ctx.pHeadRotData = &hIvasRend->headRotData; ctx.hhRendererConfig = &hIvasRend->hRendererConfig; +#ifndef FIX_1494_SET_SPLITBFI_UNUSED ctx.pSplitRendBFI = &hIvasRend->splitRendBFI; +#endif ctx.pSplitRendWrapper = hIvasRend->splitRendWrapper; ctx.pCombinedOrientationData = &hIvasRend->hCombinedOrientationData; ctx.pSelectedRoomReverbSize = &hIvasRend->selectedRoomReverbSize; @@ -5758,6 +5764,7 @@ ivas_error IVAS_REND_DisableHeadRotation( return IVAS_ERR_OK; } +#ifndef FIX_1494_SET_SPLITBFI_UNUSED /*-------------------------------------------------------------------* * IVAS_REND_SetSplitRendBFI() @@ -5775,6 +5782,8 @@ ivas_error IVAS_REND_SetSplitRendBFI( return IVAS_ERR_OK; } +#endif + /*-------------------------------------------------------------------* * IVAS_REND_SetOrientationTrackingMode() -- GitLab