Commit 9752ce31 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'fft_mdct_warnings_fixes' into 'main'

Warning fixes and clean up in FFT and MDCT fix-pt files.

See merge request !23
parents 844cf055 94ea94f7
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ int main(
    {
      run_fft_unit_test();
      run_mdct_unit_test();
      return;
      return 0;
    }

    if ( !parseCmdlIVAS_dec( (int16_t) argc, argv, &arg ) )
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
#include <stdint.h>
#include "options.h"
#include <assert.h>
#include "prot.h"
#include "prot_fx2.h"
#include "ivas_cnst.h"
#include "wmc_auto.h"
#include "basop_util.h"
@@ -1030,7 +1030,7 @@ static void fft30_with_cmplx_data(cmplx * inp)
}

/*-------------------------------------------------------------------*
 * fft_cldfb()
 * fft_cldfb_fx()
 *
 * Interface functions FFT subroutines
 *--------------------------------------------------------------------*/
+12 −26
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@

#include <stdint.h>
#include "options.h"
#include "prot.h"
#include "prot_fx1.h"
#include "prot_fx2.h"
#include "ivas_prot_fx.h"
#include "ivas_rom_com_fx.h"
#ifdef DEBUGGING
#include "debug.h"
@@ -41,20 +41,6 @@
#include "ivas_stat_com.h"
#include "wmc_auto.h"

void ivas_get_twid_factors_fx1(
    const Word16 length,
    const Word16 **pTwid_re,
    const Word16 **pTwid_im );

void DoFFT_fx(
    Word32 *re2,
    Word32 *im2,
    const Word16 length );

Word32 ivas_get_mdct_scaling_gain_fx(
    const Word16 dct_len_by_2 );


/*------------------------------------------------------------------------------------------*
 * Local constants
 *------------------------------------------------------------------------------------------*/
