Commit a756d4e5 authored by Marvin Scholz's avatar Marvin Scholz

contrib: Update ffmpeg and libav to recent hashes

parent a741787c
From bb88d98dd80ab5bb1d41ddf635ce293d5679726b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Fri, 30 Mar 2018 12:33:46 +0300
Subject: [PATCH 2/5] arm: Produce .const_data instead of .section .rodata for
Mach-O
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This is the same combination of .section directives as used in
aarch64/asm.S.
Since Xcode 9.3, the bundled clang supports altmacro and doesn't
require using gas-preprocessor any longer.
Signed-off-by: Martin Storsjö <martin@martin.st>
---
libavutil/arm/asm.S | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index eb689a1..6744f2a 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -111,11 +111,17 @@ FUNC .func \name
ELF .size \name, . - \name
.purgem endconst
.endm
-.if HAVE_SECTION_DATA_REL_RO && \relocate
+#if HAVE_SECTION_DATA_REL_RO
+.if \relocate
.section .data.rel.ro
.else
.section .rodata
.endif
+#elif !defined(__MACH__)
+ .section .rodata
+#else
+ .const_data
+#endif
.align \align
\name:
.endm
--
2.7.4
From b4ad8b2a18be134c2963371f4da1d80aff8ab433 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Sat, 31 Mar 2018 21:54:32 +0300
Subject: [PATCH 3/5] arm: swscale: Only compile the rgb2yuv asm if .dn aliases
are supported
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Vanilla clang supports altmacro since clang 5.0, and thus doesn't
require gas-preprocessor for building the arm assembly any longer.
However, the built-in assembler doesn't support .dn directives.
This readds checks that were removed in d7320ca3ed10f0d, when
the last usage of .dn directives within libav were removed.
Alternatively, the assembly could be rewritten to not use the
.dn directive, making it available to clang users.
Signed-off-by: Martin Storsjö <martin@martin.st>
---
configure | 5 +++++
libswscale/arm/rgb2yuv_neon_16.S | 3 +++
libswscale/arm/rgb2yuv_neon_32.S | 3 +++
libswscale/arm/swscale_unscaled.c | 6 ++++++
4 files changed, 17 insertions(+)
diff --git a/configure b/configure
index d5bbb5b..20c5565 100755
--- a/configure
+++ b/configure
@@ -2063,6 +2063,7 @@ SYSTEM_LIBRARIES="
TOOLCHAIN_FEATURES="
as_arch_directive
+ as_dn_directive
as_fpu_directive
as_func
as_object_arch
@@ -5397,6 +5398,10 @@ EOF
check_as <<EOF && enable as_arch_directive
.arch armv7-a
EOF
+ check_as <<EOF && enable as_dn_directive
+ra .dn d0.i16
+.unreq ra
+EOF
check_as <<EOF && enable as_fpu_directive
.fpu neon
EOF
diff --git a/libswscale/arm/rgb2yuv_neon_16.S b/libswscale/arm/rgb2yuv_neon_16.S
index 601bc9a..ad7e679 100644
--- a/libswscale/arm/rgb2yuv_neon_16.S
+++ b/libswscale/arm/rgb2yuv_neon_16.S
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+#if HAVE_AS_DN_DIRECTIVE
#include "rgb2yuv_neon_common.S"
/* downsampled R16G16B16 x8 */
@@ -78,3 +80,4 @@ alias_qw c8x8x2, q10
.endm
loop_420sp rgbx, nv12, init, kernel_420_16x2, 16
+#endif
diff --git a/libswscale/arm/rgb2yuv_neon_32.S b/libswscale/arm/rgb2yuv_neon_32.S
index f51a5f1..4fd0f64 100644
--- a/libswscale/arm/rgb2yuv_neon_32.S
+++ b/libswscale/arm/rgb2yuv_neon_32.S
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+#if HAVE_AS_DN_DIRECTIVE
#include "rgb2yuv_neon_common.S"
/* downsampled R16G16B16 x8 */
@@ -117,3 +119,4 @@ alias_qw c8x8x2, q10
loop_420sp rgbx, nv12, init, kernel_420_16x2, 32
+#endif
diff --git a/libswscale/arm/swscale_unscaled.c b/libswscale/arm/swscale_unscaled.c
index e1597ab..e41f294 100644
--- a/libswscale/arm/swscale_unscaled.c
+++ b/libswscale/arm/swscale_unscaled.c
@@ -23,6 +23,7 @@
#include "libswscale/swscale_internal.h"
#include "libavutil/arm/cpu.h"
+#if HAVE_AS_DN_DIRECTIVE
extern void rgbx_to_nv12_neon_32(const uint8_t *src, uint8_t *y, uint8_t *chroma,
int width, int height,
int y_stride, int c_stride, int src_stride,
@@ -178,3 +179,8 @@ void ff_get_unscaled_swscale_arm(SwsContext *c)
if (have_neon(cpu_flags))
get_unscaled_swscale_neon(c);
}
+#else
+void ff_get_unscaled_swscale_arm(SwsContext *c)
+{
+}
+#endif
--
2.7.4
From abb4a27ace289212626a20b200a42aa90bf4de8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Sat, 31 Mar 2018 21:54:41 +0300
Subject: [PATCH 4/5] arm: hevcdsp: Avoid using macro expansion counters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Clang supports the macro expansion counter (used for making unique
labels within macro expansions), but not when targeting darwin.
Convert uses of the counter into normal local labels, as used
elsewhere.
Since Xcode 9.3, the bundled clang supports altmacro and doesn't
require using gas-preprocessor any longer.
Signed-off-by: Martin Storsjö <martin@martin.st>
---
libavcodec/arm/hevcdsp_deblock_neon.S | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/arm/hevcdsp_deblock_neon.S b/libavcodec/arm/hevcdsp_deblock_neon.S
index 166bddb..7cb7487 100644
--- a/libavcodec/arm/hevcdsp_deblock_neon.S
+++ b/libavcodec/arm/hevcdsp_deblock_neon.S
@@ -152,7 +152,7 @@
and r9, r8, r7
cmp r9, #0
- beq weakfilter_\@
+ beq 1f
vadd.i16 q2, q11, q12
vadd.i16 q4, q9, q8
@@ -210,11 +210,11 @@
vbit q13, q3, q5
vbit q14, q2, q5
-weakfilter_\@:
+1:
mvn r8, r8
and r9, r8, r7
cmp r9, #0
- beq ready_\@
+ beq 2f
vdup.16 q4, r2
@@ -275,7 +275,7 @@ weakfilter_\@:
vbit q11, q0, q5
vbit q12, q4, q5
-ready_\@:
+2:
vqmovun.s16 d16, q8
vqmovun.s16 d18, q9
vqmovun.s16 d20, q10
--
2.7.4
From ecd4c9276b8407b912551ddb74b376cbcbe02e30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Sat, 31 Mar 2018 21:54:46 +0300
Subject: [PATCH 5/5] arm: hevcdsp: Add commas between macro arguments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When targeting darwin, clang requires commas between arguments,
while the no-comma form is allowed for other targets.
Since Xcode 9.3, the bundled clang supports altmacro and doesn't
require using gas-preprocessor any longer.
Signed-off-by: Martin Storsjö <martin@martin.st>
---
libavcodec/arm/hevcdsp_qpel_neon.S | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/libavcodec/arm/hevcdsp_qpel_neon.S b/libavcodec/arm/hevcdsp_qpel_neon.S
index 86f92cf..caa6efa 100644
--- a/libavcodec/arm/hevcdsp_qpel_neon.S
+++ b/libavcodec/arm/hevcdsp_qpel_neon.S
@@ -667,76 +667,76 @@ endfunc
function ff_hevc_put_qpel_h1v1_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_1 qpel_filter_1_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_1, qpel_filter_1_32b
endfunc
function ff_hevc_put_qpel_h2v1_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_2 qpel_filter_1_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_2, qpel_filter_1_32b
endfunc
function ff_hevc_put_qpel_h3v1_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_3 qpel_filter_1_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_3, qpel_filter_1_32b
endfunc
function ff_hevc_put_qpel_h1v2_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_1 qpel_filter_2_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_1, qpel_filter_2_32b
endfunc
function ff_hevc_put_qpel_h2v2_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_2 qpel_filter_2_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_2, qpel_filter_2_32b
endfunc
function ff_hevc_put_qpel_h3v2_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_3 qpel_filter_2_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_3, qpel_filter_2_32b
endfunc
function ff_hevc_put_qpel_h1v3_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_1 qpel_filter_3_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_1, qpel_filter_3_32b
endfunc
function ff_hevc_put_qpel_h2v3_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_2 qpel_filter_3_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_2, qpel_filter_3_32b
endfunc
function ff_hevc_put_qpel_h3v3_neon_8, export=1
- hevc_put_qpel_hXvY_neon_8 qpel_filter_3 qpel_filter_3_32b
+ hevc_put_qpel_hXvY_neon_8 qpel_filter_3, qpel_filter_3_32b
endfunc
function ff_hevc_put_qpel_uw_h1v1_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1 qpel_filter_1_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1, qpel_filter_1_32b
endfunc
function ff_hevc_put_qpel_uw_h2v1_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2 qpel_filter_1_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2, qpel_filter_1_32b
endfunc
function ff_hevc_put_qpel_uw_h3v1_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3 qpel_filter_1_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3, qpel_filter_1_32b
endfunc
function ff_hevc_put_qpel_uw_h1v2_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1 qpel_filter_2_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1, qpel_filter_2_32b
endfunc
function ff_hevc_put_qpel_uw_h2v2_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2 qpel_filter_2_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2, qpel_filter_2_32b
endfunc
function ff_hevc_put_qpel_uw_h3v2_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3 qpel_filter_2_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3, qpel_filter_2_32b
endfunc
function ff_hevc_put_qpel_uw_h1v3_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1 qpel_filter_3_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_1, qpel_filter_3_32b
endfunc
function ff_hevc_put_qpel_uw_h2v3_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2 qpel_filter_3_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_2, qpel_filter_3_32b
endfunc
function ff_hevc_put_qpel_uw_h3v3_neon_8, export=1
- hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3 qpel_filter_3_32b
+ hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3, qpel_filter_3_32b
endfunc
.macro init_put_pixels
--
2.7.4
......@@ -5,13 +5,13 @@
#USE_FFMPEG ?= 1
ifndef USE_LIBAV
FFMPEG_HASH=d268094f889479a8edee43d8c847da8838b8bf0f
FFMPEG_HASH=d0e740b8fb30f02914594d00eb311a32442a63f8
FFMPEG_SNAPURL := http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=$(FFMPEG_HASH);sf=tgz
FFMPEG_GITURL := http://git.videolan.org/git/ffmpeg.git
FFMPEG_LAVC_MIN := 57.37.100
USE_FFMPEG := 1
else
FFMPEG_HASH=99e9697e3a12ab4a6638a36b95edafd6a98f9eaa
FFMPEG_HASH=35ed7f93dbc72d733e454ae464b1324f38af62a0
FFMPEG_SNAPURL := http://git.libav.org/?p=libav.git;a=snapshot;h=$(FFMPEG_HASH);sf=tgz
FFMPEG_GITURL := git://git.libav.org/libav.git
FFMPEG_LAVC_MIN := 57.16.0
......@@ -236,12 +236,7 @@ ffmpeg: ffmpeg-$(FFMPEG_BASENAME).tar.xz .sum-ffmpeg
rm -Rf $@ $@-$(FFMPEG_BASENAME)
mkdir -p $@-$(FFMPEG_BASENAME)
tar xvJf "$<" --strip-components=1 -C $@-$(FFMPEG_BASENAME)
$(APPLY) $(SRC)/ffmpeg/0001-arm-vc1dsp-Add-commas-between-macro-arguments.patch
$(APPLY) $(SRC)/ffmpeg/0002-arm-Produce-.const_data-instead-of-.section-.rodata-.patch
ifdef USE_FFMPEG
$(APPLY) $(SRC)/ffmpeg/0003-arm-swscale-Only-compile-the-rgb2yuv-asm-if-.dn-alia.patch
$(APPLY) $(SRC)/ffmpeg/0004-arm-hevcdsp-Avoid-using-macro-expansion-counters.patch
$(APPLY) $(SRC)/ffmpeg/0005-arm-hevcdsp-Add-commas-between-macro-arguments.patch
$(APPLY) $(SRC)/ffmpeg/armv7_fixup.patch
$(APPLY) $(SRC)/ffmpeg/dxva_vc1_crash.patch
$(APPLY) $(SRC)/ffmpeg/h264_early_SAR.patch
......
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