Commit 6f4f3f4e authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Conversions related to IGFEncApplyStereo added

[x] Cleaned up IGFEncApplyStereo_fx
[x] Converted IGF_Whitening_ivas_fx
parent 91f864a9
Loading
Loading
Loading
Loading
Loading
+0 −42
Original line number Diff line number Diff line
@@ -7446,27 +7446,6 @@ void ProcessIGF(
    const int16_t sp_aud_decision0, /* i  : first stage switching decision             */
    const int16_t vad_hover_flag    /* i  : VAD hangover flag                          */
);
#ifdef IVAS_FLOAT_FIXED
void ProcessStereoIGF_fx(
    STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct,
    Encoder_State *sts[CPE_CHANNELS], /* i  : Encoder state                           */
    int16_t ms_mask[2][MAX_SFB],      /* i  : bandwise MS mask                        */
#if 1
    Word32 *pITFMDCTSpectrum_fx[CPE_CHANNELS][NB_DIV],    /* i  : MDCT spectrum fir ITF                   */
    Word32 *pPowerSpectrum_fx[CPE_CHANNELS],              /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    Word32 *pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i  : inverse power spectrum                  */
    Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV],        /* i  : inverse spectrum                        */
#endif
    float *pITFMDCTSpectrum[CPE_CHANNELS][NB_DIV],    /* i  : MDCT spectrum fir ITF                   */
    float *pPowerSpectrum[CPE_CHANNELS],              /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    float *pPowerSpectrumMsInv[CPE_CHANNELS][NB_DIV], /* i  : inverse power spectrum                  */
    float *inv_spectrum[CPE_CHANNELS][NB_DIV],        /* i  : inverse spectrum                        */
    const int16_t frameno,                            /* i  : flag indicating index of current subfr. */
    const int16_t sp_aud_decision0,                   /* i  : sp_aud_decision0                        */
    const int32_t element_brate,                      /* i  : element bitrate                         */
    const int16_t mct_on                              /* i  : flag mct block (1) or stereo (0)        */
);
#endif // IVAS_FLOAT_FIXED
void ProcessStereoIGF(
    STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct,
@@ -10005,27 +9984,6 @@ void IGFEncApplyMono(
    const int16_t sp_aud_decision0, /* i  : first stage switching decision                         */
    const int16_t vad_hover_flag    /* i  : VAD hangover flag                                      */
);
#ifdef IVAS_FLOAT_FIXED
void IGFEncApplyStereo_fx(
    STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct,              /* i/o: MDCT stereo encoder structure           */
    int16_t ms_mask[2][MAX_SFB],                          /* i  : bandwise MS mask                        */
    const IGF_ENC_INSTANCE_HANDLE hIGFEnc[CPE_CHANNELS],  /* i  : instance handle of IGF Encoder          */
    const int16_t igfGridIdx,                             /* i  : IGF grid index                          */
    Encoder_State *sts[CPE_CHANNELS],                     /* i  : Encoder state                           */
    Word32 *pPowerSpectrum_fx[CPE_CHANNELS],              /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    Word32 *pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i/o: inverse power spectrum                  */
    Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV],        /* i  : inverse spectrum                        */
#if 1
    float *pPowerSpectrum[CPE_CHANNELS],              /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    float *pPowerSpectrumMsInv[CPE_CHANNELS][NB_DIV], /* i/o: inverse power spectrum                  */
    float *inv_spectrum[CPE_CHANNELS][NB_DIV],        /* i  : inverse spectrum                        */
#endif
    const int16_t frameno,          /* i  : flag indicating index of current subfr. */
    const int16_t sp_aud_decision0, /* i  : sp_aud_decision0                        */
    const int32_t element_brate,    /* i  : element bitrate                         */
    const int16_t mct_on            /* i  : flag mct block (1) or stereo (0)        */
);
#endif // IVAS_FLOAT_FIXED
void IGFEncApplyStereo(
    STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct,             /* i/o: MDCT stereo encoder structure               */
+36 −0
Original line number Diff line number Diff line
@@ -10108,5 +10108,41 @@ Word32 sum2_32_fx(
    const Word32 *vec, /* i  : input vector                          */
    const Word16 lvec, /* i  : length of input vector                */
    Word16 *e );
#ifdef IVAS_FLOAT_FIXED
void ProcessStereoIGF_fx(
    STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct,
    Encoder_State *sts[CPE_CHANNELS], /* i  : Encoder state                           */
    int16_t ms_mask[2][MAX_SFB],      /* i  : bandwise MS mask                        */
#if 1
    Word32 *pITFMDCTSpectrum_fx[CPE_CHANNELS][NB_DIV],    /* i  : MDCT spectrum fir ITF                   */
    Word32 *pPowerSpectrum_fx[CPE_CHANNELS],              /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    Word32 *pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i  : inverse power spectrum                  */
    Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV],        /* i  : inverse spectrum                        */
#endif
    float *pITFMDCTSpectrum[CPE_CHANNELS][NB_DIV],    /* i  : MDCT spectrum fir ITF                   */
    float *pPowerSpectrum[CPE_CHANNELS],              /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    float *pPowerSpectrumMsInv[CPE_CHANNELS][NB_DIV], /* i  : inverse power spectrum                  */
    float *inv_spectrum[CPE_CHANNELS][NB_DIV],        /* i  : inverse spectrum                        */
    const int16_t frameno,                            /* i  : flag indicating index of current subfr. */
    const int16_t sp_aud_decision0,                   /* i  : sp_aud_decision0                        */
    const int32_t element_brate,                      /* i  : element bitrate                         */
    const int16_t mct_on                              /* i  : flag mct block (1) or stereo (0)        */
);
void IGFEncApplyStereo_fx(
    STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct,              /* i/o: MDCT stereo encoder structure           */
    Word16 ms_mask[2][MAX_SFB],                           /* i  : bandwise MS mask                        */
    const IGF_ENC_INSTANCE_HANDLE hIGFEnc[CPE_CHANNELS],  /* i  : instance handle of IGF Encoder          */
    const Word16 igfGridIdx,                              /* i  : IGF grid index                          */
    Encoder_State *sts[CPE_CHANNELS],                     /* i  : Encoder state                           */
    Word32 *pPowerSpectrum_fx[CPE_CHANNELS],              /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    Word32 *pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i/o: inverse power spectrum                  */
    Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV],        /* i  : inverse spectrum                        */
    const Word16 frameno,                                 /* i  : flag indicating index of current subfr. */
    const Word16 sp_aud_decision0,                        /* i  : sp_aud_decision0                        */
    const Word32 element_brate,                           /* i  : element bitrate                         */
    const Word16 mct_on                                   /* i  : flag mct block (1) or stereo (0)        */
);

