Commit eedccddd authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR

parent cc206a23
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@
#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_1904_HARM_GSC_ENC                           /* VA: #1904 Harmonization of EVS and IVAS GSC code */
#define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR          /* Dolby: Remove unused psNoiseGen from ISAR */
#define FIX_1478_UNINIT_ON_BFI                          /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */
#define FIX_1495_INCORRECT_FREAD_CALL                   /* Eri: Switched size and number of elements in fread call. */
#define FIX_1486_INIT_OUTPUT_POINTERS                   /* FhG: always initialize pointers in renderer flush */
+0 −37
Original line number Diff line number Diff line
@@ -106,9 +106,6 @@ 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 );
@@ -605,9 +602,6 @@ 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;
@@ -769,12 +763,6 @@ void DeleteLCLDDecoder(
            psLCLDDecoder->psPredictionDecoder = NULL;
        }

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

        free( psLCLDDecoder );
    }
@@ -794,10 +782,6 @@ 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
#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 );
@@ -1021,10 +1005,6 @@ Word32 DecodeLCLDFrame(
                                psLCLDDecoder->pppiQLCLDReal[n],
                                psLCLDDecoder->pppiQLCLDImag[n],
                                pppfLCLDReal_fx[n], pppfLCLDImag_fx[n]
#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
                                ,
                                psLCLDDecoder->psNoiseGen
#endif
        );

        ReplaceSign_fx( psLCLDDecoder->iNumBlocks, psLCLDDecoder->iNumBands,
@@ -1296,10 +1276,6 @@ static void InvQuantizeSpectrum_fx(
    Word32 **ppiQImag,
    Word32 **ppfReal,
    Word32 **ppfImag
#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
    ,
    NoiseGen *psNoiseGen /* Pass in NULL to switch off noise gen */
#endif
)
{
    Word32 b, k, n;
@@ -1339,19 +1315,6 @@ static void InvQuantizeSpectrum_fx(
                        iFBOffset++;
                    }
                }
#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR
                ELSE IF( psNoiseGen != NULL )
                {
                    FOR( m = 0; m < piBandwidths[b]; m++ )
                    {
                        ppfReal[iBlockOffest][iFBOffset] = Mpy_32_16_1( GetNoise_fx( psNoiseGen ), 22938 ); // Q(14 + 15 -15 )=Q14
                        move32();
                        ppfImag[iBlockOffest][iFBOffset] = Mpy_32_16_1( GetNoise_fx( psNoiseGen ), 22938 ); // Q(14+ 15 -15 )=Q14
                        move32();
                        iFBOffset++;
                    }
                }
#endif
                ELSE
                {
                    iFBOffset = L_add( iFBOffset, piBandwidths[b] );
+0 −29
Original line number Diff line number Diff line
@@ -170,35 +170,6 @@ Word32 CountMSBits(
);


#ifndef FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR

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

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

void DeleteNoiseGen( 
    NoiseGen *psNoiseGen 
);

inline Word32 GetNoise_fx( NoiseGen *psNoiseGen )
{
    Word32 fNoiseSample;

    fNoiseSample = (Word32) (psNoiseGen->pfNoiseBuffer[psNoiseGen->iNoiseBufferIndex] * (1<<14));
    psNoiseGen->iNoiseBufferIndex++;
    psNoiseGen->iNoiseBufferIndex &= psNoiseGen->iNoiseBufferMask;

    return fNoiseSample;
}
#endif

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