[FFmpeg-devel] [PATCH 4/8] avfft: add AV prefix to FFTContext.

Anton Khirnov anton
Sun Mar 13 14:48:35 CET 2011


---
 libavcodec/aac.h              |    6 ++--
 libavcodec/aacenc.h           |    4 +-
 libavcodec/aacsbr.c           |    4 +-
 libavcodec/ac3dec.h           |    4 +-
 libavcodec/ac3enc_float.h     |    2 +-
 libavcodec/arm/fft_init_arm.c |   14 ++++++------
 libavcodec/atrac1.c           |    4 +-
 libavcodec/atrac3.c           |    2 +-
 libavcodec/avfft.c            |   22 ++++++++++----------
 libavcodec/avfft.h            |   21 ++++++++++---------
 libavcodec/cook.c             |    2 +-
 libavcodec/dca.c              |    2 +-
 libavcodec/fft-test.c         |    4 +-
 libavcodec/fft.c              |   12 +++++-----
 libavcodec/fft.h              |   44 ++++++++++++++++++++--------------------
 libavcodec/imc.c              |    2 +-
 libavcodec/mdct.c             |   10 ++++----
 libavcodec/nellymoserdec.c    |    2 +-
 libavcodec/nellymoserenc.c    |    2 +-
 libavcodec/ppc/fft_altivec.c  |   10 ++++----
 libavcodec/sbr.h              |    4 +-
 libavcodec/synth_filter.c     |    2 +-
 libavcodec/synth_filter.h     |    2 +-
 libavcodec/twinvq.c           |    2 +-
 libavcodec/vorbis_dec.c       |    2 +-
 libavcodec/vorbis_enc.c       |    2 +-
 libavcodec/wma.h              |    2 +-
 libavcodec/wmaprodec.c        |    2 +-
 libavcodec/x86/fft.c          |    2 +-
 libavcodec/x86/fft.h          |   20 +++++++++---------
 libavcodec/x86/fft_3dn2.c     |    6 ++--
 libavcodec/x86/fft_mmx.asm    |   16 +++++++-------
 libavcodec/x86/fft_sse.c      |    6 ++--
 33 files changed, 121 insertions(+), 120 deletions(-)

