1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
From 8e0babd84c7e03cf678aab8bcf7e2106fe2b3de6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Fri, 19 Jul 2013 11:03:32 +0300
Subject: [PATCH 45/49] [ffmpeg] - backport - arm: Add VFP-accelerated version
of dca_lfe_fir
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Before After
Mean StdDev Mean StdDev Change
This function 868.2 33.5 436.0 27.0 +99.1%
Overall 15973.0 223.2 15577.5 83.2 +2.5%
Signed-off-by: Martin Storsjö <martin@martin.st>
---
lib/ffmpeg/libavcodec/arm/Makefile | 3 ++-
lib/ffmpeg/libavcodec/arm/dcadsp_init_arm.c | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/ffmpeg/libavcodec/arm/Makefile b/lib/ffmpeg/libavcodec/arm/Makefile
index 27e80d5..7fe5bb5 100644
--- a/lib/ffmpeg/libavcodec/arm/Makefile
+++ b/lib/ffmpeg/libavcodec/arm/Makefile
@@ -58,7 +58,8 @@ ARMV6-OBJS += arm/dsputil_init_armv6.o \
arm/dsputil_armv6.o \
arm/simple_idct_armv6.o \
-VFP-OBJS-$(CONFIG_DCA_DECODER) += arm/synth_filter_vfp.o
+VFP-OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_vfp.o \
+ arm/synth_filter_vfp.o
VFP-OBJS-$(CONFIG_MDCT) += arm/mdct_vfp.o
VFP-OBJS-$(HAVE_ARMV6) += arm/fmtconvert_vfp.o
diff --git a/lib/ffmpeg/libavcodec/arm/dcadsp_init_arm.c b/lib/ffmpeg/libavcodec/arm/dcadsp_init_arm.c
index 56568e0..a1efbff 100644
--- a/lib/ffmpeg/libavcodec/arm/dcadsp_init_arm.c
+++ b/lib/ffmpeg/libavcodec/arm/dcadsp_init_arm.c
@@ -24,6 +24,8 @@
#include "libavutil/attributes.h"
#include "libavcodec/dcadsp.h"
+void ff_dca_lfe_fir_vfp(float *out, const float *in, const float *coefs,
+ int decifactor, float scale);
void ff_dca_lfe_fir_neon(float *out, const float *in, const float *coefs,
int decifactor, float scale);
@@ -31,6 +33,8 @@ av_cold void ff_dcadsp_init_arm(DCADSPContext *s)
{
int cpu_flags = av_get_cpu_flags();
+ if (have_vfp(cpu_flags) && !have_vfpv3(cpu_flags))
+ s->lfe_fir = ff_dca_lfe_fir_vfp;
if (have_neon(cpu_flags))
s->lfe_fir = ff_dca_lfe_fir_neon;
}
--
1.7.9.5
|