Commit a9612f73 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

Merge branch '1872-remove_unused_psNoiseGen_ISAR' into 'main'

Remove unused psNoiseGen from ISAR

See merge request !2423
parents 80419c47 4636a9eb
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -148,7 +148,6 @@
    <ClCompile Include="..\lib_isar\isar_lc3plus_enc.c" />
    <ClCompile Include="..\lib_isar\isar_lc3plus_payload.c" />
    <ClCompile Include="..\lib_isar\isar_MSPred.c" />
    <ClCompile Include="..\lib_isar\isar_NoiseGen.c" />
    <ClCompile Include="..\lib_isar\isar_PerceptualModel.c" />
    <ClCompile Include="..\lib_isar\isar_PredDecoder.c" />
    <ClCompile Include="..\lib_isar\isar_PredEncoder.c" />
+0 −3
Original line number Diff line number Diff line
@@ -24,9 +24,6 @@
    <ClCompile Include="..\lib_isar\isar_MSPred.c">
      <Filter>isar_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_isar\isar_NoiseGen.c">
      <Filter>isar_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_isar\isar_PerceptualModel.c">
      <Filter>isar_c</Filter>
    </ClCompile>
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@
#define FIX_2271_OOB_INDEXING_IN_PIT_OL2                /* VA: Fix for issue 2271, to silence clang18 */
#define FIX_2273_OOB_INDEXING_IN_PIT_FR4                /* VA: Fix to silence clang on ptr init */
#define FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR    /* Dolby: Fix for issue 1449: renderer frame size unclear in ISAR */
#define FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR          /* Dolby: remove unused noise generator from ISAR */

/* #################### End BE switches ################################## */

lib_isar/isar_NoiseGen.c

deleted100644 → 0
+0 −55
Original line number Diff line number Diff line
/******************************************************************************************************

   (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 <stdint.h>
#include "options.h"
#include <math.h>
#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 );
+24 −5
Original line number Diff line number Diff line
@@ -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];
Loading