diff --git a/lib_com/options.h b/lib_com/options.h index e11d5dffab853e09fe1daea965fdc29a823aa50d..0e313e5e932308543712e411f43df271b62bdf79 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -102,6 +102,7 @@ #define FIX_2319_CLDFB_INIT_FLAGS /* FhG: basop issue 2319: init hs->flags during openCldfb(), to avoid reading of uninitialized memory */ #define FIX_BASOP_2357_OBJECT_EDIT_MSAN /* Nokia: basop issue 2357: initialize missing exponents in object edit */ #define FIX_BASOP_2354_MSAN_DIFF_Q_VALUE /* Nokia: Initialize Q value of diffuseness in rendering to Q30 */ +#define FIX_2371_REMOVE_UNUSED_ISAR_FCNS /* Dolby: 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 bed0d5630bb924e2945941f4726b6095ac10bc65..cbc878b7c8dc9439af2c3aae0217579474bbe93e 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,7 @@ static inline Word32 LogAdd( return iRetVal; } +#endif /*------------------------------------------------------------------------------------------* * Function PerceptualModel() @@ -175,6 +177,9 @@ void PerceptualModel_fx( return; } + +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS + /*------------------------------------------------------------------------------------------* * Function PerceptualModel() * @@ -232,6 +237,8 @@ void PerceptualModel( return; } +#endif + /*------------------------------------------------------------------------------------------* * Function PerceptualModelStereo() @@ -239,6 +246,8 @@ void PerceptualModel( * *------------------------------------------------------------------------------------------*/ +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS + void PerceptualModelStereo( const Word32 iMaxQuantBands, const Word32 *piMSFlags, @@ -348,6 +357,9 @@ void PerceptualModelStereo( return; } + +#endif + void PerceptualModelStereo_fx( const Word32 iMaxQuantBands, const Word32 *piMSFlags, diff --git a/lib_isar/isar_PredDecoder.c b/lib_isar/isar_PredDecoder.c index 0f8ac0f0a072de6a0f11f28695079af2380c6c97..9023009efb32c18addd79bfaee446d3f4b9eacd6 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_RMSEnvGrouping.c b/lib_isar/isar_RMSEnvGrouping.c index c5a3b1ded7cac2e9675ad784d496fdcc1304e2e7..ab6237a5395da32f9392ece1f9dec1de41285aab 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, @@ -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_decoder.c b/lib_isar/isar_lcld_decoder.c index 5f41dd70782ecf242abb5d00ff557954735432f4..d4d6074f8f9ac193e3ec122bc05d036a94cf5f27 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 13dbb1a832447a3d5eddfedb5107469af0ff5d49..8f6ed398315a4e87bd5934513bc0d29971268057 100644 --- a/lib_isar/isar_lcld_encoder.c +++ b/lib_isar/isar_lcld_encoder.c @@ -135,7 +135,8 @@ static Word32 UnQuantize_fx( } return fVal_fx; } -static void PackReal( + +static void PackReal_fx( const Word32 iChannels, const Word32 iNumBlocks, Word32 ***pppfReal, @@ -159,6 +160,7 @@ static void PackReal( } } } + /*------------------------------------------------------------------------------------------* * Function CreateLCLDEncoder() * @@ -589,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 ) ) @@ -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 56dd08f6bdc6252dc95f18b1974a00186cfe235e..16acd9716f1f01405091dc0af10e5ed54ff22f1c 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; @@ -175,12 +176,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 +203,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 +214,7 @@ extern void PerceptualModelStereo( Word32 *piSMR0, Word32 *piSMR1 ); - +#endif /*----------------------------------------------------------------------------------* * PredEncoder/PredDecoder prototypes @@ -342,9 +346,11 @@ Word32 **GetDecodingFailedPrevStatus( LCLDDecoder *psLCLDDecoder ); +#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS void SetDecodingPassed( PredictionDecoder *psPredictionDecoder ); +#endif void UpdateDecodingUnresolved( PredictionDecoder *psPredictionDecoder diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index 7292f1a66cfe2c84772e4252ee0d9c14d3c3a8f2..04e80dc619d2be05d03c5a5f913bd8b82d8c4a4d 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; } @@ -1062,7 +1061,6 @@ ivas_error ISAR_POST_REND_FeedInputAudio( IF( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK ) { - printf( "Foo\n" ); return error; } @@ -1185,7 +1183,6 @@ ivas_error ISAR_POST_REND_FeedSplitBinauralBitstream( IF( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK ) { - printf( "Goo\n" ); return error; }