diff --git a/libavcodec/aac.h b/libavcodec/aac.h
index 73bc408..5a8d8d7 100644
--- a/libavcodec/aac.h
+++ b/libavcodec/aac.h
@@ -279,9 +279,9 @@ typedef struct {
      * @defgroup tables   Computed / set up during initialization.
      * @{
      */
-    FFTContext mdct;
-    FFTContext mdct_small;
-    FFTContext mdct_ltp;
+    AVFFTContext mdct;
+    AVFFTContext mdct_small;
+    AVFFTContext mdct_ltp;
     DSPContext dsp;
     FmtConvertContext fmt_conv;
     int random_state;
diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h
index 1c84679..0086429 100644
--- a/libavcodec/aacenc.h
+++ b/libavcodec/aacenc.h
@@ -49,8 +49,8 @@ extern AACCoefficientsEncoder ff_aac_coders[];
  */
 typedef struct AACEncContext {
     PutBitContext pb;
-    FFTContext mdct1024;                         ///< long (1024 samples) frame transform context
-    FFTContext mdct128;                          ///< short (128 samples) frame transform context
+    AVFFTContext mdct1024;                       ///< long (1024 samples) frame transform context
+    AVFFTContext mdct128;                        ///< short (128 samples) frame transform context
     DSPContext  dsp;
     int16_t *samples;                            ///< saved preprocessed input
 
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index 237d51a..7ad3134 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -1133,7 +1133,7 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
  * @param   x       pointer to the beginning of the first sample window
  * @param   W       array of complex-valued samples split into subbands
  */
-static void sbr_qmf_analysis(DSPContext *dsp, FFTContext *mdct, const float *in, float *x,
+static void sbr_qmf_analysis(DSPContext *dsp, AVFFTContext *mdct, const float *in, float *x,
                              float z[320], float W[2][32][32][2])
 {
     int i, k;
@@ -1168,7 +1168,7 @@ static void sbr_qmf_analysis(DSPContext *dsp, FFTContext *mdct, const float *in,
  * Synthesis QMF Bank (14496-3 sp04 p206) and Downsampled Synthesis QMF Bank
  * (14496-3 sp04 p206)
  */
-static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
+static void sbr_qmf_synthesis(DSPContext *dsp, AVFFTContext *mdct,
                               float *out, float X[2][38][64],
                               float mdct_buf[2][64],
                               float *v0, int *v_off, const unsigned int div)
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index a5b1111..c6561c0 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -185,8 +185,8 @@ typedef struct {
 
 ///@defgroup imdct IMDCT
     int block_switch[AC3_MAX_CHANNELS];     ///< block switch flags                     (blksw)
-    FFTContext imdct_512;                   ///< for 512 sample IMDCT
-    FFTContext imdct_256;                   ///< for 256 sample IMDCT
+    AVFFTContext imdct_512;                 ///< for 512 sample IMDCT
+    AVFFTContext imdct_256;                 ///< for 256 sample IMDCT
 ///@}
 
 ///@defgroup opt optimization
diff --git a/libavcodec/ac3enc_float.h b/libavcodec/ac3enc_float.h
index 1726ca0..8fe5237 100644
--- a/libavcodec/ac3enc_float.h
+++ b/libavcodec/ac3enc_float.h
@@ -39,7 +39,7 @@ typedef float CoefSumType;
 
 typedef struct AC3MDCTContext {
     const float *window;    ///< MDCT window function
-    FFTContext fft;         ///< FFT context for MDCT calculation
+    AVFFTContext fft;       ///< FFT context for MDCT calculation
 } AC3MDCTContext;
 
 #endif /* AVCODEC_AC3ENC_FLOAT_H */
diff --git a/libavcodec/arm/fft_init_arm.c b/libavcodec/arm/fft_init_arm.c
index 5b01e3e..8d96da2 100644
--- a/libavcodec/arm/fft_init_arm.c
+++ b/libavcodec/arm/fft_init_arm.c
@@ -21,22 +21,22 @@
 #include "libavcodec/fft.h"
 #include "libavcodec/synth_filter.h"
 
-void ff_fft_permute_neon(FFTContext *s, AVFFTComplex *z);
-void ff_fft_calc_neon(FFTContext *s, AVFFTComplex *z);
+void ff_fft_permute_neon(AVFFTContext *s, AVFFTComplex *z);
+void ff_fft_calc_neon(AVFFTContext *s, AVFFTComplex *z);
 
-void ff_imdct_calc_neon(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_imdct_half_neon(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_mdct_calc_neon(FFTContext *s,  AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_calc_neon(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_half_neon(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_mdct_calc_neon( AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
 
 void ff_rdft_calc_neon(struct RDFTContext *s, AVFFTSample *z);
 
-void ff_synth_filter_float_neon(FFTContext *imdct,
+void ff_synth_filter_float_neon(AVFFTContext *imdct,
                                 float *synth_buf_ptr, int *synth_buf_offset,
                                 float synth_buf2[32], const float window[512],
                                 float out[32], const float in[32],
                                 float scale);
 
-av_cold void ff_fft_init_arm(FFTContext *s)
+av_cold void ff_fft_init_arm(AVFFTContext *s)
 {
     if (HAVE_NEON) {
         s->fft_permute  = ff_fft_permute_neon;
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
index be78445..2be0161 100644
--- a/libavcodec/atrac1.c
+++ b/libavcodec/atrac1.c
@@ -78,7 +78,7 @@ typedef struct {
     DECLARE_ALIGNED(16, float, high)[512];
     float*              bands[3];
     DECLARE_ALIGNED(16, float, out_samples)[AT1_MAX_CHANNELS][AT1_SU_SAMPLES];
-    FFTContext          mdct_ctx[3];
+    AVFFTContext        mdct_ctx[3];
     int                 channels;
     DSPContext          dsp;
 } AT1Ctx;
@@ -91,7 +91,7 @@ static const uint8_t   mdct_long_nbits[3] = {7, 7, 8};
 static void at1_imdct(AT1Ctx *q, float *spec, float *out, int nbits,
                       int rev_spec)
 {
-    FFTContext* mdct_context = &q->mdct_ctx[nbits - 5 - (nbits > 6)];
+    AVFFTContext* mdct_context = &q->mdct_ctx[nbits - 5 - (nbits > 6)];
     int transf_size = 1 << nbits;
 
     if (rev_spec) {
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 3d1f990..5c135cd 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -119,7 +119,7 @@ typedef struct {
     int                 frame_factor;
     //@}
 
-    FFTContext          mdct_ctx;
+    AVFFTContext        mdct_ctx;
 } ATRAC3Context;
 
 static DECLARE_ALIGNED(16, float,mdct_window)[512];
diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c
index 85db650..1338443 100644
--- a/libavcodec/avfft.c
+++ b/libavcodec/avfft.c
@@ -22,9 +22,9 @@
 
 /* FFT */
 
-FFTContext *av_fft_init(int nbits, int inverse)
+AVFFTContext *av_fft_init(int nbits, int inverse)
 {
-    FFTContext *s = av_malloc(sizeof(*s));
+    AVFFTContext *s = av_malloc(sizeof(*s));
 
     if (s && ff_fft_init(s, nbits, inverse))
         av_freep(&s);
@@ -32,17 +32,17 @@ FFTContext *av_fft_init(int nbits, int inverse)
     return s;
 }
 
-void av_fft_permute(FFTContext *s, AVFFTComplex *z)
+void av_fft_permute(AVFFTContext *s, AVFFTComplex *z)
 {
     s->fft_permute(s, z);
 }
 
-void av_fft_calc(FFTContext *s, AVFFTComplex *z)
+void av_fft_calc(AVFFTContext *s, AVFFTComplex *z)
 {
     s->fft_calc(s, z);
 }
 
-void av_fft_end(FFTContext *s)
+void av_fft_end(AVFFTContext *s)
 {
     if (s) {
         ff_fft_end(s);
@@ -52,9 +52,9 @@ void av_fft_end(FFTContext *s)
 
 #if CONFIG_MDCT
 
-FFTContext *av_mdct_init(int nbits, int inverse, double scale)
+AVFFTContext *av_mdct_init(int nbits, int inverse, double scale)
 {
-    FFTContext *s = av_malloc(sizeof(*s));
+    AVFFTContext *s = av_malloc(sizeof(*s));
 
     if (s && ff_mdct_init(s, nbits, inverse, scale))
         av_freep(&s);
@@ -62,22 +62,22 @@ FFTContext *av_mdct_init(int nbits, int inverse, double scale)
     return s;
 }
 
-void av_imdct_calc(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+void av_imdct_calc(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     s->imdct_calc(s, output, input);
 }
 
-void av_imdct_half(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+void av_imdct_half(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     s->imdct_half(s, output, input);
 }
 
-void av_mdct_calc(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+void av_mdct_calc(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     s->mdct_calc(s, output, input);
 }
 
-void av_mdct_end(FFTContext *s)
+void av_mdct_end(AVFFTContext *s)
 {
     if (s) {
         ff_mdct_end(s);
diff --git a/libavcodec/avfft.h b/libavcodec/avfft.h
index c178ea2..a4eda6b 100644
--- a/libavcodec/avfft.h
+++ b/libavcodec/avfft.h
@@ -28,33 +28,33 @@ typedef struct AVFFTComplex {
     AVFFTSample re, im;
 } AVFFTComplex;
 
-typedef struct FFTContext FFTContext;
+typedef struct AVFFTContext AVFFTContext;
 
 /**
  * Set up a complex FFT.
  * @param nbits           log2 of the length of the input array
  * @param inverse         if 0 perform the forward transform, if 1 perform the inverse
  */
-FFTContext *av_fft_init(int nbits, int inverse);
+AVFFTContext *av_fft_init(int nbits, int inverse);
 
 /**
  * Do the permutation needed BEFORE calling ff_fft_calc().
  */
-void av_fft_permute(FFTContext *s, AVFFTComplex *z);
+void av_fft_permute(AVFFTContext *s, AVFFTComplex *z);
 
 /**
  * Do a complex FFT with the parameters defined in av_fft_init(). The
  * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
  */
-void av_fft_calc(FFTContext *s, AVFFTComplex *z);
+void av_fft_calc(AVFFTContext *s, AVFFTComplex *z);
 
-void av_fft_end(FFTContext *s);
+void av_fft_end(AVFFTContext *s);
 
-FFTContext *av_mdct_init(int nbits, int inverse, double scale);
-void av_imdct_calc(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void av_imdct_half(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void av_mdct_calc(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void av_mdct_end(FFTContext *s);
+AVFFTContext *av_mdct_init(int nbits, int inverse, double scale);
+void av_imdct_calc(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void av_imdct_half(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void av_mdct_calc(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void av_mdct_end(AVFFTContext *s);
 
 /* Real Discrete Fourier Transform */
 
@@ -102,6 +102,7 @@ void av_dct_end (DCTContext *s);
 #if FF_API_OLD_FFT
 typedef attribute_deprecated AVFFTSample FFTSample;
 typedef attribute_deprecated AVFFTComplex FFTComplex;
+typedef attribute_deprecated AVFFTContext FFTContext;
 #endif
 
 #endif /* AVCODEC_AVFFT_H */
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index da31e9f..1631fdb 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -138,7 +138,7 @@ typedef struct cook {
     AVLFG               random_state;
 
     /* transform data */
-    FFTContext          mdct_ctx;
+    AVFFTContext        mdct_ctx;
     float*              mlt_window;
 
     /* VLC data */
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 14b0b2d..edb87fc 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -358,7 +358,7 @@ typedef struct {
 
     int debug_flag;             ///< used for suppressing repeated error messages output
     DSPContext dsp;
-    FFTContext imdct;
+    AVFFTContext imdct;
     SynthFilterContext synth;
     DCADSPContext dcadsp;
     FmtConvertContext fmt_conv;
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index 991bfd2..df3ccfb 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -229,8 +229,8 @@ int main(int argc, char **argv)
     int err = 1;
     enum tf_transform transform = TRANSFORM_FFT;
     int do_inverse = 0;
-    FFTContext s1, *s = &s1;
-    FFTContext m1, *m = &m1;
+    AVFFTContext s1, *s = &s1;
+    AVFFTContext m1, *m = &m1;
     RDFTContext r1, *r = &r1;
     DCTContext d1, *d = &d1;
     int fft_nbits, fft_size, fft_size_2;
diff --git a/libavcodec/fft.c b/libavcodec/fft.c
index 03d8376..24b2208 100644
--- a/libavcodec/fft.c
+++ b/libavcodec/fft.c
@@ -53,8 +53,8 @@ COSTABLE_CONST AVFFTSample * const ff_cos_tabs[] = {
     ff_cos_2048, ff_cos_4096, ff_cos_8192, ff_cos_16384, ff_cos_32768, ff_cos_65536,
 };
 
-static void ff_fft_permute_c(FFTContext *s, AVFFTComplex *z);
-static void ff_fft_calc_c(FFTContext *s, AVFFTComplex *z);
+static void ff_fft_permute_c(AVFFTContext *s, AVFFTComplex *z);
+static void ff_fft_calc_c(AVFFTContext *s, AVFFTComplex *z);
 
 static int split_radix_permutation(int i, int n, int inverse)
 {
@@ -81,7 +81,7 @@ av_cold void ff_init_ff_cos_tabs(int index)
 #endif
 }
 
-av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
+av_cold int ff_fft_init(AVFFTContext *s, int nbits, int inverse)
 {
     int i, j, n;
 
@@ -128,7 +128,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
     return -1;
 }
 
-static void ff_fft_permute_c(FFTContext *s, AVFFTComplex *z)
+static void ff_fft_permute_c(AVFFTContext *s, AVFFTComplex *z)
 {
     int j, np;
     const uint16_t *revtab = s->revtab;
@@ -138,7 +138,7 @@ static void ff_fft_permute_c(FFTContext *s, AVFFTComplex *z)
     memcpy(z, s->tmp_buf, np * sizeof(AVFFTComplex));
 }
 
-av_cold void ff_fft_end(FFTContext *s)
+av_cold void ff_fft_end(AVFFTContext *s)
 {
     av_freep(&s->revtab);
     av_freep(&s->tmp_buf);
@@ -297,7 +297,7 @@ static void (* const fft_dispatch[])(AVFFTComplex*) = {
     fft2048, fft4096, fft8192, fft16384, fft32768, fft65536,
 };
 
-static void ff_fft_calc_c(FFTContext *s, AVFFTComplex *z)
+static void ff_fft_calc_c(AVFFTContext *s, AVFFTComplex *z)
 {
     fft_dispatch[s->nbits-2](z);
 }
diff --git a/libavcodec/fft.h b/libavcodec/fft.h
index 9f53170..f741a3f 100644
--- a/libavcodec/fft.h
+++ b/libavcodec/fft.h
@@ -29,7 +29,7 @@
 
 /* FFT computation */
 
-struct FFTContext {
+struct AVFFTContext {
     int nbits;
     int inverse;
     uint16_t *revtab;
@@ -39,11 +39,11 @@ struct FFTContext {
     /* pre/post rotation tables */
     AVFFTSample *tcos;
     AVFFTSample *tsin;
-    void (*fft_permute)(struct FFTContext *s, AVFFTComplex *z);
-    void (*fft_calc)(struct FFTContext *s, AVFFTComplex *z);
-    void (*imdct_calc)(struct FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-    void (*imdct_half)(struct FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-    void (*mdct_calc)(struct FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+    void (*fft_permute)(struct AVFFTContext *s, AVFFTComplex *z);
+    void (*fft_calc)(struct AVFFTContext *s, AVFFTComplex *z);
+    void (*imdct_calc)(struct AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+    void (*imdct_half)(struct AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+    void (*mdct_calc)(struct AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
     int fft_permutation;
 #define FF_FFT_PERM_DEFAULT   0
 #define FF_FFT_PERM_SWAP_LSBS 1
@@ -108,17 +108,17 @@ extern SINTABLE(65536);
  * @param nbits           log2 of the length of the input array
  * @param inverse         if 0 perform the forward transform, if 1 perform the inverse
  */
-int ff_fft_init(FFTContext *s, int nbits, int inverse);
+int ff_fft_init(AVFFTContext *s, int nbits, int inverse);
 
-void ff_fft_init_altivec(FFTContext *s);
-void ff_fft_init_mmx(FFTContext *s);
-void ff_fft_init_arm(FFTContext *s);
+void ff_fft_init_altivec(AVFFTContext *s);
+void ff_fft_init_mmx(AVFFTContext *s);
+void ff_fft_init_arm(AVFFTContext *s);
 void ff_dct_init_mmx(DCTContext *s);
 
 /**
  * Do the permutation needed BEFORE calling ff_fft_calc().
  */
-static inline void ff_fft_permute(FFTContext *s, AVFFTComplex *z)
+static inline void ff_fft_permute(AVFFTContext *s, AVFFTComplex *z)
 {
     s->fft_permute(s, z);
 }
@@ -126,24 +126,24 @@ static inline void ff_fft_permute(FFTContext *s, AVFFTComplex *z)
  * Do a complex FFT with the parameters defined in ff_fft_init(). The
  * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
  */
-static inline void ff_fft_calc(FFTContext *s, AVFFTComplex *z)
+static inline void ff_fft_calc(AVFFTContext *s, AVFFTComplex *z)
 {
     s->fft_calc(s, z);
 }
-void ff_fft_end(FFTContext *s);
+void ff_fft_end(AVFFTContext *s);
 
 /* MDCT computation */
 
-static inline void ff_imdct_calc(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+static inline void ff_imdct_calc(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     s->imdct_calc(s, output, input);
 }
-static inline void ff_imdct_half(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+static inline void ff_imdct_half(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     s->imdct_half(s, output, input);
 }
 
-static inline void ff_mdct_calc(FFTContext *s, AVFFTSample *output,
+static inline void ff_mdct_calc(AVFFTContext *s, AVFFTSample *output,
                                 const AVFFTSample *input)
 {
     s->mdct_calc(s, output, input);
@@ -183,11 +183,11 @@ extern SINETABLE(2048);
 extern SINETABLE(4096);
 extern SINETABLE_CONST float * const ff_sine_windows[13];
 
-int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale);
-void ff_imdct_calc_c(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_imdct_half_c(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_mdct_calc_c(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_mdct_end(FFTContext *s);
+int ff_mdct_init(AVFFTContext *s, int nbits, int inverse, double scale);
+void ff_imdct_calc_c(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_half_c(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_mdct_calc_c(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_mdct_end(AVFFTContext *s);
 
 /* Real Discrete Fourier Transform */
 
@@ -199,7 +199,7 @@ struct RDFTContext {
     /* pre/post rotation tables */
     const AVFFTSample *tcos;
     SINTABLE_CONST AVFFTSample *tsin;
-    FFTContext fft;
+    AVFFTContext fft;
     void (*rdft_calc)(struct RDFTContext *s, AVFFTSample *z);
 };
 
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index da03e6d..6fb5cab 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -86,7 +86,7 @@ typedef struct {
     float one_div_log2;
 
     DSPContext dsp;
-    FFTContext fft;
+    AVFFTContext fft;
     DECLARE_ALIGNED(16, AVFFTComplex, samples)[COEFFS/2];
     float *out_samples;
 } IMCContext;
diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c
index 8b33ddf..57d73aa 100644
--- a/libavcodec/mdct.c
+++ b/libavcodec/mdct.c
@@ -60,7 +60,7 @@ av_cold void ff_kbd_window_init(float *window, float alpha, int n)
 /**
  * init MDCT or IMDCT computation.
  */
-av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale)
+av_cold int ff_mdct_init(AVFFTContext *s, int nbits, int inverse, double scale)
 {
     int n, n4, i;
     double alpha, theta;
@@ -123,7 +123,7 @@ av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale)
  * @param output N/2 samples
  * @param input N/2 samples
  */
-void ff_imdct_half_c(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+void ff_imdct_half_c(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     int k, n8, n4, n2, n, j;
     const uint16_t *revtab = s->revtab;
@@ -165,7 +165,7 @@ void ff_imdct_half_c(FFTContext *s, AVFFTSample *output, const AVFFTSample *inpu
  * @param output N samples
  * @param input N/2 samples
  */
-void ff_imdct_calc_c(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+void ff_imdct_calc_c(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     int k;
     int n = 1 << s->mdct_bits;
@@ -185,7 +185,7 @@ void ff_imdct_calc_c(FFTContext *s, AVFFTSample *output, const AVFFTSample *inpu
  * @param input N samples
  * @param out N/2 samples
  */
-void ff_mdct_calc_c(FFTContext *s, AVFFTSample *out, const AVFFTSample *input)
+void ff_mdct_calc_c(AVFFTContext *s, AVFFTSample *out, const AVFFTSample *input)
 {
     int i, j, n, n8, n4, n2, n3;
     AVFFTSample re, im;
@@ -227,7 +227,7 @@ void ff_mdct_calc_c(FFTContext *s, AVFFTSample *out, const AVFFTSample *input)
     }
 }
 
-av_cold void ff_mdct_end(FFTContext *s)
+av_cold void ff_mdct_end(AVFFTContext *s)
 {
     av_freep(&s->tcos);
     ff_fft_end(s);
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index fd8568d..d577cb6 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -52,7 +52,7 @@ typedef struct NellyMoserDecodeContext {
     GetBitContext   gb;
     float           scale_bias;
     DSPContext      dsp;
-    FFTContext      imdct_ctx;
+    AVFFTContext      imdct_ctx;
     FmtConvertContext fmt_conv;
     DECLARE_ALIGNED(16, float,imdct_out)[NELLY_BUF_LEN * 2];
 } NellyMoserDecodeContext;
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 9b792ff..7cfdcf1 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -53,7 +53,7 @@ typedef struct NellyMoserEncodeContext {
     int             bufsel;
     int             have_saved;
     DSPContext      dsp;
-    FFTContext      mdct_ctx;
+    AVFFTContext      mdct_ctx;
     DECLARE_ALIGNED(16, float, mdct_out)[NELLY_SAMPLES];
     DECLARE_ALIGNED(16, float, in_buff)[NELLY_SAMPLES];
     DECLARE_ALIGNED(16, float, buf)[2][3 * NELLY_BUF_LEN];     ///< sample buffer
diff --git a/libavcodec/ppc/fft_altivec.c b/libavcodec/ppc/fft_altivec.c
index 25fd6da..e2e7235 100644
--- a/libavcodec/ppc/fft_altivec.c
+++ b/libavcodec/ppc/fft_altivec.c
@@ -32,11 +32,11 @@
  * It also assumes all AVFFTComplex are 8 bytes-aligned pair of float
  */
 
-void ff_fft_calc_altivec(FFTContext *s, AVFFTComplex *z);
-void ff_fft_calc_interleave_altivec(FFTContext *s, AVFFTComplex *z);
+void ff_fft_calc_altivec(AVFFTContext *s, AVFFTComplex *z);
+void ff_fft_calc_interleave_altivec(AVFFTContext *s, AVFFTComplex *z);
 
 #if HAVE_GNU_AS
-static void ff_imdct_half_altivec(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+static void ff_imdct_half_altivec(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     int j, k;
     int n = 1 << s->mdct_bits;
@@ -116,7 +116,7 @@ static void ff_imdct_half_altivec(FFTContext *s, AVFFTSample *output, const AVFF
     } while(k >= 0);
 }
 
-static void ff_imdct_calc_altivec(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+static void ff_imdct_calc_altivec(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     int k;
     int n = 1 << s->mdct_bits;
@@ -137,7 +137,7 @@ static void ff_imdct_calc_altivec(FFTContext *s, AVFFTSample *output, const AVFF
 }
 #endif /* HAVE_GNU_AS */
 
-av_cold void ff_fft_init_altivec(FFTContext *s)
+av_cold void ff_fft_init_altivec(AVFFTContext *s)
 {
 #if HAVE_GNU_AS
     s->fft_calc   = ff_fft_calc_interleave_altivec;
diff --git a/libavcodec/sbr.h b/libavcodec/sbr.h
index 82a996f..ad1c0f3 100644
--- a/libavcodec/sbr.h
+++ b/libavcodec/sbr.h
@@ -178,8 +178,8 @@ typedef struct {
     float              s_m[7][48];
     float              gain[7][48];
     DECLARE_ALIGNED(16, float, qmf_filter_scratch)[5][64];
-    FFTContext         mdct_ana;
-    FFTContext         mdct;
+    AVFFTContext       mdct_ana;
+    AVFFTContext       mdct;
 } SpectralBandReplication;
 
 #endif /* AVCODEC_SBR_H */
diff --git a/libavcodec/synth_filter.c b/libavcodec/synth_filter.c
index 4af496d..efe4d5b 100644
--- a/libavcodec/synth_filter.c
+++ b/libavcodec/synth_filter.c
@@ -21,7 +21,7 @@
 #include "fft.h"
 #include "synth_filter.h"
 
-static void synth_filter_float(FFTContext *imdct,
+static void synth_filter_float(AVFFTContext *imdct,
                            float *synth_buf_ptr, int *synth_buf_offset,
                            float synth_buf2[32], const float window[512],
                            float out[32], const float in[32], float scale)
diff --git a/libavcodec/synth_filter.h b/libavcodec/synth_filter.h
index 33edcc4..78193e5 100644
--- a/libavcodec/synth_filter.h
+++ b/libavcodec/synth_filter.h
@@ -24,7 +24,7 @@
 #include "fft.h"
 
 typedef struct SynthFilterContext {
-    void (*synth_filter_float)(FFTContext *imdct,
+    void (*synth_filter_float)(AVFFTContext *imdct,
                                float *synth_buf_ptr, int *synth_buf_offset,
                                float synth_buf2[32], const float window[512],
                                float out[32], const float in[32],
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index bd43104..53413dc 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -174,7 +174,7 @@ static const ModeTab mode_44_48 = {
 typedef struct TwinContext {
     AVCodecContext *avctx;
     DSPContext      dsp;
-    FFTContext mdct_ctx[3];
+    AVFFTContext mdct_ctx[3];
 
     const ModeTab *mtab;
 
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c
index deaae75..6c3ce19 100644
--- a/libavcodec/vorbis_dec.c
+++ b/libavcodec/vorbis_dec.c
@@ -130,7 +130,7 @@ typedef struct vorbis_context_s {
     DSPContext dsp;
     FmtConvertContext fmt_conv;
 
-    FFTContext mdct[2];
+    AVFFTContext mdct[2];
     uint_fast8_t  first_frame;
     uint_fast32_t version;
     uint_fast8_t  audio_channels;
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c
index 93683ac..522337d 100644
--- a/libavcodec/vorbis_enc.c
+++ b/libavcodec/vorbis_enc.c
@@ -99,7 +99,7 @@ typedef struct {
     int channels;
     int sample_rate;
     int log2_blocksize[2];
-    FFTContext mdct[2];
+    AVFFTContext mdct[2];
     const float *win[2];
     int have_saved;
     float *saved;
diff --git a/libavcodec/wma.h b/libavcodec/wma.h
index 758bd54..b71d8e8 100644
--- a/libavcodec/wma.h
+++ b/libavcodec/wma.h
@@ -118,7 +118,7 @@ typedef struct WMACodecContext {
     WMACoef coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
     DECLARE_ALIGNED(16, float, coefs)[MAX_CHANNELS][BLOCK_MAX_SIZE];
     DECLARE_ALIGNED(16, AVFFTSample, output)[BLOCK_MAX_SIZE * 2];
-    FFTContext mdct_ctx[BLOCK_NB_SIZES];
+    AVFFTContext mdct_ctx[BLOCK_NB_SIZES];
     float *windows[BLOCK_NB_SIZES];
     /* output buffer for one frame and the last for IMDCT windowing */
     DECLARE_ALIGNED(16, float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2];
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index d248ae4..04ce2bb 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -168,7 +168,7 @@ typedef struct WMAProDecodeCtx {
     uint8_t          frame_data[MAX_FRAMESIZE +
                       FF_INPUT_BUFFER_PADDING_SIZE];///< compressed frame data
     PutBitContext    pb;                            ///< context for filling the frame_data buffer
-    FFTContext       mdct_ctx[WMAPRO_BLOCK_SIZES];  ///< MDCT context per block size
+    AVFFTContext       mdct_ctx[WMAPRO_BLOCK_SIZES];  ///< MDCT context per block size
     DECLARE_ALIGNED(16, float, tmp)[WMAPRO_BLOCK_MAX_SIZE]; ///< IMDCT output buffer
     float*           windows[WMAPRO_BLOCK_SIZES];   ///< windows for the different block sizes
 
diff --git a/libavcodec/x86/fft.c b/libavcodec/x86/fft.c
index 5ca341d..d0f6e11 100644
--- a/libavcodec/x86/fft.c
+++ b/libavcodec/x86/fft.c
@@ -20,7 +20,7 @@
 #include "libavcodec/dsputil.h"
 #include "fft.h"
 
-av_cold void ff_fft_init_mmx(FFTContext *s)
+av_cold void ff_fft_init_mmx(AVFFTContext *s)
 {
 #if HAVE_YASM
     int has_vectors = av_get_cpu_flags();
diff --git a/libavcodec/x86/fft.h b/libavcodec/x86/fft.h
index 65d2a3b..bc03452 100644
--- a/libavcodec/x86/fft.h
+++ b/libavcodec/x86/fft.h
@@ -21,17 +21,17 @@
 
 #include "libavcodec/fft.h"
 
-void ff_fft_permute_sse(FFTContext *s, AVFFTComplex *z);
-void ff_fft_calc_sse(FFTContext *s, AVFFTComplex *z);
-void ff_fft_calc_3dn(FFTContext *s, AVFFTComplex *z);
-void ff_fft_calc_3dn2(FFTContext *s, AVFFTComplex *z);
+void ff_fft_permute_sse(AVFFTContext *s, AVFFTComplex *z);
+void ff_fft_calc_sse(AVFFTContext *s, AVFFTComplex *z);
+void ff_fft_calc_3dn(AVFFTContext *s, AVFFTComplex *z);
+void ff_fft_calc_3dn2(AVFFTContext *s, AVFFTComplex *z);
 
-void ff_imdct_calc_3dn(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_imdct_half_3dn(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_imdct_calc_3dn2(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_imdct_half_3dn2(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_imdct_calc_sse(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
-void ff_imdct_half_sse(FFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_calc_3dn(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_half_3dn(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_calc_3dn2(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_half_3dn2(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_calc_sse(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
+void ff_imdct_half_sse(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input);
 void ff_dct32_float_sse(AVFFTSample *out, const AVFFTSample *in);
 
 #endif
diff --git a/libavcodec/x86/fft_3dn2.c b/libavcodec/x86/fft_3dn2.c
index 2fc98e5..ac10214 100644
--- a/libavcodec/x86/fft_3dn2.c
+++ b/libavcodec/x86/fft_3dn2.c
@@ -42,7 +42,7 @@ DECLARE_ALIGNED(8, static const int, m1m1)[2] = { 1<<31, 1<<31 };
 void ff_fft_dispatch_3dn2(AVFFTComplex *z, int nbits);
 void ff_fft_dispatch_interleave_3dn2(AVFFTComplex *z, int nbits);
 
-void ff_fft_calc_3dn2(FFTContext *s, AVFFTComplex *z)
+void ff_fft_calc_3dn2(AVFFTContext *s, AVFFTComplex *z)
 {
     int n = 1<<s->nbits;
     int i;
@@ -53,7 +53,7 @@ void ff_fft_calc_3dn2(FFTContext *s, AVFFTComplex *z)
             FFSWAP(AVFFTSample, z[i].im, z[i+1].re);
 }
 
-void ff_imdct_half_3dn2(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+void ff_imdct_half_3dn2(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     x86_reg j, k;
     long n = s->mdct_size;
@@ -144,7 +144,7 @@ void ff_imdct_half_3dn2(FFTContext *s, AVFFTSample *output, const AVFFTSample *i
     __asm__ volatile("femms");
 }
 
-void ff_imdct_calc_3dn2(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+void ff_imdct_calc_3dn2(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     x86_reg j, k;
     long n = s->mdct_size;
diff --git a/libavcodec/x86/fft_mmx.asm b/libavcodec/x86/fft_mmx.asm
index 2ccadf0..5b6daae 100644
--- a/libavcodec/x86/fft_mmx.asm
+++ b/libavcodec/x86/fft_mmx.asm
@@ -35,7 +35,7 @@
 %define pointer resd
 %endif
 
-struc FFTContext
+struc AVFFTContext
     .nbits:    resd 1
     .reverse:  resd 1
     .revtab:   pointer 1
@@ -566,7 +566,7 @@ INIT_XMM
     jl       .post
 %endmacro
 
-cglobal imdct_half_sse, 3,7,8; FFTContext *s, AVFFTSample *output, const AVFFTSample *input
+cglobal imdct_half_sse, 3,7,8; AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input
 %ifdef ARCH_X86_64
 %define rrevtab r10
 %define rtcos   r11
@@ -579,11 +579,11 @@ cglobal imdct_half_sse, 3,7,8; FFTContext *s, AVFFTSample *output, const AVFFTSa
 %define rtsin   r6
 %define rtcos   r5
 %endif
-    mov   r3d, [r0+FFTContext.mdctsize]
+    mov   r3d, [r0+AVFFTContext.mdctsize]
     add   r2, r3
     shr   r3, 1
-    mov   rtcos, [r0+FFTContext.tcos]
-    mov   rtsin, [r0+FFTContext.tsin]
+    mov   rtcos, [r0+AVFFTContext.tcos]
+    mov   rtsin, [r0+AVFFTContext.tsin]
     add   rtcos, r3
     add   rtsin, r3
 %ifndef ARCH_X86_64
@@ -591,7 +591,7 @@ cglobal imdct_half_sse, 3,7,8; FFTContext *s, AVFFTSample *output, const AVFFTSa
     push  rtsin
 %endif
     shr   r3, 1
-    mov   rrevtab, [r0+FFTContext.revtab]
+    mov   rrevtab, [r0+AVFFTContext.revtab]
     add   rrevtab, r3
 %ifndef ARCH_X86_64
     push  rrevtab
@@ -639,11 +639,11 @@ cglobal imdct_half_sse, 3,7,8; FFTContext *s, AVFFTSample *output, const AVFFTSa
     mov  r5, r0
     mov  r6, r1
     mov  r0, r1
-    mov  r1d, [r5+FFTContext.nbits]
+    mov  r1d, [r5+AVFFTContext.nbits]
 
     FFT_DISPATCH _sse, r1
 
-    mov  r0d, [r5+FFTContext.mdctsize]
+    mov  r0d, [r5+AVFFTContext.mdctsize]
     add  r6, r0
     shr  r0, 1
 %ifndef ARCH_X86_64
diff --git a/libavcodec/x86/fft_sse.c b/libavcodec/x86/fft_sse.c
index 41d617c..da53474 100644
--- a/libavcodec/x86/fft_sse.c
+++ b/libavcodec/x86/fft_sse.c
@@ -29,7 +29,7 @@ DECLARE_ASM_CONST(16, int, ff_m1m1m1m1)[4] =
 void ff_fft_dispatch_sse(AVFFTComplex *z, int nbits);
 void ff_fft_dispatch_interleave_sse(AVFFTComplex *z, int nbits);
 
-void ff_fft_calc_sse(FFTContext *s, AVFFTComplex *z)
+void ff_fft_calc_sse(AVFFTContext *s, AVFFTComplex *z)
 {
     int n = 1 << s->nbits;
 
@@ -54,7 +54,7 @@ void ff_fft_calc_sse(FFTContext *s, AVFFTComplex *z)
     }
 }
 
-void ff_fft_permute_sse(FFTContext *s, AVFFTComplex *z)
+void ff_fft_permute_sse(AVFFTContext *s, AVFFTComplex *z)
 {
     int n = 1 << s->nbits;
     int i;
@@ -71,7 +71,7 @@ void ff_fft_permute_sse(FFTContext *s, AVFFTComplex *z)
     memcpy(z, s->tmp_buf, n*sizeof(AVFFTComplex));
 }
 
-void ff_imdct_calc_sse(FFTContext *s, AVFFTSample *output, const AVFFTSample *input)
+void ff_imdct_calc_sse(AVFFTContext *s, AVFFTSample *output, const AVFFTSample *input)
 {
     x86_reg j, k;
     long n = s->mdct_size;
-- 
1.7.4.1




More information about the ffmpeg-devel mailing list