diff options
4 files changed, 75 insertions, 0 deletions
diff --git a/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch b/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch new file mode 100644 index 0000000..9206af1 --- /dev/null +++ b/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Disable fpu using code when using clang/mips64 combo | ||
2 | it works around clang's inline asm error | ||
3 | |||
4 | error: couldn't allocate output register for constraint 'r' | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | |||
9 | --- a/libavcodec/mips/aacdec_mips.c | ||
10 | +++ b/libavcodec/mips/aacdec_mips.c | ||
11 | @@ -282,7 +282,7 @@ static void apply_ltp_mips(AACContext *a | ||
12 | } | ||
13 | } | ||
14 | |||
15 | -#if HAVE_MIPSFPU | ||
16 | +#if HAVE_MIPSFPU && !defined(__clang__) | ||
17 | static av_always_inline void fmul_and_reverse(float *dst, const float *src0, const float *src1, int count) | ||
18 | { | ||
19 | /* Multiply 'count' floats in src0 by src1 and store the results in dst in reverse */ | ||
20 | @@ -435,7 +435,7 @@ void ff_aacdec_init_mips(AACContext *c) | ||
21 | #if HAVE_INLINE_ASM | ||
22 | c->imdct_and_windowing = imdct_and_windowing_mips; | ||
23 | c->apply_ltp = apply_ltp_mips; | ||
24 | -#if HAVE_MIPSFPU | ||
25 | +#if HAVE_MIPSFPU && !defined(__clang__) | ||
26 | c->update_ltp = update_ltp_mips; | ||
27 | #endif /* HAVE_MIPSFPU */ | ||
28 | #endif /* HAVE_INLINE_ASM */ | ||
diff --git a/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend b/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend new file mode 100644 index 0000000..2077fda --- /dev/null +++ b/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI_append_toolchain-clang_mips64 = " file://clang_mips64.patch" | ||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch new file mode 100644 index 0000000..93ab73f --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 91c980d4cf88b0c12fe5971fe16c7b97b5a942af Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 17 Dec 2019 14:57:55 -0800 | ||
4 | Subject: [PATCH] Disable fpu using code when using clang/mips64 combo | ||
5 | |||
6 | it works around clang's inline asm error | ||
7 | |||
8 | error: couldn't allocate output register for constraint 'r' | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c b/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | ||
17 | index 253cdeb..df4f25d 100644 | ||
18 | --- a/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | ||
19 | +++ b/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | ||
20 | @@ -282,7 +282,7 @@ static void apply_ltp_mips(AACContext *ac, SingleChannelElement *sce) | ||
21 | } | ||
22 | } | ||
23 | |||
24 | -#if HAVE_MIPSFPU | ||
25 | +#if HAVE_MIPSFPU && !defined(__clang__) | ||
26 | static av_always_inline void fmul_and_reverse(float *dst, const float *src0, const float *src1, int count) | ||
27 | { | ||
28 | /* Multiply 'count' floats in src0 by src1 and store the results in dst in reverse */ | ||
29 | @@ -435,7 +435,7 @@ void ff_aacdec_init_mips(AACContext *c) | ||
30 | #if HAVE_INLINE_ASM | ||
31 | c->imdct_and_windowing = imdct_and_windowing_mips; | ||
32 | c->apply_ltp = apply_ltp_mips; | ||
33 | -#if HAVE_MIPSFPU | ||
34 | +#if HAVE_MIPSFPU && !defined(__clang__) | ||
35 | c->update_ltp = update_ltp_mips; | ||
36 | #endif /* HAVE_MIPSFPU */ | ||
37 | #endif /* HAVE_INLINE_ASM */ | ||
38 | -- | ||
39 | 2.24.1 | ||
40 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend new file mode 100644 index 0000000..dee9619 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend | |||
@@ -0,0 +1,4 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI_append_toolchain-clang_mips64 = " file://0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch" | ||
4 | |||