Remove merged patch

This commit is contained in:
Rafaël Carré 2013-01-03 15:03:39 +01:00
parent 63e6d59743
commit aa07e31623
2 changed files with 1 additions and 629 deletions

View File

@ -90,7 +90,7 @@ NDK_TOOLCHAIN_PATH=${ANDROID_NDK}/toolchains/${PATH_HOST}-${GCCVER}/prebuilt/`un
export PATH=${NDK_TOOLCHAIN_PATH}:${PATH}
# 1/ libvlc, libvlccore and its plugins
TESTED_HASH=c3eacd1
TESTED_HASH=d2e405e02c
if [ ! -d "vlc" ]; then
echo "VLC source not found, cloning"
git clone git://git.videolan.org/vlc.git vlc

View File

@ -1,628 +0,0 @@
From d932400b9296ce2549274cf2c8b960c358ce05b2 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(-)
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
index 0000000..99d3338
--- /dev/null
+++ b/contrib/src/ffmpeg/0001-arm-use-HAVE_NEON_INLINE-for-NEON-inline-asm.patch
@@ -0,0 +1,66 @@
+From 6762b92295902894922be0bc634917e72501dd89 Mon Sep 17 00:00:00 2001
+From: Janne Grunau <janne-libav@jannau.net>
+Date: Fri, 5 Oct 2012 17:34:57 +0200
+Subject: [PATCH 3/4] arm: use HAVE_NEON_INLINE for NEON inline asm
+
+This allows a build with -march=armv7-a -mfpu=vfpv3-d16 to still use
+external NEON asm if the target supports it. Since there is no auto
+detection of NEON cpuflags have to be used on targets without NEON.
+
+Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
+---
+ configure | 2 +-
+ libavcodec/arm/aac.h | 4 ++--
+ libavcodec/arm/dca.h | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure b/configure
+index 34680d4..dbdf967 100755
+--- a/configure
++++ b/configure
+@@ -3016,7 +3016,7 @@ EOF
+ enabled armv6 && check_inline_asm armv6 '"sadd16 r0, r0, r0"'
+ enabled armv6t2 && check_inline_asm armv6t2 '"movt r0, #0"'
+ enabled armvfp && check_inline_asm armvfp '"fadds s0, s0, s0"'
+- enabled neon && check_inline_asm neon '"vadd.i16 q0, q0, q0"'
++ enabled neon && check_inline_asm neon_inline '"vadd.i16 q0, q0, q0"'
+ enabled vfpv3 && check_inline_asm vfpv3 '"vmov.f32 s0, #1.0"'
+
+ check_inline_asm asm_mod_q '"add r0, %Q0, %R0" :: "r"((long long)0)'
+diff --git a/libavcodec/arm/aac.h b/libavcodec/arm/aac.h
+index 83b5aef..4f143cb 100644
+--- a/libavcodec/arm/aac.h
++++ b/libavcodec/arm/aac.h
+@@ -23,7 +23,7 @@
+
+ #include "config.h"
+
+-#if HAVE_NEON && HAVE_INLINE_ASM
++#if HAVE_NEON_INLINE
+
+ #define VMUL2 VMUL2
+ static inline float *VMUL2(float *dst, const float *v, unsigned idx,
+@@ -138,6 +138,6 @@ static inline float *VMUL4S(float *dst, const float *v, unsigned idx,
+ return dst;
+ }
+
+-#endif /* HAVE_NEON && HAVE_INLINE_ASM */
++#endif /* HAVE_NEON_INLINE */
+
+ #endif /* AVCODEC_ARM_AAC_H */
+diff --git a/libavcodec/arm/dca.h b/libavcodec/arm/dca.h
+index 9b0efc0..2ba27ee 100644
+--- a/libavcodec/arm/dca.h
++++ b/libavcodec/arm/dca.h
+@@ -79,7 +79,7 @@ static inline int decode_blockcodes(int code1, int code2, int levels,
+
+ #endif
+
+-#if HAVE_NEON && HAVE_INLINE_ASM && HAVE_ASM_MOD_Y
++#if HAVE_NEON_INLINE && HAVE_ASM_MOD_Y
+
+ #define int8x8_fmul_int32 int8x8_fmul_int32
+ static inline void int8x8_fmul_int32(float *dst, const int8_t *src, int scale)
+--
+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 2647fcf..39c43b2 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -1,7 +1,7 @@
# FFmpeg
#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
FFMPEGCONF = \
--cc="$(CC)" \
@@ -53,11 +53,14 @@ endif
# ARM stuff
ifeq ($(ARCH),arm)
FFMPEGCONF += --arch=arm
-ifdef HAVE_NEON
+ifdef HAVE_ARMV7A
FFMPEGCONF += --cpu=cortex-a8 --enable-neon
+FFMPEG_CFLAGS += -mfpu=vfpv3-d16
+ifndef HAVE_ANDROID # We want NEON autodetect on Android
FFMPEG_CFLAGS += -mfpu=neon
endif
endif
+endif
# MIPS stuff
ifeq ($(ARCH),mipsel)
@@ -142,6 +145,8 @@ 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.8.0.1