Commit 2d9392fc authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR

parent 8bb10624
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR          /* Dolby: remove unused noise generator from ISAR */
#define FIX_1495_INCORRECT_FREAD_CALL                   /* Eri: Switched size and number of elements in fread call. */
#define FIX_1494_SET_SPLITBFI_UNUSED                    /* Dolby: Fix issue 1494, remove unused function setting BFI flag in ISAR renderer */
#define FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE          /* Dolby: Fix for issue 1479, MSAN error due to uninitialized value in SPAR */
+0 −36
Original line number Diff line number Diff line
@@ -101,9 +101,6 @@ struct LCLD_DECODER
    int32_t ***pppiQLCLDImag;

    PredictionDecoder *psPredictionDecoder;
#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR
    NoiseGen *psNoiseGen;
#endif
};


@@ -583,9 +580,6 @@ 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;
@@ -747,12 +741,6 @@ void DeleteLCLDDecoder(
            psLCLDDecoder->psPredictionDecoder = NULL;
        }

#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR
        if ( psLCLDDecoder->psNoiseGen != NULL )
        {
            DeleteNoiseGen( psLCLDDecoder->psNoiseGen );
        }
#endif

        free( psLCLDDecoder );
    }
@@ -772,10 +760,6 @@ 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
#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 );
@@ -1033,10 +1017,6 @@ int32_t DecodeLCLDFrame(
                             psLCLDDecoder->pppiQLCLDReal[n],
                             psLCLDDecoder->pppiQLCLDImag[n],
                             pppfLCLDReal[n], pppfLCLDImag[n]
#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR
                             ,
                             psLCLDDecoder->psNoiseGen
#endif
        );

        ReplaceSign( psLCLDDecoder->iNumBlocks, psLCLDDecoder->iNumBands,
@@ -1187,10 +1167,6 @@ static void InvQuantizeSpectrum(
    int32_t **ppiQImag,
    float **ppfReal,
    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;
@@ -1226,18 +1202,6 @@ static void InvQuantizeSpectrum(
                        iFBOffset++;
                    }
                }
#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR
                else if ( psNoiseGen != NULL )
                {
                    for ( m = 0; m < piBandwidths[b]; m++ )
                    {
                        ppfReal[iBlockOffest][iFBOffset] = 0.7f * GetNoise( psNoiseGen );
                        ppfImag[iBlockOffest][iFBOffset] = 0.7f * GetNoise( psNoiseGen );

                        iFBOffset++;
                    }
                }
#endif
                else
                {
                    iFBOffset += piBandwidths[b];
+0 −30
Original line number Diff line number Diff line
@@ -164,36 +164,6 @@ int32_t CountMSBits(
    const int32_t *piMSPredCoef 
);

#ifndef FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR

/*----------------------------------------------------------------------------------*
 * NoiseGen prototypes
 *----------------------------------------------------------------------------------*/

typedef struct NOISE_GEN
{
    int32_t iNoiseBufferLength;
    int32_t iNoiseBufferMask;
    int32_t iNoiseBufferIndex;
    float *pfNoiseBuffer;
} NoiseGen;

void DeleteNoiseGen( 
    NoiseGen *psNoiseGen 
);

inline float GetNoise( NoiseGen *psNoiseGen )
{
    float fNoiseSample;

    fNoiseSample = psNoiseGen->pfNoiseBuffer[psNoiseGen->iNoiseBufferIndex];
    psNoiseGen->iNoiseBufferIndex++;
    psNoiseGen->iNoiseBufferIndex &= psNoiseGen->iNoiseBufferMask;

    return fNoiseSample;
}

#endif

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