aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rdft.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-03-20 21:27:03 +0000
committerMåns Rullgård <mans@mansr.com>2010-03-20 21:27:03 +0000
commit2881c83127c680defd1d596200897dd6b6db7977 (patch)
treee5648157f06e6958560b05c2a5a10d8c490785a3 /libavcodec/rdft.c
parentb297129bdb0e779824db9b50440570212df58353 (diff)
downloadffmpeg-2881c83127c680defd1d596200897dd6b6db7977.tar.gz
Call rdft by function pointer
Call the RDFT by a function pointer like other FFT related transforms. This makes instruction set optimized versions possible. Based on patch by Alex Converse. Originally committed as revision 22609 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rdft.c')
-rw-r--r--libavcodec/rdft.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/rdft.c b/libavcodec/rdft.c
index 8d0167798f..0bab696f82 100644
--- a/libavcodec/rdft.c
+++ b/libavcodec/rdft.c
@@ -50,6 +50,8 @@ SINTABLE_CONST FFTSample * const ff_sin_tabs[] = {
ff_sin_2048, ff_sin_4096, ff_sin_8192, ff_sin_16384, ff_sin_32768, ff_sin_65536,
};
+static void ff_rdft_calc_c(RDFTContext* s, FFTSample* data);
+
av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans)
{
int n = 1 << nbits;
@@ -74,6 +76,7 @@ av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans)
s->tsin[i] = sin(i*theta);
}
#endif
+ s->rdft_calc = ff_rdft_calc_c;
return 0;
}
@@ -123,11 +126,6 @@ static void ff_rdft_calc_c(RDFTContext* s, FFTSample* data)
}
}
-void ff_rdft_calc(RDFTContext *s, FFTSample *data)
-{
- ff_rdft_calc_c(s, data);
-}
-
av_cold void ff_rdft_end(RDFTContext *s)
{
ff_fft_end(&s->fft);