From 0487aa5e1cb0d966df3da0b97391c5632567bbbb Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 26 Jan 2026 09:34:51 +0100 Subject: [PATCH 1/7] remove obsolete unused ISAR-related fcns --- lib_com/options.h | 1 + lib_isar/isar_PerceptualModel.c | 11 ++++++++++- lib_isar/isar_lcld_prot.h | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index c7cd38dd8..b60412396 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -107,6 +107,7 @@ #define FIX_2330_CLANG_18_WARNINGS_REND /* FhG: Fix renderer warnings */ #define FIX_BASOP_2350_HARM_0B_BWE /* VA: basop issue 2350: harmonization of the 0b BWE */ #define FIX_2349_HARM_FIND_UV /* VA: basop issue 2349: harmonization of find_uv() function */ +#define FIX_2371_REMOVE_UNUSED_ISAR_FCNS /* Dolvy: basop issue 2371: remove unused ISAR-related functions */ /* #################### End BE switches ################################## */ diff --git a/lib_isar/isar_PerceptualModel.c b/lib_isar/isar_PerceptualModel.c index bed0d5630..aa0e8bd09 100644 --- a/lib_isar/isar_PerceptualModel.c +++ b/lib_isar/isar_PerceptualModel.c @@ -112,7 +112,6 @@ static inline Word32 LogAdd( return iRetVal; } - /*------------------------------------------------------------------------------------------* * Function PerceptualModel() * @@ -175,6 +174,9 @@ void PerceptualModel_fx( return; } + +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS + /*------------------------------------------------------------------------------------------* * Function PerceptualModel() * @@ -232,6 +234,8 @@ void PerceptualModel( return; } +#endif + /*------------------------------------------------------------------------------------------* * Function PerceptualModelStereo() @@ -239,6 +243,8 @@ void PerceptualModel( * *------------------------------------------------------------------------------------------*/ +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS + void PerceptualModelStereo( const Word32 iMaxQuantBands, const Word32 *piMSFlags, @@ -348,6 +354,9 @@ void PerceptualModelStereo( return; } + +#endif + void PerceptualModelStereo_fx( const Word32 iMaxQuantBands, const Word32 *piMSFlags, diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h index 56dd08f6b..fdb4d840a 100644 --- a/lib_isar/isar_lcld_prot.h +++ b/lib_isar/isar_lcld_prot.h @@ -175,12 +175,14 @@ Word32 CountMSBits( * PereptualModel prototypes *----------------------------------------------------------------------------------*/ +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS extern void PerceptualModel( const Word32 iMaxQuantBands, const Word32 *piRMSEnvelope, Word32 *piExcitation, Word32 *piSMR ); +#endif extern void PerceptualModel_fx( const Word32 iMaxQuantBands, @@ -200,6 +202,7 @@ extern void PerceptualModelStereo_fx( Word32 *piSMR1 ); +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS extern void PerceptualModelStereo( const Word32 iMaxQuantBands, const Word32 *piMSFlags, @@ -210,7 +213,7 @@ extern void PerceptualModelStereo( Word32 *piSMR0, Word32 *piSMR1 ); - +#endif /*----------------------------------------------------------------------------------* * PredEncoder/PredDecoder prototypes -- GitLab From 5b684737087d82df8839aa2d2c75f20916af30d4 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 26 Jan 2026 10:10:03 +0100 Subject: [PATCH 2/7] improve warning and error messages --- lib_isar/isar_RMSEnvGrouping.c | 8 ++++---- lib_isar/isar_lcld_encoder.c | 12 ++++++------ lib_isar/isar_lcld_prot.h | 3 ++- lib_isar/lib_isar_post_rend.c | 2 -- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib_isar/isar_RMSEnvGrouping.c b/lib_isar/isar_RMSEnvGrouping.c index c5a3b1ded..371f34230 100644 --- a/lib_isar/isar_RMSEnvGrouping.c +++ b/lib_isar/isar_RMSEnvGrouping.c @@ -867,8 +867,8 @@ static void LimitRMSEnvelope( IF( GT_32( iDelta, iRMSDeltaMax ) ) { -#ifdef DEBUG_VERBOSE - printf( "WARNING RMS envelope delta limited\n" ); +#ifdef DEBUGGING + printf( "Warning: RMS envelope delta limited!\n" ); #endif piRMSEnvelope[iBand] = L_add( L_sub( iDelta, iRMSDeltaMax ), piRMSEnvelope[iBand] ); } @@ -887,8 +887,8 @@ static void LimitRMSEnvelope( IF( LT_32( iDelta, iRMSDeltaMin ) ) { -#ifdef DEBUG_VERBOSE - printf( "WARNING RMS envelope delta limited\n" ); +#ifdef DEBUGGING + printf( "Warning: RMS envelope delta limited!\n" ); #endif piRMSEnvelope[iBand] = L_add( piRMSEnvelope[iBand], L_sub( iRMSDeltaMin, iDelta ) ); } diff --git a/lib_isar/isar_lcld_encoder.c b/lib_isar/isar_lcld_encoder.c index 13dbb1a83..18a1a6650 100644 --- a/lib_isar/isar_lcld_encoder.c +++ b/lib_isar/isar_lcld_encoder.c @@ -135,6 +135,7 @@ static Word32 UnQuantize_fx( } return fVal_fx; } + static void PackReal( const Word32 iChannels, const Word32 iNumBlocks, @@ -159,6 +160,7 @@ static void PackReal( } } } + /*------------------------------------------------------------------------------------------* * Function CreateLCLDEncoder() * @@ -770,6 +772,7 @@ Word32 EncodeLCLDFrame( return 0; } +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS /*------------------------------------------------------------------------------------------* * Function GetNumGroups() * @@ -780,7 +783,7 @@ Word32 GetNumGroups( LCLDEncoder *psLCLDEncoder ) { return psLCLDEncoder->piNumGroups[0]; } - +#endif /*------------------------------------------------------------------------------------------* * Local functions @@ -1850,7 +1853,7 @@ static Word32 WriteAllocInformation( IF( LT_32( iAllocOffset, MIN_ALLOC_OFFSET ) || GT_32( iAllocOffset, MAX_ALLOC_OFFSET ) ) { - printf( "Serious error\n" ); + printf( "Error in WriteAllocInformation() - iAllocOffset has incorrect value: %d!\n", iAllocOffset ); } ISAR_SPLIT_REND_BITStream_write_int32( pBits, L_sub( iAllocOffset, MIN_ALLOC_OFFSET ), ALLOC_OFFSET_BITS ); @@ -2090,10 +2093,7 @@ static Word32 ComputeAllocation( IF( LE_32( *piAllocOffset, MIN_ALLOC_OFFSET ) && GT_32( iBitsUsed, iAvailableBits ) ) { -#ifdef DEBUG_VERBOSE - printf( "Frame can not be coded with the number of bits available\n" ); -#endif - // iLastError = ENC_ERROR_STREAM_FAILURE; + printf( "Error in ComputeAllocation() - frame can not be coded with the number of bits available!\n" ); return -1; } ELSE IF( GE_32( *piAllocOffset, MAX_ALLOC_OFFSET ) && LT_32( iBitsUsed, iAvailableBits ) ) diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h index fdb4d840a..073838f33 100644 --- a/lib_isar/isar_lcld_prot.h +++ b/lib_isar/isar_lcld_prot.h @@ -65,10 +65,11 @@ Word32 EncodeLCLDFrame( Word16 *q_final ); +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS Word32 GetNumGroups( LCLDEncoder *psLCLDEncoder ); - +#endif typedef struct LCLD_DECODER LCLDDecoder; diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index 7292f1a66..544ff25ca 100644 --- a/lib_isar/lib_isar_post_rend.c +++ b/lib_isar/lib_isar_post_rend.c @@ -1062,7 +1062,6 @@ ivas_error ISAR_POST_REND_FeedInputAudio( IF( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK ) { - printf( "Foo\n" ); return error; } @@ -1185,7 +1184,6 @@ ivas_error ISAR_POST_REND_FeedSplitBinauralBitstream( IF( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK ) { - printf( "Goo\n" ); return error; } -- GitLab From 4bb07b2e7f53890298dbdd4c5a6b7e5ee94adf8f Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 26 Jan 2026 10:21:57 +0100 Subject: [PATCH 3/7] improve formatting, name conventions --- lib_isar/isar_RMSEnvGrouping.c | 2 +- lib_isar/isar_lcld_decoder.c | 2 +- lib_isar/isar_lcld_encoder.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_isar/isar_RMSEnvGrouping.c b/lib_isar/isar_RMSEnvGrouping.c index 371f34230..ab6237a53 100644 --- a/lib_isar/isar_RMSEnvGrouping.c +++ b/lib_isar/isar_RMSEnvGrouping.c @@ -49,7 +49,7 @@ * *-------------------------------------------------------------------*/ -Word32 Inv_grp_length[17] = { +static const Word32 Inv_grp_length[17] = { // Q31 0, 2147483647, diff --git a/lib_isar/isar_lcld_decoder.c b/lib_isar/isar_lcld_decoder.c index 5f41dd707..d4d6074f8 100644 --- a/lib_isar/isar_lcld_decoder.c +++ b/lib_isar/isar_lcld_decoder.c @@ -1563,7 +1563,7 @@ static Word32 ReadMSInformation( } ELSE { - printf( "ERROR UNSUPPORTED MS MODE\n" ); + printf( "Error in ReadMSInformation() - unsupported MS mode information!\n" ); } return iBitsRead; diff --git a/lib_isar/isar_lcld_encoder.c b/lib_isar/isar_lcld_encoder.c index 18a1a6650..8f6ed3983 100644 --- a/lib_isar/isar_lcld_encoder.c +++ b/lib_isar/isar_lcld_encoder.c @@ -136,7 +136,7 @@ static Word32 UnQuantize_fx( return fVal_fx; } -static void PackReal( +static void PackReal_fx( const Word32 iChannels, const Word32 iNumBlocks, Word32 ***pppfReal, @@ -591,7 +591,7 @@ Word32 EncodeLCLDFrame( assert( available_bits <= pBits->buf_len * 8 ); IF( EQ_32( psLCLDEncoder->iRealOnlyOut, 1 ) ) { - PackReal( psLCLDEncoder->iChannels, psLCLDEncoder->iNumBlocks * 2, pppfLCLDReal_fx, pppfLCLDImag_fx ); + PackReal_fx( psLCLDEncoder->iChannels, psLCLDEncoder->iNumBlocks * 2, pppfLCLDReal_fx, pppfLCLDImag_fx ); } /* Do MS calc here */ IF( EQ_32( psLCLDEncoder->iChannels, 2 ) ) -- GitLab From 73b0e0f5ed0404f2093f9334790ca8a9b9da0b19 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 26 Jan 2026 10:22:44 +0100 Subject: [PATCH 4/7] remove unused functions --- lib_isar/isar_PredDecoder.c | 3 ++- lib_isar/isar_lcld_prot.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib_isar/isar_PredDecoder.c b/lib_isar/isar_PredDecoder.c index 0f8ac0f0a..9023009ef 100644 --- a/lib_isar/isar_PredDecoder.c +++ b/lib_isar/isar_PredDecoder.c @@ -359,7 +359,7 @@ Word16 ReadPredictors_fx( return iBitsRead; } - +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS /* PLC_IMPROVEMENT */ void SetDecodingPassed( PredictionDecoder *psPredictionDecoder ) @@ -376,6 +376,7 @@ void SetDecodingPassed( return; } +#endif Word32 AnyDecodingUnresolved( diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h index 073838f33..16acd9716 100644 --- a/lib_isar/isar_lcld_prot.h +++ b/lib_isar/isar_lcld_prot.h @@ -346,9 +346,11 @@ Word32 **GetDecodingFailedPrevStatus( LCLDDecoder *psLCLDDecoder ); +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS void SetDecodingPassed( PredictionDecoder *psPredictionDecoder ); +#endif void UpdateDecodingUnresolved( PredictionDecoder *psPredictionDecoder -- GitLab From 82c404f64eae736aaaacb3fa3c09545df4182183 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 26 Jan 2026 10:34:14 +0100 Subject: [PATCH 5/7] clear debugging message --- lib_isar/lib_isar_post_rend.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index 544ff25ca..04e80dc61 100644 --- a/lib_isar/lib_isar_post_rend.c +++ b/lib_isar/lib_isar_post_rend.c @@ -773,7 +773,6 @@ ivas_error ISAR_POST_REND_SetInputGain( IF( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK ) { - printf( "Hoo\n" ); return error; } -- GitLab From df08d1a47022bf77489d024230b7143681cdcdd3 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 26 Jan 2026 12:37:33 +0100 Subject: [PATCH 6/7] remove LogAdd() - duplicate --- lib_isar/isar_PerceptualModel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib_isar/isar_PerceptualModel.c b/lib_isar/isar_PerceptualModel.c index aa0e8bd09..cbc878b7c 100644 --- a/lib_isar/isar_PerceptualModel.c +++ b/lib_isar/isar_PerceptualModel.c @@ -83,6 +83,7 @@ static inline Word16 LogAdd_fx( return iRetVal; } +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS /*------------------------------------------------------------------------------------------* * Function LogAdd() @@ -112,6 +113,8 @@ static inline Word32 LogAdd( return iRetVal; } +#endif + /*------------------------------------------------------------------------------------------* * Function PerceptualModel() * -- GitLab From a45433772b0ff40ac1f9cfb14859a8935b96af12 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 26 Jan 2026 12:37:59 +0100 Subject: [PATCH 7/7] typo --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index b60412396..f92f8221a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -107,7 +107,7 @@ #define FIX_2330_CLANG_18_WARNINGS_REND /* FhG: Fix renderer warnings */ #define FIX_BASOP_2350_HARM_0B_BWE /* VA: basop issue 2350: harmonization of the 0b BWE */ #define FIX_2349_HARM_FIND_UV /* VA: basop issue 2349: harmonization of find_uv() function */ -#define FIX_2371_REMOVE_UNUSED_ISAR_FCNS /* Dolvy: basop issue 2371: remove unused ISAR-related functions */ +#define FIX_2371_REMOVE_UNUSED_ISAR_FCNS /* Dolby: basop issue 2371: remove unused ISAR-related functions */ /* #################### End BE switches ################################## */ -- GitLab