@@ -119,7 +105,7 @@ void ivas_dct_windowing_fx(

    Copy32( pTemp_lfe, ( pOut_buf + fade_len + zero_pad_len ), dct_len );

    set_l(pOut_buf, zero_pad_len, 0);
    set32_fx(pOut_buf, 0, zero_pad_len);

    Copy32( ( pOut_buf + full_len - fade_len ), pBuffer_prev, fade_len );

@@ -135,7 +121,7 @@ void ivas_dct_windowing_fx(
        pOut_buf[zero_pad_len * 3 + fade_len + i] = Mult_32_32(pOut_buf[zero_pad_len * 3 + fade_len + i], pWindow_coeffs[fade_len - i - 1]);
    }

    set_l(&pOut_buf[full_len], frame_len - full_len, 0);
    set32_fx(&pOut_buf[full_len], 0, frame_len - full_len);

    return;
}
@@ -333,23 +319,23 @@ void ivas_get_twid_factors_fx1(
{
    IF ( EQ_16(length, 480) )
    {
        *pTwid_re = (Word16 *)&ivas_cos_twiddle_480_fx[0];
        *pTwid_im = (Word16 *)&ivas_sin_twiddle_480_fx[0];
        *pTwid_re = (const Word16 *)&ivas_cos_twiddle_480_fx[0];
        *pTwid_im = (const Word16 *)&ivas_sin_twiddle_480_fx[0];
    }
    ELSE IF ( EQ_16(length, 320) )
    {
        *pTwid_re = (Word16 *)&ivas_cos_twiddle_320_fx[0];
        *pTwid_im = (Word16 *)&ivas_sin_twiddle_320_fx[0];
        *pTwid_re = (const Word16 *)&ivas_cos_twiddle_320_fx[0];
        *pTwid_im = (const Word16 *)&ivas_sin_twiddle_320_fx[0];
    }
    ELSE IF ( EQ_16(length, 160) )
    {
        *pTwid_re = (Word16 *)&ivas_cos_twiddle_160_fx[0];
        *pTwid_im = (Word16 *)&ivas_sin_twiddle_160_fx[0];
        *pTwid_re = (const Word16 *)&ivas_cos_twiddle_160_fx[0];
        *pTwid_im = (const Word16 *)&ivas_sin_twiddle_160_fx[0];
    }
    ELSE IF ( EQ_16(length, 80 ) )
    {
        *pTwid_re = (Word16 *)&ivas_cos_twiddle_80_fx[0];
        *pTwid_im = (Word16 *)&ivas_sin_twiddle_80_fx[0];
        *pTwid_re = (const Word16 *)&ivas_cos_twiddle_80_fx[0];
        *pTwid_im = (const Word16 *)&ivas_sin_twiddle_80_fx[0];
    }
    ELSE
    {
+46 −10
Original line number Diff line number Diff line
@@ -45,15 +45,51 @@
#include "ivas_stat_com.h"
#include "ivas_error_utils.h"











void ivas_dct_windowing_fx(
    const Word16 fade_len,
    const Word16 full_len,
    const Word16 dct_len,
    const Word16 zero_pad_len,
    const Word32 *pWindow_coeffs,
    const Word16 frame_len,
    Word32 *pOut_buf,
    Word32 *pBuffer_prev,
    Word32 *pTemp_lfe
);

void ivas_get_twid_factors_fx1(
    const Word16 length,
    const Word16 **pTwid_re,
    const Word16 **pTwid_im
);

Word32 ivas_get_mdct_scaling_gain_fx(
    const Word16 dct_len_by_2 );

void ivas_imdct_fx(
    const Word32 *pIn,
    Word32 *pOut,
    const Word16 length,
    Word16 *q_out
);

void ivas_mdct_fx(
    const Word32 *pIn,
    Word32 *pOut,
    const Word16 length,
    Word16 *q_out
);

void ivas_itda_fx(
    const Word32 *re,     /* i  : time alised signal after IDCT       */
    Word32 *pOut,        /* o  : time domain buffer of size 2*length */
    const Word16 length /* i  : length of time alised signal buffer */
);

void ivas_tda_fx(
    const Word32 *pIn,    /* i  : time domain buffer of size 2*length */
    Word32 *pOut,         /* o  : time domain buffer of size length   */
    const Word16 length /* i  : length of time alised signal buffer */
);

#endif
 No newline at end of file
+75 −0
Original line number Diff line number Diff line
@@ -3685,6 +3685,76 @@ void DoRTFTn_fx(
  Word32 *y,     /* i/o : imaginary part of i   and output data  */
  const Word16 n /* i : size of the FFT up to 1024 */
);

void DoRTFT480_fx(
    Word32 *x, /* i/o: real part of input and output data       */
    Word32 *y  /* i/o: imaginary part of input and output data  */
);

void DoRTFT320_fx(
    Word32 *x, /* i/o: real part of input and output data       */
    Word32 *y  /* i/o: imaginary part of input and output data  */
);

void DoRTFT160_fx(
    Word32 x[], /* i/o: real part of input and output data       */
    Word32 y[]  /* i/o: imaginary part of input and output data  */
);

void DoRTFT128_fx(
    Word32 *x, /* i/o: real part of input and output data       */
    Word32 *y  /* i/o: imaginary part of input and output data  */
);

void DoRTFT120_fx(
    Word32 *x, /* i/o: real part of input and output data       */
    Word32 *y  /* i/o: imaginary part of input and output data  */
);

void DoRTFT80_fx(
    Word32 *x, /* i/o: real part of input and output data       */
    Word32 *y  /* i/o: imaginary part of input and output data  */
);

void DoRTFT40_fx(
    Word32 *x, /* i/o: real part of input and output data       */
    Word32 *y  /* i/o: imaginary part of input and output data  */
);

void DoRTFT20_fx(
    Word32 *x, /* i/o: real part of input and output data       */
    Word32 *y  /* i/o: imaginary part of input and output data  */
);

Word16 RFFTN_fx(
    Word32 *data,
    const Word16 *sine_table,
    const Word16 len,
    const Word16 sign
);

void DoFFT_fx(
    Word32 *re2,
    Word32 *im2,
    const Word16 length
);

void fft_fx(
    Word32 *re,          /* i/o: real part           */
    Word32 *im,          /* i/o: imag part           */
    const Word16 length, /* i  : length of fft       */
    const Word16 s       /* i  : sign                */
);

void edct2_fx_ivas(
    const Word16 n,
    const Word16 isgn,
    Word32 *in,
    Word32 *a,
    const Word16 *ip,
    const Word16 *w
);

void edct2_fx(
  Word16 n,
  Word16 isgn,
@@ -7539,4 +7609,9 @@ ivas_error evs_dec_fx(
  Word16 output_sp[],                  /* o    : output synthesis signal  */
  frameMode_fx frameMode               /* i    : Decoder frame mode       */
);

void fft_cldfb_fx(
  Word32 *data,       /* i/o: input/output vector */
  const Word16 size /* size of fft operation */
);
#endif
 No newline at end of file
Loading