#endif // IVAS_FLOAT_FIXED

#endif
+497 −112

File changed.

Preview size limit exceeded, changes collapsed.

+6 −6
Original line number Diff line number Diff line
@@ -365,7 +365,7 @@ static void IGF_WriteEnvelope( /**< ou
/**********************************************************************/ /*
identifies significant spectral content
**************************************************************************/
static void IGF_ErodeSpectrum( Word16 *highPassEner_exp,                 /**< out:    | exponent of highPassEner       */
void IGF_ErodeSpectrum( Word16 *highPassEner_exp,                        /**< out:    | exponent of highPassEner       */
                        const IGF_ENC_INSTANCE_HANDLE hInstance,         /**< in:     | instance handle of IGF Encoder */
                        Word32 *pSpectrum,                               /**< in/out: | MDCT spectrum                  */
                        Word32 *pPowerSpectrum,                          /**< in/out: | power spectrum                 */
+0 −4
Original line number Diff line number Diff line
@@ -810,10 +810,6 @@ ivas_error init_encoder(

        st->hTcxEnc->spectrum[0] = st->hTcxEnc->spectrum_long;
        st->hTcxEnc->spectrum[1] = st->hTcxEnc->spectrum_long + N_TCX10_MAX;
#ifdef IVAS_FLOAT_FIXED
        st->hTcxEnc->spectrum_fx[0] = st->hTcxEnc->spectrum_long_fx;
        st->hTcxEnc->spectrum_fx[1] = st->hTcxEnc->spectrum_long_fx + N_TCX10_MAX;
#endif

        set_f( st->hTcxEnc->old_out, 0, L_FRAME32k );

Loading