[FFmpeg-devel] [PATCH 6/8] avfft: add AV prefix to RDFTContext.
Anton Khirnov
anton
Sun Mar 13 14:48:37 CET 2011
---
ffplay.c | 2 +-
libavcodec/arm/fft_init_arm.c | 4 ++--
libavcodec/avfft.c | 8 ++++----
libavcodec/avfft.h | 9 +++++----
libavcodec/binkaudio.c | 2 +-
libavcodec/fft-test.c | 2 +-
libavcodec/fft.h | 14 +++++++-------
libavcodec/qdm2.c | 2 +-
libavcodec/rdft.c | 6 +++---
libavcodec/wmavoice.c | 2 +-
10 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index ed8512d..a27deb6 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -171,7 +171,7 @@ typedef struct VideoState {
int16_t sample_array[SAMPLE_ARRAY_SIZE];
int sample_array_index;
int last_i_start;
- RDFTContext *rdft;
+ AVRDFTContext *rdft;
int rdft_bits;
AVFFTSample *rdft_data;
int xpos;
diff --git a/libavcodec/arm/fft_init_arm.c b/libavcodec/arm/fft_init_arm.c
index 8d96da2..da9e3e8 100644
--- a/libavcodec/arm/fft_init_arm.c
+++ b/libavcodec/arm/fft_init_arm.c
@@ -28,7 +28,7 @@ void ff_imdct_calc_neon(AVFFTContext *s, AVFFTSample *output, const AVFFTSample
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_rdft_calc_neon(struct AVRDFTContext *s, AVFFTSample *z);
void ff_synth_filter_float_neon(AVFFTContext *imdct,
float *synth_buf_ptr, int *synth_buf_offset,
@@ -49,7 +49,7 @@ av_cold void ff_fft_init_arm(AVFFTContext *s)
}
#if CONFIG_RDFT
-av_cold void ff_rdft_init_arm(RDFTContext *s)
+av_cold void ff_rdft_init_arm(AVRDFTContext *s)
{
if (HAVE_NEON)
s->rdft_calc = ff_rdft_calc_neon;
diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c
index 11bc117..2852e27 100644
--- a/libavcodec/avfft.c
+++ b/libavcodec/avfft.c
@@ -89,9 +89,9 @@ void av_mdct_end(AVFFTContext *s)
#if CONFIG_RDFT
-RDFTContext *av_rdft_init(int nbits, enum AVRDFTTransformType trans)
+AVRDFTContext *av_rdft_init(int nbits, enum AVRDFTTransformType trans)
{
- RDFTContext *s = av_malloc(sizeof(*s));
+ AVRDFTContext *s = av_malloc(sizeof(*s));
if (s && ff_rdft_init(s, nbits, trans))
av_freep(&s);
@@ -99,12 +99,12 @@ RDFTContext *av_rdft_init(int nbits, enum AVRDFTTransformType trans)
return s;
}
-void av_rdft_calc(RDFTContext *s, AVFFTSample *data)
+void av_rdft_calc(AVRDFTContext *s, AVFFTSample *data)
{
ff_rdft_calc(s, data);
}
-void av_rdft_end(RDFTContext *s)
+void av_rdft_end(AVRDFTContext *s)
{
if (s) {
ff_rdft_end(s);
diff --git a/libavcodec/avfft.h b/libavcodec/avfft.h
index f3dda73..6f73ef0 100644
--- a/libavcodec/avfft.h
+++ b/libavcodec/avfft.h
@@ -65,16 +65,16 @@ enum AVRDFTTransformType {
AV_DFT_C2R,
};
-typedef struct RDFTContext RDFTContext;
+typedef struct AVRDFTContext AVRDFTContext;
/**
* Set up a real FFT.
* @param nbits log2 of the length of the input array
* @param trans the type of transform
*/
-RDFTContext *av_rdft_init(int nbits, enum AVRDFTTransformType trans);
-void av_rdft_calc(RDFTContext *s, AVFFTSample *data);
-void av_rdft_end(RDFTContext *s);
+AVRDFTContext *av_rdft_init(int nbits, enum AVRDFTTransformType trans);
+void av_rdft_calc(AVRDFTContext *s, AVFFTSample *data);
+void av_rdft_end(AVRDFTContext *s);
/* Discrete Cosine Transform */
@@ -109,6 +109,7 @@ attribute_deprecated enum RDFTransformType {
IDFT_R2C,
DFT_C2R,
};
+typedef attribute_deprecated AVRDFTContext RDFTContext;
#endif
#endif /* AVCODEC_AVFFT_H */
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index 22b41ae..cf270be 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -58,7 +58,7 @@ typedef struct {
DECLARE_ALIGNED(16, short, previous)[BINK_BLOCK_MAX_SIZE / 16]; ///< coeffs from previous audio block
float *coeffs_ptr[MAX_CHANNELS]; ///< pointers to the coeffs arrays for float_to_int16_interleave
union {
- RDFTContext rdft;
+ AVRDFTContext rdft;
DCTContext dct;
} trans;
} BinkAudioContext;
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index 9e3264d..d0de452 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -231,7 +231,7 @@ int main(int argc, char **argv)
int do_inverse = 0;
AVFFTContext s1, *s = &s1;
AVFFTContext m1, *m = &m1;
- RDFTContext r1, *r = &r1;
+ AVRDFTContext r1, *r = &r1;
DCTContext d1, *d = &d1;
int fft_nbits, fft_size, fft_size_2;
double scale = 1.0;
diff --git a/libavcodec/fft.h b/libavcodec/fft.h
index adc7408..caf0505 100644
--- a/libavcodec/fft.h
+++ b/libavcodec/fft.h
@@ -191,7 +191,7 @@ void ff_mdct_end(AVFFTContext *s);
/* Real Discrete Fourier Transform */
-struct RDFTContext {
+struct AVRDFTContext {
int nbits;
int inverse;
int sign_convention;
@@ -200,7 +200,7 @@ struct RDFTContext {
const AVFFTSample *tcos;
SINTABLE_CONST AVFFTSample *tsin;
AVFFTContext fft;
- void (*rdft_calc)(struct RDFTContext *s, AVFFTSample *z);
+ void (*rdft_calc)(struct AVRDFTContext *s, AVFFTSample *z);
};
/**
@@ -208,12 +208,12 @@ struct RDFTContext {
* @param nbits log2 of the length of the input array
* @param trans the type of transform
*/
-int ff_rdft_init(RDFTContext *s, int nbits, enum AVRDFTTransformType trans);
-void ff_rdft_end(RDFTContext *s);
+int ff_rdft_init(AVRDFTContext *s, int nbits, enum AVRDFTTransformType trans);
+void ff_rdft_end(AVRDFTContext *s);
-void ff_rdft_init_arm(RDFTContext *s);
+void ff_rdft_init_arm(AVRDFTContext *s);
-static av_always_inline void ff_rdft_calc(RDFTContext *s, AVFFTSample *data)
+static av_always_inline void ff_rdft_calc(AVRDFTContext *s, AVFFTSample *data)
{
s->rdft_calc(s, data);
}
@@ -223,7 +223,7 @@ static av_always_inline void ff_rdft_calc(RDFTContext *s, AVFFTSample *data)
struct DCTContext {
int nbits;
int inverse;
- RDFTContext rdft;
+ AVRDFTContext rdft;
const float *costab;
AVFFTSample *csc2;
void (*dct_calc)(struct DCTContext *s, AVFFTSample *data);
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 41a6e84..613eef2 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -161,7 +161,7 @@ typedef struct {
int fft_coefs_min_index[5];
int fft_coefs_max_index[5];
int fft_level_exp[6];
- RDFTContext rdft_ctx;
+ AVRDFTContext rdft_ctx;
QDM2FFT fft;
/// I/O data
diff --git a/libavcodec/rdft.c b/libavcodec/rdft.c
index ff5e205..4b0beba 100644
--- a/libavcodec/rdft.c
+++ b/libavcodec/rdft.c
@@ -54,7 +54,7 @@ static SINTABLE_CONST AVFFTSample * const ff_sin_tabs[] = {
* the two real FFTs into one complex FFT. Unmangle the results.
* ref: http://www.engineeringproductivitytools.com/stuff/T0001/PT10.HTM
*/
-static void ff_rdft_calc_c(RDFTContext* s, AVFFTSample* data)
+static void ff_rdft_calc_c(AVRDFTContext* s, AVFFTSample* data)
{
int i, i1, i2;
AVFFTComplex ev, od;
@@ -96,7 +96,7 @@ static void ff_rdft_calc_c(RDFTContext* s, AVFFTSample* data)
}
}
-av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum AVRDFTTransformType trans)
+av_cold int ff_rdft_init(AVRDFTContext *s, int nbits, enum AVRDFTTransformType trans)
{
int n = 1 << nbits;
int i;
@@ -127,7 +127,7 @@ av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum AVRDFTTransformType tra
return 0;
}
-av_cold void ff_rdft_end(RDFTContext *s)
+av_cold void ff_rdft_end(AVRDFTContext *s)
{
ff_fft_end(&s->fft);
}
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index ccdfe41..050520b 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -260,7 +260,7 @@ typedef struct {
* smoothing and so on, and context variables for FFT/iFFT.
* @{
*/
- RDFTContext rdft, irdft; ///< contexts for FFT-calculation in the
+ AVRDFTContext rdft, irdft; ///< contexts for FFT-calculation in the
///< postfilter (for denoise filter)
DCTContext dct, dst; ///< contexts for phase shift (in Hilbert
///< transform, part of postfilter)
--
1.7.4.1
More information about the ffmpeg-devel
mailing list