Commit 27e69c71 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

Merge branch '1872-floating-point-leftovers-in-basop-main-ISAR' into 'main'

Remove unused psNoiseGen from ISAR

See merge request !2610
parents 10db1fb3 98b03f93
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -133,7 +133,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" />
+1 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@
#define FIX_1466_EXTREND                                /* FhG: float issue 1466: enable rendering of mono/stereo to other formats in the external renderer */
#define FIX_1381_BWD                                    /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */
#define FIX_2285_CODE_DECODER_INIT_BW                   /* VA: basop issue 2285: fix core-decoder initialization bandwidth */
#define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR              /* Dolby: Remove unused psNoiseGen from ISAR */

/* ##################### End NON-BE switches ########################### */

lib_isar/isar_NoiseGen.c

deleted100644 → 0
+0 −54
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 "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 );
+24 −5
Original line number Diff line number Diff line
@@ -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] );
+4 −2
Original line number Diff line number Diff line
@@ -170,6 +170,8 @@ Word32 CountMSBits(
);


#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR

/*----------------------------------------------------------------------------------*
 * NoiseGen prototypes
 *----------------------------------------------------------------------------------*/
@@ -196,7 +198,7 @@ inline Word32 GetNoise_fx( NoiseGen *psNoiseGen )

    return fNoiseSample;
}

#endif

/*----------------------------------------------------------------------------------*
 * PereptualModel prototypes