summaryrefslogtreecommitdiff
path: root/libavcodec/arm/vp6dsp_init_arm.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-10-06 20:28:56 +0200
committerDiego Biurrun <diego@biurrun.de>2013-08-23 14:42:19 +0200
commit8506ff97c9ea4a1f52983497ecf8d4ef193403a9 (patch)
treec02b5b1de9259e6f05b0ba373565c12206335109 /libavcodec/arm/vp6dsp_init_arm.c
parent30ce289074e88f528965cb57720674a675639737 (diff)
vp56: Mark VP6-only optimizations as such.
Most of our VP56 optimizations are VP6-only and will stay that way. So avoid compiling them for VP5-only builds.
Diffstat (limited to 'libavcodec/arm/vp6dsp_init_arm.c')
-rw-r--r--libavcodec/arm/vp6dsp_init_arm.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/libavcodec/arm/vp6dsp_init_arm.c b/libavcodec/arm/vp6dsp_init_arm.c
new file mode 100644
index 0000000000..4ec41ed9f1
--- /dev/null
+++ b/libavcodec/arm/vp6dsp_init_arm.c
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2010 Mans Rullgard <mans@mansr.com>
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdint.h>
+
+#include "libavutil/attributes.h"
+#include "libavutil/arm/cpu.h"
+#include "libavcodec/avcodec.h"
+#include "libavcodec/vp56dsp.h"
+
+void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t);
+void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t);
+
+av_cold void ff_vp6dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec)
+{
+ int cpu_flags = av_get_cpu_flags();
+
+ if (have_neon(cpu_flags)) {
+ s->edge_filter_hor = ff_vp6_edge_filter_hor_neon;
+ s->edge_filter_ver = ff_vp6_edge_filter_ver_neon;
+ }
+}