summaryrefslogtreecommitdiff
path: root/libavcodec/arm/fft_init_arm.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-07-19 10:59:17 +0300
committerMartin Storsjö <martin@martin.st>2013-07-22 10:15:37 +0300
commitb63bb251ea6d6ba23295294e37a92625c0192206 (patch)
tree0557efc37e13206b791ac55ed6c2302e3272776e /libavcodec/arm/fft_init_arm.c
parentd6e4f5fef0d811e180fd7541941e07dca9e11dc0 (diff)
arm: Add VFP-accelerated version of imdct_half
Before After Mean StdDev Mean StdDev Change This function 2653.0 28.5 1108.8 51.4 +139.3% Overall 17049.5 408.2 15973.0 223.2 +6.7% Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/arm/fft_init_arm.c')
-rw-r--r--libavcodec/arm/fft_init_arm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/arm/fft_init_arm.c b/libavcodec/arm/fft_init_arm.c
index 133fb84f69..1c4568ddc2 100644
--- a/libavcodec/arm/fft_init_arm.c
+++ b/libavcodec/arm/fft_init_arm.c
@@ -26,6 +26,8 @@
void ff_fft_permute_neon(FFTContext *s, FFTComplex *z);
void ff_fft_calc_neon(FFTContext *s, FFTComplex *z);
+void ff_imdct_half_vfp(FFTContext *s, FFTSample *output, const FFTSample *input);
+
void ff_imdct_calc_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
void ff_imdct_half_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
void ff_mdct_calc_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
@@ -48,6 +50,13 @@ av_cold void ff_fft_init_arm(FFTContext *s)
{
int cpu_flags = av_get_cpu_flags();
+ if (have_vfp(cpu_flags)) {
+#if CONFIG_MDCT
+ if (!have_vfpv3(cpu_flags))
+ s->imdct_half = ff_imdct_half_vfp;
+#endif
+ }
+
if (have_neon(cpu_flags)) {
s->fft_permute = ff_fft_permute_neon;
s->fft_calc = ff_fft_calc_neon;