Commit 040b723b authored by Edward Wang's avatar Edward Wang
parent 8a8bdd77
From 91bcedc03953339c64f5ad684a3277d12c87cdcc Mon Sep 17 00:00:00 2001
From bee49c7b23992f49eed829e5653c0973d38b721e Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed, 10 Oct 2012 18:50:06 +0200
Subject: [PATCH 1/2] libavcodec: add NEON runtime autodetection
---
...-use-HAVE_NEON_INLINE-for-NEON-inline-asm.patch | 66 +++
.../0002-arm-call-arm-specific-rv34dsp.patch | 496 +++++++++++++++++++++
contrib/src/ffmpeg/rules.mak | 9 +-
3 files changed, 569 insertions(+), 2 deletions(-)
...-use-HAVE_NEON_INLINE-for-NEON-inline-asm.patch | 66 ++++++++++++++++++++
contrib/src/ffmpeg/rules.mak | 8 ++-
2 files changed, 72 insertions(+), 2 deletions(-)
create mode 100644 contrib/src/ffmpeg/0001-arm-use-HAVE_NEON_INLINE-for-NEON-inline-asm.patch
create mode 100644 contrib/src/ffmpeg/0002-arm-call-arm-specific-rv34dsp.patch
diff --git a/contrib/src/ffmpeg/0001-arm-use-HAVE_NEON_INLINE-for-NEON-inline-asm.patch b/contrib/src/ffmpeg/0001-arm-use-HAVE_NEON_INLINE-for-NEON-inline-asm.patch
new file mode 100644
......@@ -83,510 +81,8 @@ index 0000000..99d3338
+--
+1.7.12.2
+
diff --git a/contrib/src/ffmpeg/0002-arm-call-arm-specific-rv34dsp.patch b/contrib/src/ffmpeg/0002-arm-call-arm-specific-rv34dsp.patch
new file mode 100644
index 0000000..1976eb1
--- /dev/null
+++ b/contrib/src/ffmpeg/0002-arm-call-arm-specific-rv34dsp.patch
@@ -0,0 +1,496 @@
+From 507dce2536fea4b78a9f4973f77e1fa20cfe1b81 Mon Sep 17 00:00:00 2001
+From: Jean-Baptiste Kempf <jb@videolan.org>
+Date: Fri, 5 Oct 2012 09:12:04 +0000
+Subject: [PATCH] arm: call arm-specific rv34dsp init functions under if (ARCH_ARM)
+
+Assign NEON specific function pointers after runtime check via
+av_get_cpu_flags().
+
+Signed-off-by: Janne Grunau <janne-libav@jannau.net>
+---
+ libavcodec/arm/Makefile | 12 ++--
+ libavcodec/arm/rv34dsp_init_arm.c | 45 +++++++++++
+ libavcodec/arm/rv34dsp_init_neon.c | 40 ----------
+ libavcodec/arm/rv40dsp_init_arm.c | 147 ++++++++++++++++++++++++++++++++++++
+ libavcodec/arm/rv40dsp_init_neon.c | 138 ---------------------------------
+ libavcodec/rv34dsp.c | 4 +-
+ libavcodec/rv34dsp.h | 4 +-
+ libavcodec/rv40dsp.c | 4 +-
+ 8 files changed, 204 insertions(+), 190 deletions(-)
+ create mode 100644 libavcodec/arm/rv34dsp_init_arm.c
+ delete mode 100644 libavcodec/arm/rv34dsp_init_neon.c
+ create mode 100644 libavcodec/arm/rv40dsp_init_arm.c
+ delete mode 100644 libavcodec/arm/rv40dsp_init_neon.c
+
+diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
+index f537e4f..acfd626 100644
+--- a/libavcodec/arm/Makefile
++++ b/libavcodec/arm/Makefile
+@@ -25,6 +25,10 @@
+ OBJS-$(CONFIG_H264DSP) += arm/h264dsp_init_arm.o
+ OBJS-$(CONFIG_H264PRED) += arm/h264pred_init_arm.o
+
++OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_init_arm.o
++OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_init_arm.o \
++ arm/rv40dsp_init_arm.o \
++
+ OBJS += arm/dsputil_init_arm.o \
+ arm/dsputil_arm.o \
+ arm/fft_init_arm.o \
+@@ -70,12 +74,8 @@
+ NEON-OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_neon.o \
+ arm/synth_filter_neon.o \
+
+-NEON-OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_init_neon.o \
+- arm/rv34dsp_neon.o \
+-
+-NEON-OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_init_neon.o \
+- arm/rv34dsp_neon.o \
+- arm/rv40dsp_init_neon.o \
++NEON-OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_neon.o
++NEON-OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_neon.o \
+ arm/rv40dsp_neon.o \
+ arm/h264cmc_neon.o \
+
+diff --git a/libavcodec/arm/rv34dsp_init_arm.c b/libavcodec/arm/rv34dsp_init_arm.c
+new file mode 100644
+index 0000000..07f5598
+--- /dev/null
++++ b/libavcodec/arm/rv34dsp_init_arm.c
+@@ -0,0 +1,45 @@
++/*
++ * Copyright (c) 2011 Janne Grunau <janne-libav@jannau.net>
++ *
++ * 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 "libavcodec/avcodec.h"
++#include "libavcodec/rv34dsp.h"
++#include "libavutil/arm/cpu.h"
++
++void ff_rv34_inv_transform_noround_neon(DCTELEM *block);
++
++void ff_rv34_inv_transform_noround_dc_neon(DCTELEM *block);
++
++void ff_rv34_idct_add_neon(uint8_t *dst, ptrdiff_t stride, DCTELEM *block);
++void ff_rv34_idct_dc_add_neon(uint8_t *dst, ptrdiff_t stride, int dc);
++
++void ff_rv34dsp_init_arm(RV34DSPContext *c, DSPContext* dsp)
++{
++ int cpu_flags = av_get_cpu_flags();
++
++ if (have_neon(cpu_flags)) {
++ c->rv34_inv_transform = ff_rv34_inv_transform_noround_neon;
++ c->rv34_inv_transform_dc = ff_rv34_inv_transform_noround_dc_neon;
++
++ c->rv34_idct_add = ff_rv34_idct_add_neon;
++ c->rv34_idct_dc_add = ff_rv34_idct_dc_add_neon;
++ }
++}
+diff --git a/libavcodec/arm/rv34dsp_init_neon.c b/libavcodec/arm/rv34dsp_init_neon.c
+deleted file mode 100644
+index b4a2f01..0000000
+--- a/libavcodec/arm/rv34dsp_init_neon.c
++++ /dev/null
+@@ -1,40 +0,0 @@
+-/*
+- * Copyright (c) 2011 Janne Grunau <janne-libav@jannau.net>
+- *
+- * 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 "libavcodec/avcodec.h"
+-#include "libavcodec/rv34dsp.h"
+-
+-void ff_rv34_inv_transform_noround_neon(DCTELEM *block);
+-
+-void ff_rv34_inv_transform_noround_dc_neon(DCTELEM *block);
+-
+-void ff_rv34_idct_add_neon(uint8_t *dst, ptrdiff_t stride, DCTELEM *block);
+-void ff_rv34_idct_dc_add_neon(uint8_t *dst, ptrdiff_t stride, int dc);
+-
+-void ff_rv34dsp_init_neon(RV34DSPContext *c, DSPContext* dsp)
+-{
+- c->rv34_inv_transform = ff_rv34_inv_transform_noround_neon;
+- c->rv34_inv_transform_dc = ff_rv34_inv_transform_noround_dc_neon;
+-
+- c->rv34_idct_add = ff_rv34_idct_add_neon;
+- c->rv34_idct_dc_add = ff_rv34_idct_dc_add_neon;
+-}
+diff --git a/libavcodec/arm/rv40dsp_init_arm.c b/libavcodec/arm/rv40dsp_init_arm.c
+new file mode 100644
+index 0000000..83f4355
+--- /dev/null
++++ b/libavcodec/arm/rv40dsp_init_arm.c
+@@ -0,0 +1,147 @@
++/*
++ * Copyright (c) 2011 Janne Grunau <janne-libav@jannau.net>
++ *
++ * 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 "libavcodec/avcodec.h"
++#include "libavcodec/rv34dsp.h"
++#include "libavutil/arm/cpu.h"
++
++#define DECL_QPEL3(type, w, pos) \
++ void ff_##type##_rv40_qpel##w##_mc##pos##_neon(uint8_t *dst, uint8_t *src,\
++ int stride)
++#define DECL_QPEL2(w, pos) \
++ DECL_QPEL3(put, w, pos); \
++ DECL_QPEL3(avg, w, pos)
++
++#define DECL_QPEL_XY(x, y) \
++ DECL_QPEL2(16, x ## y); \
++ DECL_QPEL2(8, x ## y)
++
++#define DECL_QPEL_Y(y) \
++ DECL_QPEL_XY(0, y); \
++ DECL_QPEL_XY(1, y); \
++ DECL_QPEL_XY(2, y); \
++ DECL_QPEL_XY(3, y); \
++
++DECL_QPEL_Y(0);
++DECL_QPEL_Y(1);
++DECL_QPEL_Y(2);
++DECL_QPEL_Y(3);
++
++void ff_put_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
++void ff_put_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
++
++void ff_avg_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
++void ff_avg_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
++
++void ff_rv40_weight_func_16_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t);
++void ff_rv40_weight_func_8_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t);
++
++int ff_rv40_h_loop_filter_strength_neon(uint8_t *src, ptrdiff_t stride,
++ int beta, int beta2, int edge,
++ int *p1, int *q1);
++int ff_rv40_v_loop_filter_strength_neon(uint8_t *src, ptrdiff_t stride,
++ int beta, int beta2, int edge,
++ int *p1, int *q1);
++
++void ff_rv40_h_weak_loop_filter_neon(uint8_t *src, ptrdiff_t stride, int filter_p1,
++ int filter_q1, int alpha, int beta,
++ int lim_p0q0, int lim_q1, int lim_p1);
++void ff_rv40_v_weak_loop_filter_neon(uint8_t *src, ptrdiff_t stride, int filter_p1,
++ int filter_q1, int alpha, int beta,
++ int lim_p0q0, int lim_q1, int lim_p1);
++
++static void ff_rv40dsp_init_neon(RV34DSPContext *c)
++{
++ c->put_pixels_tab[0][ 1] = ff_put_rv40_qpel16_mc10_neon;
++ c->put_pixels_tab[0][ 3] = ff_put_rv40_qpel16_mc30_neon;
++ c->put_pixels_tab[0][ 4] = ff_put_rv40_qpel16_mc01_neon;
++ c->put_pixels_tab[0][ 5] = ff_put_rv40_qpel16_mc11_neon;
++ c->put_pixels_tab[0][ 6] = ff_put_rv40_qpel16_mc21_neon;
++ c->put_pixels_tab[0][ 7] = ff_put_rv40_qpel16_mc31_neon;
++ c->put_pixels_tab[0][ 9] = ff_put_rv40_qpel16_mc12_neon;
++ c->put_pixels_tab[0][10] = ff_put_rv40_qpel16_mc22_neon;
++ c->put_pixels_tab[0][11] = ff_put_rv40_qpel16_mc32_neon;
++ c->put_pixels_tab[0][12] = ff_put_rv40_qpel16_mc03_neon;
++ c->put_pixels_tab[0][13] = ff_put_rv40_qpel16_mc13_neon;
++ c->put_pixels_tab[0][14] = ff_put_rv40_qpel16_mc23_neon;
++ c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_neon;
++ c->avg_pixels_tab[0][ 1] = ff_avg_rv40_qpel16_mc10_neon;
++ c->avg_pixels_tab[0][ 3] = ff_avg_rv40_qpel16_mc30_neon;
++ c->avg_pixels_tab[0][ 4] = ff_avg_rv40_qpel16_mc01_neon;
++ c->avg_pixels_tab[0][ 5] = ff_avg_rv40_qpel16_mc11_neon;
++ c->avg_pixels_tab[0][ 6] = ff_avg_rv40_qpel16_mc21_neon;
++ c->avg_pixels_tab[0][ 7] = ff_avg_rv40_qpel16_mc31_neon;
++ c->avg_pixels_tab[0][ 9] = ff_avg_rv40_qpel16_mc12_neon;
++ c->avg_pixels_tab[0][10] = ff_avg_rv40_qpel16_mc22_neon;
++ c->avg_pixels_tab[0][11] = ff_avg_rv40_qpel16_mc32_neon;
++ c->avg_pixels_tab[0][12] = ff_avg_rv40_qpel16_mc03_neon;
++ c->avg_pixels_tab[0][13] = ff_avg_rv40_qpel16_mc13_neon;
++ c->avg_pixels_tab[0][14] = ff_avg_rv40_qpel16_mc23_neon;
++ c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_neon;
++ c->put_pixels_tab[1][ 1] = ff_put_rv40_qpel8_mc10_neon;
++ c->put_pixels_tab[1][ 3] = ff_put_rv40_qpel8_mc30_neon;
++ c->put_pixels_tab[1][ 4] = ff_put_rv40_qpel8_mc01_neon;
++ c->put_pixels_tab[1][ 5] = ff_put_rv40_qpel8_mc11_neon;
++ c->put_pixels_tab[1][ 6] = ff_put_rv40_qpel8_mc21_neon;
++ c->put_pixels_tab[1][ 7] = ff_put_rv40_qpel8_mc31_neon;
++ c->put_pixels_tab[1][ 9] = ff_put_rv40_qpel8_mc12_neon;
++ c->put_pixels_tab[1][10] = ff_put_rv40_qpel8_mc22_neon;
++ c->put_pixels_tab[1][11] = ff_put_rv40_qpel8_mc32_neon;
++ c->put_pixels_tab[1][12] = ff_put_rv40_qpel8_mc03_neon;
++ c->put_pixels_tab[1][13] = ff_put_rv40_qpel8_mc13_neon;
++ c->put_pixels_tab[1][14] = ff_put_rv40_qpel8_mc23_neon;
++ c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_neon;
++ c->avg_pixels_tab[1][ 1] = ff_avg_rv40_qpel8_mc10_neon;
++ c->avg_pixels_tab[1][ 3] = ff_avg_rv40_qpel8_mc30_neon;
++ c->avg_pixels_tab[1][ 4] = ff_avg_rv40_qpel8_mc01_neon;
++ c->avg_pixels_tab[1][ 5] = ff_avg_rv40_qpel8_mc11_neon;
++ c->avg_pixels_tab[1][ 6] = ff_avg_rv40_qpel8_mc21_neon;
++ c->avg_pixels_tab[1][ 7] = ff_avg_rv40_qpel8_mc31_neon;
++ c->avg_pixels_tab[1][ 9] = ff_avg_rv40_qpel8_mc12_neon;
++ c->avg_pixels_tab[1][10] = ff_avg_rv40_qpel8_mc22_neon;
++ c->avg_pixels_tab[1][11] = ff_avg_rv40_qpel8_mc32_neon;
++ c->avg_pixels_tab[1][12] = ff_avg_rv40_qpel8_mc03_neon;
++ c->avg_pixels_tab[1][13] = ff_avg_rv40_qpel8_mc13_neon;
++ c->avg_pixels_tab[1][14] = ff_avg_rv40_qpel8_mc23_neon;
++ c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_neon;
++
++ c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_neon;
++ c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_neon;
++ c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_neon;
++ c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_neon;
++
++ c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_16_neon;
++ c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_8_neon;
++
++ c->rv40_loop_filter_strength[0] = ff_rv40_h_loop_filter_strength_neon;
++ c->rv40_loop_filter_strength[1] = ff_rv40_v_loop_filter_strength_neon;
++ c->rv40_weak_loop_filter[0] = ff_rv40_h_weak_loop_filter_neon;
++ c->rv40_weak_loop_filter[1] = ff_rv40_v_weak_loop_filter_neon;
++}
++
++void ff_rv40dsp_init_arm(RV34DSPContext *c, DSPContext* dsp)
++{
++ int cpu_flags = av_get_cpu_flags();
++
++ if (have_neon(cpu_flags))
++ ff_rv40dsp_init_neon(c);
++}
+diff --git a/libavcodec/arm/rv40dsp_init_neon.c b/libavcodec/arm/rv40dsp_init_neon.c
+deleted file mode 100644
+index 2ce50a2..0000000
+--- a/libavcodec/arm/rv40dsp_init_neon.c
++++ /dev/null
+@@ -1,138 +0,0 @@
+-/*
+- * Copyright (c) 2011 Janne Grunau <janne-libav@jannau.net>
+- *
+- * 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 "libavcodec/avcodec.h"
+-#include "libavcodec/rv34dsp.h"
+-
+-#define DECL_QPEL3(type, w, pos) \
+- void ff_##type##_rv40_qpel##w##_mc##pos##_neon(uint8_t *dst, uint8_t *src,\
+- int stride)
+-#define DECL_QPEL2(w, pos) \
+- DECL_QPEL3(put, w, pos); \
+- DECL_QPEL3(avg, w, pos)
+-
+-#define DECL_QPEL_XY(x, y) \
+- DECL_QPEL2(16, x ## y); \
+- DECL_QPEL2(8, x ## y)
+-
+-#define DECL_QPEL_Y(y) \
+- DECL_QPEL_XY(0, y); \
+- DECL_QPEL_XY(1, y); \
+- DECL_QPEL_XY(2, y); \
+- DECL_QPEL_XY(3, y); \
+-
+-DECL_QPEL_Y(0);
+-DECL_QPEL_Y(1);
+-DECL_QPEL_Y(2);
+-DECL_QPEL_Y(3);
+-
+-void ff_put_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
+-void ff_put_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
+-
+-void ff_avg_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
+-void ff_avg_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
+-
+-void ff_rv40_weight_func_16_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t);
+-void ff_rv40_weight_func_8_neon(uint8_t *, uint8_t *, uint8_t *, int, int, ptrdiff_t);
+-
+-int ff_rv40_h_loop_filter_strength_neon(uint8_t *src, ptrdiff_t stride,
+- int beta, int beta2, int edge,
+- int *p1, int *q1);
+-int ff_rv40_v_loop_filter_strength_neon(uint8_t *src, ptrdiff_t stride,
+- int beta, int beta2, int edge,
+- int *p1, int *q1);
+-
+-void ff_rv40_h_weak_loop_filter_neon(uint8_t *src, ptrdiff_t stride, int filter_p1,
+- int filter_q1, int alpha, int beta,
+- int lim_p0q0, int lim_q1, int lim_p1);
+-void ff_rv40_v_weak_loop_filter_neon(uint8_t *src, ptrdiff_t stride, int filter_p1,
+- int filter_q1, int alpha, int beta,
+- int lim_p0q0, int lim_q1, int lim_p1);
+-
+-void ff_rv40dsp_init_neon(RV34DSPContext *c, DSPContext* dsp)
+-{
+- c->put_pixels_tab[0][ 1] = ff_put_rv40_qpel16_mc10_neon;
+- c->put_pixels_tab[0][ 3] = ff_put_rv40_qpel16_mc30_neon;
+- c->put_pixels_tab[0][ 4] = ff_put_rv40_qpel16_mc01_neon;
+- c->put_pixels_tab[0][ 5] = ff_put_rv40_qpel16_mc11_neon;
+- c->put_pixels_tab[0][ 6] = ff_put_rv40_qpel16_mc21_neon;
+- c->put_pixels_tab[0][ 7] = ff_put_rv40_qpel16_mc31_neon;
+- c->put_pixels_tab[0][ 9] = ff_put_rv40_qpel16_mc12_neon;
+- c->put_pixels_tab[0][10] = ff_put_rv40_qpel16_mc22_neon;
+- c->put_pixels_tab[0][11] = ff_put_rv40_qpel16_mc32_neon;
+- c->put_pixels_tab[0][12] = ff_put_rv40_qpel16_mc03_neon;
+- c->put_pixels_tab[0][13] = ff_put_rv40_qpel16_mc13_neon;
+- c->put_pixels_tab[0][14] = ff_put_rv40_qpel16_mc23_neon;
+- c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_neon;
+- c->avg_pixels_tab[0][ 1] = ff_avg_rv40_qpel16_mc10_neon;
+- c->avg_pixels_tab[0][ 3] = ff_avg_rv40_qpel16_mc30_neon;
+- c->avg_pixels_tab[0][ 4] = ff_avg_rv40_qpel16_mc01_neon;
+- c->avg_pixels_tab[0][ 5] = ff_avg_rv40_qpel16_mc11_neon;
+- c->avg_pixels_tab[0][ 6] = ff_avg_rv40_qpel16_mc21_neon;
+- c->avg_pixels_tab[0][ 7] = ff_avg_rv40_qpel16_mc31_neon;
+- c->avg_pixels_tab[0][ 9] = ff_avg_rv40_qpel16_mc12_neon;
+- c->avg_pixels_tab[0][10] = ff_avg_rv40_qpel16_mc22_neon;
+- c->avg_pixels_tab[0][11] = ff_avg_rv40_qpel16_mc32_neon;
+- c->avg_pixels_tab[0][12] = ff_avg_rv40_qpel16_mc03_neon;
+- c->avg_pixels_tab[0][13] = ff_avg_rv40_qpel16_mc13_neon;
+- c->avg_pixels_tab[0][14] = ff_avg_rv40_qpel16_mc23_neon;
+- c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_neon;
+- c->put_pixels_tab[1][ 1] = ff_put_rv40_qpel8_mc10_neon;
+- c->put_pixels_tab[1][ 3] = ff_put_rv40_qpel8_mc30_neon;
+- c->put_pixels_tab[1][ 4] = ff_put_rv40_qpel8_mc01_neon;
+- c->put_pixels_tab[1][ 5] = ff_put_rv40_qpel8_mc11_neon;
+- c->put_pixels_tab[1][ 6] = ff_put_rv40_qpel8_mc21_neon;
+- c->put_pixels_tab[1][ 7] = ff_put_rv40_qpel8_mc31_neon;
+- c->put_pixels_tab[1][ 9] = ff_put_rv40_qpel8_mc12_neon;
+- c->put_pixels_tab[1][10] = ff_put_rv40_qpel8_mc22_neon;
+- c->put_pixels_tab[1][11] = ff_put_rv40_qpel8_mc32_neon;
+- c->put_pixels_tab[1][12] = ff_put_rv40_qpel8_mc03_neon;
+- c->put_pixels_tab[1][13] = ff_put_rv40_qpel8_mc13_neon;
+- c->put_pixels_tab[1][14] = ff_put_rv40_qpel8_mc23_neon;
+- c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_neon;
+- c->avg_pixels_tab[1][ 1] = ff_avg_rv40_qpel8_mc10_neon;
+- c->avg_pixels_tab[1][ 3] = ff_avg_rv40_qpel8_mc30_neon;
+- c->avg_pixels_tab[1][ 4] = ff_avg_rv40_qpel8_mc01_neon;
+- c->avg_pixels_tab[1][ 5] = ff_avg_rv40_qpel8_mc11_neon;
+- c->avg_pixels_tab[1][ 6] = ff_avg_rv40_qpel8_mc21_neon;
+- c->avg_pixels_tab[1][ 7] = ff_avg_rv40_qpel8_mc31_neon;
+- c->avg_pixels_tab[1][ 9] = ff_avg_rv40_qpel8_mc12_neon;
+- c->avg_pixels_tab[1][10] = ff_avg_rv40_qpel8_mc22_neon;
+- c->avg_pixels_tab[1][11] = ff_avg_rv40_qpel8_mc32_neon;
+- c->avg_pixels_tab[1][12] = ff_avg_rv40_qpel8_mc03_neon;
+- c->avg_pixels_tab[1][13] = ff_avg_rv40_qpel8_mc13_neon;
+- c->avg_pixels_tab[1][14] = ff_avg_rv40_qpel8_mc23_neon;
+- c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_neon;
+-
+- c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_neon;
+- c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_neon;
+- c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_neon;
+- c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_neon;
+-
+- c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_16_neon;
+- c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_8_neon;
+-
+- c->rv40_loop_filter_strength[0] = ff_rv40_h_loop_filter_strength_neon;
+- c->rv40_loop_filter_strength[1] = ff_rv40_v_loop_filter_strength_neon;
+- c->rv40_weak_loop_filter[0] = ff_rv40_h_weak_loop_filter_neon;
+- c->rv40_weak_loop_filter[1] = ff_rv40_v_weak_loop_filter_neon;
+-}
+diff --git a/libavcodec/rv34dsp.c b/libavcodec/rv34dsp.c
+index 25e8c3d..86a2ffd 100644
+--- a/libavcodec/rv34dsp.c
++++ b/libavcodec/rv34dsp.c
+@@ -135,8 +135,8 @@
+ c->rv34_idct_add = rv34_idct_add_c;
+ c->rv34_idct_dc_add = rv34_idct_dc_add_c;
+
+- if (HAVE_NEON)
+- ff_rv34dsp_init_neon(c, dsp);
++ if (HAVE_NEON)
++ ff_rv34dsp_init_arm(c, dsp);
+ if (HAVE_MMX)
+ ff_rv34dsp_init_x86(c, dsp);
+ }diff --git a/libavcodec/rv34dsp.h b/libavcodec/rv34dsp.h
+index 58da59f..f0263b1 100644
+--- a/libavcodec/rv34dsp.h
++++ b/libavcodec/rv34dsp.h
+@@ -77,10 +77,10 @@ void ff_rv30dsp_init(RV34DSPContext *c, DSPContext* dsp);
+ void ff_rv34dsp_init(RV34DSPContext *c, DSPContext* dsp);
+ void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp);
+
+-void ff_rv34dsp_init_neon(RV34DSPContext *c, DSPContext *dsp);
++void ff_rv34dsp_init_arm(RV34DSPContext *c, DSPContext *dsp);
+ void ff_rv34dsp_init_x86(RV34DSPContext *c, DSPContext *dsp);
+
+ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp);
+-void ff_rv40dsp_init_neon(RV34DSPContext *c, DSPContext *dsp);
++void ff_rv40dsp_init_arm(RV34DSPContext *c, DSPContext *dsp);
+
+ #endif /* AVCODEC_RV34DSP_H */
+diff --git a/libavcodec/rv40dsp.c b/libavcodec/rv40dsp.c
+index 36188d2..c6968d9 100644
+--- a/libavcodec/rv40dsp.c
++++ b/libavcodec/rv40dsp.c
+@@ -605,6 +605,6 @@ av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) {
+
+ if (ARCH_X86)
+ ff_rv40dsp_init_x86(c, dsp);
+- if (HAVE_NEON)
+- ff_rv40dsp_init_neon(c, dsp);
++ if (ARCH_ARM)
++ ff_rv40dsp_init_arm(c, dsp);
+ }
+--
+1.7.2.5
+
+
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 4b99a1b..a327800 100644
index 4b99a1b..05f7c5e 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -1,7 +1,7 @@
......@@ -594,7 +90,7 @@ index 4b99a1b..a327800 100644
#FFMPEG_SNAPURL := http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=HEAD;sf=tgz
-FFMPEG_SNAPURL := http://git.libav.org/?p=libav.git;a=snapshot;h=HEAD;sf=tgz
+FFMPEG_SNAPURL := http://git.libav.org/?p=libav.git;a=snapshot;h=1a8c6917f68f;sf=tgz
+FFMPEG_SNAPURL := http://git.libav.org/?p=libav.git;a=snapshot;h=620345f;sf=tgz
FFMPEGCONF = \
--cc="$(CC)" \
......@@ -614,15 +110,14 @@ index 4b99a1b..a327800 100644
# x86 stuff
ifeq ($(ARCH),i386)
@@ -137,6 +140,8 @@ ffmpeg: ffmpeg-$(FFMPEG_VERSION).tar.gz .sum-ffmpeg
@@ -137,6 +140,7 @@ ffmpeg: ffmpeg-$(FFMPEG_VERSION).tar.gz .sum-ffmpeg
rm -Rf $@ $@-git
mkdir -p $@-git
$(ZCAT) "$<" | (cd $@-git && tar xv --strip-components=1)
+ $(APPLY) $(SRC)/ffmpeg/0001-arm-use-HAVE_NEON_INLINE-for-NEON-inline-asm.patch
+ $(APPLY) $(SRC)/ffmpeg/0002-arm-call-arm-specific-rv34dsp.patch
$(MOVE)
.ffmpeg: ffmpeg
--
1.7.12.3
1.7.5.4
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment