diff --git a/Workspace_msvc/lib_isar.vcxproj b/Workspace_msvc/lib_isar.vcxproj
index 0271901c88b4c9ad236ff5e34d925f4d7c107e4c..20c6363098f47d28ca0a42164bd532b2d263c17d 100644
--- a/Workspace_msvc/lib_isar.vcxproj
+++ b/Workspace_msvc/lib_isar.vcxproj
@@ -133,7 +133,6 @@
-
diff --git a/lib_com/options.h b/lib_com/options.h
index 0f23d808276c5d29a53d9809219a2a43c0a73d18..75ccc1d638b09749bb9706f2898c98093dab8b07 100644
--- a/lib_com/options.h
+++ b/lib_com/options.h
@@ -116,6 +116,7 @@
#define NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS /* Nokia: fix basop issue 2233: Fix differing rtpdump streams */
#define NONBE_FIX_2237_ZERO_CURR_NOISE_PROBLEM /* FhG: Modify sum of hTonalMDCTConc->curr_noise_nrg to avoid inaccurate zero */
+#define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR /* Dolby: Remove unused psNoiseGen from ISAR */
/* ################### End FIXES switches ########################### */
diff --git a/lib_isar/isar_NoiseGen.c b/lib_isar/isar_NoiseGen.c
deleted file mode 100644
index 363e758fffbdd642dc3aa4061bd3ee6ac13e2853..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_fx.h"
-#include "isar_lcld_prot.h"
-#include "wmc_auto.h"
-
-
-/*------------------------------------------------------------------------------------------*
- * Function DeleteNoiseGen()
- *
- *
- *------------------------------------------------------------------------------------------*/
-
-void DeleteNoiseGen( NoiseGen *psNoiseGen )
-{
- free( psNoiseGen->pfNoiseBuffer );
- free( psNoiseGen );
-
- return;
-}
-
-extern Word32 GetNoise_fx( NoiseGen *psNoiseGen );
diff --git a/lib_isar/isar_lcld_decoder.c b/lib_isar/isar_lcld_decoder.c
index 8bb931e3f7e6f23e1d26a6b8b2370691942ae692..85db837ce82f6937065fa00ea5d01e20bc8695d7 100644
--- a/lib_isar/isar_lcld_decoder.c
+++ b/lib_isar/isar_lcld_decoder.c
@@ -106,8 +106,9 @@ struct LCLD_DECODER
PredictionDecoder *psPredictionDecoder;
-
+#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
NoiseGen *psNoiseGen;
+#endif
};
static void CreateDecodeTable( LCLDDecoder *psLCLDDecoder, Word32 num, const UWord16 ( *ppuiEncTable )[2], Word32 iSize, Word32 iReadLength, UWord32 *iTables );
@@ -604,7 +605,9 @@ ivas_error CreateLCLDDecoder(
{
return error;
}
+#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
psLCLDDecoder->psNoiseGen = NULL; /* CreateNoiseGen(); No noise fill for now*/
+#endif
*psLCLDDecoder_out = psLCLDDecoder;
return IVAS_ERR_OK;
@@ -766,10 +769,12 @@ void DeleteLCLDDecoder(
psLCLDDecoder->psPredictionDecoder = NULL;
}
+#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
IF( psLCLDDecoder->psNoiseGen != NULL )
{
DeleteNoiseGen( psLCLDDecoder->psNoiseGen );
}
+#endif
free( psLCLDDecoder );
}
@@ -788,7 +793,12 @@ static void ApplyRMSEnvelope_fx( const Word32 iNumBands, const Word32 *piBandwid
static void ReplaceSign_fx( const Word32 iNumBlocks, const Word32 iNumLCLDBands, Word32 **ppiSignReal, Word32 **ppiSignImag, Word32 **ppfReal, Word32 **ppfImag, const Word32 *piBandwidths );
-static void InvQuantizeSpectrum_fx( const Word32 iNumGroups, const Word32 *piGroupLengths, const Word32 iNumBands, const Word32 *piBandwidths, Word32 **ppiAlloc, Word32 **ppiQReal, Word32 **ppiQImag, Word32 **ppfReal, Word32 **ppfImag, NoiseGen *psNoiseGen );
+static void InvQuantizeSpectrum_fx( const Word32 iNumGroups, const Word32 *piGroupLengths, const Word32 iNumBands, const Word32 *piBandwidths, Word32 **ppiAlloc, Word32 **ppiQReal, Word32 **ppiQImag, Word32 **ppfReal, Word32 **ppfImag
+#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
+ ,
+ NoiseGen *psNoiseGen
+#endif
+);
static void InvMSCoding_fx( const Word32 iNumBlocks, const Word32 iNumBands, const Word32 *piBandwidths, const Word32 iMSMode, const Word32 *piMSFlags, const Word32 *piLRPhaseDiffs, const Word32 *piMSPredCoefs, Word32 ***pppfReal, Word32 ***pppfImag );
@@ -1010,8 +1020,12 @@ Word32 DecodeLCLDFrame(
psLCLDDecoder->pppiAlloc[n],
psLCLDDecoder->pppiQLCLDReal[n],
psLCLDDecoder->pppiQLCLDImag[n],
- pppfLCLDReal_fx[n], pppfLCLDImag_fx[n],
- psLCLDDecoder->psNoiseGen );
+ pppfLCLDReal_fx[n], pppfLCLDImag_fx[n]
+#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
+ ,
+ psLCLDDecoder->psNoiseGen
+#endif
+ );
ReplaceSign_fx( psLCLDDecoder->iNumBlocks, psLCLDDecoder->iNumBands,
psLCLDDecoder->pppiLCLDSignReal[n],
@@ -1281,8 +1295,11 @@ static void InvQuantizeSpectrum_fx(
Word32 **ppiQReal,
Word32 **ppiQImag,
Word32 **ppfReal,
- Word32 **ppfImag,
+ Word32 **ppfImag
+#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
+ ,
NoiseGen *psNoiseGen /* Pass in NULL to switch off noise gen */
+#endif
)
{
Word32 b, k, n;
@@ -1322,6 +1339,7 @@ static void InvQuantizeSpectrum_fx(
iFBOffset++;
}
}
+#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
ELSE IF( psNoiseGen != NULL )
{
FOR( m = 0; m < piBandwidths[b]; m++ )
@@ -1333,6 +1351,7 @@ static void InvQuantizeSpectrum_fx(
iFBOffset++;
}
}
+#endif
ELSE
{
iFBOffset = L_add( iFBOffset, piBandwidths[b] );
diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h
index 00c1859014ae7a13afb5017d758721c0b235eef8..90d0c1d638d6af12d6023f75c56fe120055cfed3 100644
--- a/lib_isar/isar_lcld_prot.h
+++ b/lib_isar/isar_lcld_prot.h
@@ -170,6 +170,8 @@ Word32 CountMSBits(
);
+#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
+
/*----------------------------------------------------------------------------------*
* NoiseGen prototypes
*----------------------------------------------------------------------------------*/
@@ -190,13 +192,13 @@ inline Word32 GetNoise_fx( NoiseGen *psNoiseGen )
{
Word32 fNoiseSample;
- fNoiseSample = (Word32) (psNoiseGen->pfNoiseBuffer[psNoiseGen->iNoiseBufferIndex]* (1<<14));
+ fNoiseSample = (Word32) (psNoiseGen->pfNoiseBuffer[psNoiseGen->iNoiseBufferIndex] * (1<<14));
psNoiseGen->iNoiseBufferIndex++;
psNoiseGen->iNoiseBufferIndex &= psNoiseGen->iNoiseBufferMask;
return fNoiseSample;
}
-
+#endif
/*----------------------------------------------------------------------------------*
* PereptualModel prototypes