diff --git a/Workspace_msvc/lib_isar.vcxproj b/Workspace_msvc/lib_isar.vcxproj index 5bee827041dc1972467edee3601f784b4573bba5..0a4ed6c01ff289283ba8b1dfa83c53a821cd917a 100644 --- a/Workspace_msvc/lib_isar.vcxproj +++ b/Workspace_msvc/lib_isar.vcxproj @@ -148,7 +148,6 @@ - diff --git a/Workspace_msvc/lib_isar.vcxproj.filters b/Workspace_msvc/lib_isar.vcxproj.filters index b2dc7ffc7029d125a21bb1988b115770e45b00c1..a416b60b55e6cee65ad6b8f44b133a496ec42aea 100644 --- a/Workspace_msvc/lib_isar.vcxproj.filters +++ b/Workspace_msvc/lib_isar.vcxproj.filters @@ -24,9 +24,6 @@ isar_c - - isar_c - isar_c diff --git a/lib_com/options.h b/lib_com/options.h index 9e2052b43b8b3a7b1414469911054d74ff74e0d6..249ebaeb3ec3e8819d941f9431c434c90f03eac5 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -185,6 +185,7 @@ #define FIX_1437_LC3PLUS_EXTREND_HIRES /* FhG: fix external renderer split bitstream header writing causing a crash for LC3plus High-res mode */ #define FIX_1318_ROOM_SIZE_CMD_LINE /* Philips/Nokia: Default room sizes support */ +#define FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR /* Dolby: remove unused noise generator from ISAR */ /* #################### End BE switches ################################## */ diff --git a/lib_isar/isar_NoiseGen.c b/lib_isar/isar_NoiseGen.c deleted file mode 100644 index 963cbd377ab4288df6b7f3737d85f23b0e83a0ff..0000000000000000000000000000000000000000 --- a/lib_isar/isar_NoiseGen.c +++ /dev/null @@ -1,55 +0,0 @@ -/****************************************************************************************************** - - (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository. All Rights Reserved. - - This software is protected by copyright law and by international treaties. - The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, - Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., - Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, - Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other - contributors to this repository retain full ownership rights in their respective contributions in - the software. This notice grants no license of any kind, including but not limited to patent - license, nor is any license granted by implication, estoppel or otherwise. - - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making - contributions. - - This software is provided "AS IS", without any express or implied warranties. The software is in the - development stage. It is intended exclusively for experts who have experience with such software and - solely for the purpose of inspection. All implied warranties of non-infringement, merchantability - and fitness for a particular purpose are hereby disclaimed and excluded. - - Any dispute, controversy or claim arising under or in relation to providing this software shall be - submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in - accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and - the United Nations Convention on Contracts on the International Sales of Goods. - -*******************************************************************************************************/ - -#include -#include "options.h" -#include -#include "prot.h" -#include "isar_lcld_prot.h" -#include "wmc_auto.h" - - -/*------------------------------------------------------------------------------------------* - * Function DeleteNoiseGen() - * - * - *------------------------------------------------------------------------------------------*/ - -void DeleteNoiseGen( NoiseGen *psNoiseGen ) -{ - free( psNoiseGen->pfNoiseBuffer ); - free( psNoiseGen ); - - return; -} - -extern float GetNoise( NoiseGen *psNoiseGen ); diff --git a/lib_isar/isar_lcld_decoder.c b/lib_isar/isar_lcld_decoder.c index 8d6931541fb0319ba9f8e0cab9dd67077a3e5583..773adb6acd6c6777c495076190a6a57ab7319a38 100644 --- a/lib_isar/isar_lcld_decoder.c +++ b/lib_isar/isar_lcld_decoder.c @@ -101,8 +101,9 @@ struct LCLD_DECODER int32_t ***pppiQLCLDImag; PredictionDecoder *psPredictionDecoder; - +#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR NoiseGen *psNoiseGen; +#endif }; @@ -582,7 +583,9 @@ ivas_error CreateLCLDDecoder( { return error; } +#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR psLCLDDecoder->psNoiseGen = NULL; /* CreateNoiseGen(); No noise fill for now*/ +#endif *psLCLDDecoder_out = psLCLDDecoder; return IVAS_ERR_OK; @@ -744,10 +747,12 @@ void DeleteLCLDDecoder( psLCLDDecoder->psPredictionDecoder = NULL; } +#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR if ( psLCLDDecoder->psNoiseGen != NULL ) { DeleteNoiseGen( psLCLDDecoder->psNoiseGen ); } +#endif free( psLCLDDecoder ); } @@ -766,7 +771,12 @@ static void ApplyRMSEnvelope( const int32_t iNumBands, const int32_t *piBandwidt static void ReplaceSign( const int32_t iNumBlocks, const int32_t iNumLCLDBands, int32_t **ppiSignReal, int32_t **ppiSignImag, float **ppfReal, float **ppfImag, const int32_t *piBandwidths ); -static void InvQuantizeSpectrum( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, int32_t **ppiAlloc, int32_t **ppiQReal, int32_t **ppiQImag, float **ppfReal, float **ppfImag, NoiseGen *psNoiseGen ); +static void InvQuantizeSpectrum( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, int32_t **ppiAlloc, int32_t **ppiQReal, int32_t **ppiQImag, float **ppfReal, float **ppfImag +#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR + , + NoiseGen *psNoiseGen +#endif +); static void InvMSCoding( const int32_t iNumBlocks, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t iMSMode, const int32_t *piMSFlags, const int32_t *piLRPhaseDiffs, const int32_t *piMSPredCoefs, float ***pppfReal, float ***pppfImag ); @@ -1022,8 +1032,12 @@ int32_t DecodeLCLDFrame( psLCLDDecoder->pppiAlloc[n], psLCLDDecoder->pppiQLCLDReal[n], psLCLDDecoder->pppiQLCLDImag[n], - pppfLCLDReal[n], pppfLCLDImag[n], - psLCLDDecoder->psNoiseGen ); + pppfLCLDReal[n], pppfLCLDImag[n] +#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR + , + psLCLDDecoder->psNoiseGen +#endif + ); ReplaceSign( psLCLDDecoder->iNumBlocks, psLCLDDecoder->iNumBands, psLCLDDecoder->pppiLCLDSignReal[n], @@ -1172,8 +1186,11 @@ static void InvQuantizeSpectrum( int32_t **ppiQReal, int32_t **ppiQImag, float **ppfReal, - float **ppfImag, + float **ppfImag +#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR + , NoiseGen *psNoiseGen /* Pass in NULL to switch off noise gen */ +#endif ) { int32_t b, k, n; @@ -1209,6 +1226,7 @@ static void InvQuantizeSpectrum( iFBOffset++; } } +#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR else if ( psNoiseGen != NULL ) { for ( m = 0; m < piBandwidths[b]; m++ ) @@ -1219,6 +1237,7 @@ static void InvQuantizeSpectrum( iFBOffset++; } } +#endif else { iFBOffset += piBandwidths[b]; diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h index 3e9c0527a91e33c318265825b91e905cd57ac05e..95c6adcb3421b7bfa845406b15a4125df027ffce 100644 --- a/lib_isar/isar_lcld_prot.h +++ b/lib_isar/isar_lcld_prot.h @@ -164,6 +164,7 @@ int32_t CountMSBits( const int32_t *piMSPredCoef ); +#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR /*----------------------------------------------------------------------------------* * NoiseGen prototypes @@ -192,6 +193,7 @@ inline float GetNoise( NoiseGen *psNoiseGen ) return fNoiseSample; } +#endif /*----------------------------------------------------------------------------------* * PereptualModel prototypes