summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/ffmpeg
diff options
context:
space:
mode:
authorMarkus Volk <f_l_k@t-online.de>2023-11-18 18:18:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-20 15:30:53 +0000
commitdaee9d9eae7c391edecf972e008ec5f124260dc3 (patch)
tree75ea495b21044b70b9af626b928913a7fcbb2acb /meta/recipes-multimedia/ffmpeg
parenta2d3b5a27ff6fa5fe9dfce9092095392c5d016cb (diff)
downloadpoky-daee9d9eae7c391edecf972e008ec5f124260dc3.tar.gz
ffmpeg: Upgrade 6.0 -> 6.1
-Remove patches that made it upstream (From OE-Core rev: faa32bbb35e92a14b8064715c12e1007fd106b34) Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg')
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-x86-mathops-clip-constants-used-with-shift-i.patch77
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libswscale-riscv-Fix-syntax-of-vsetvli.patch35
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.bb (renamed from meta/recipes-multimedia/ffmpeg/ffmpeg_6.0.bb)6
3 files changed, 2 insertions, 116 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-x86-mathops-clip-constants-used-with-shift-i.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-x86-mathops-clip-constants-used-with-shift-i.patch
deleted file mode 100644
index a47a20365f..0000000000
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-avcodec-x86-mathops-clip-constants-used-with-shift-i.patch
+++ /dev/null
@@ -1,77 +0,0 @@
1From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
3Date: Sun, 16 Jul 2023 18:18:02 +0300
4Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
5 instructions within inline assembly
6
7Fixes assembling with binutil as >= 2.41
8
9Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/effadce6c756247ea8bae32dc13bb3e6f464f0eb]
10Signed-off-by: James Almer <jamrial@gmail.com>
11---
12 libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
13 1 file changed, 23 insertions(+), 3 deletions(-)
14
15diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
16index 6298f5ed19..ca7e2dffc1 100644
17--- a/libavcodec/x86/mathops.h
18+++ b/libavcodec/x86/mathops.h
19@@ -35,12 +35,20 @@
20 static av_always_inline av_const int MULL(int a, int b, unsigned shift)
21 {
22 int rt, dummy;
23+ if (__builtin_constant_p(shift))
24 __asm__ (
25 "imull %3 \n\t"
26 "shrdl %4, %%edx, %%eax \n\t"
27 :"=a"(rt), "=d"(dummy)
28- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
29+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
30 );
31+ else
32+ __asm__ (
33+ "imull %3 \n\t"
34+ "shrdl %4, %%edx, %%eax \n\t"
35+ :"=a"(rt), "=d"(dummy)
36+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
37+ );
38 return rt;
39 }
40
41@@ -113,19 +121,31 @@ __asm__ volatile(\
42 // avoid +32 for shift optimization (gcc should do that ...)
43 #define NEG_SSR32 NEG_SSR32
44 static inline int32_t NEG_SSR32( int32_t a, int8_t s){
45+ if (__builtin_constant_p(s))
46 __asm__ ("sarl %1, %0\n\t"
47 : "+r" (a)
48- : "ic" ((uint8_t)(-s))
49+ : "i" (-s & 0x1F)
50 );
51+ else
52+ __asm__ ("sarl %1, %0\n\t"
53+ : "+r" (a)
54+ : "c" ((uint8_t)(-s))
55+ );
56 return a;
57 }
58
59 #define NEG_USR32 NEG_USR32
60 static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
61+ if (__builtin_constant_p(s))
62 __asm__ ("shrl %1, %0\n\t"
63 : "+r" (a)
64- : "ic" ((uint8_t)(-s))
65+ : "i" (-s & 0x1F)
66 );
67+ else
68+ __asm__ ("shrl %1, %0\n\t"
69+ : "+r" (a)
70+ : "c" ((uint8_t)(-s))
71+ );
72 return a;
73 }
74
75--
762.41.0
77
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libswscale-riscv-Fix-syntax-of-vsetvli.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libswscale-riscv-Fix-syntax-of-vsetvli.patch
deleted file mode 100644
index 94e0ba6d10..0000000000
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libswscale-riscv-Fix-syntax-of-vsetvli.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 85eefb65eb632d827e17a72518dd289dcd721084 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 2 Jul 2023 19:29:55 -0700
4Subject: [PATCH] libswscale/riscv: Fix syntax of vsetvli
5
6Add missing operand which clang complains about but gcc assumes it to be
7'm1' if not specifiied.
8
9Fixes building with clang
10| src/libswscale/riscv/rgb2rgb_rvv.S:88:25: error: operand must be e[8|16|32|64|128|256|512|1024],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
11| vsetvli t4, t3, e8, ta, ma
12| ^
13
14Upstream-Status: Submitted [https://ffmpeg.org/pipermail/ffmpeg-devel/2023-July/311514.html]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 libswscale/riscv/rgb2rgb_rvv.S | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/libswscale/riscv/rgb2rgb_rvv.S b/libswscale/riscv/rgb2rgb_rvv.S
21index 5626d90..bbdfdbe 100644
22--- a/libswscale/riscv/rgb2rgb_rvv.S
23+++ b/libswscale/riscv/rgb2rgb_rvv.S
24@@ -85,7 +85,7 @@ func ff_interleave_bytes_rvv, zve32x
25 mv t3, a3
26 addi a4, a4, -1
27 2:
28- vsetvli t4, t3, e8, ta, ma
29+ vsetvli t4, t3, e8, m1, ta, ma
30 sub t3, t3, t4
31 vle8.v v8, (t0)
32 add t0, t4, t0
33--
342.41.0
35
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.0.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.bb
index 1c9edaf176..162eb414b1 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.0.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.bb
@@ -22,11 +22,9 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
22 file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ 22 file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
23 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" 23 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
24 24
25SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ 25SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz"
26 file://0001-avcodec-x86-mathops-clip-constants-used-with-shift-i.patch \
27 file://0001-libswscale-riscv-Fix-syntax-of-vsetvli.patch"
28 26
29SRC_URI[sha256sum] = "57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082" 27SRC_URI[sha256sum] = "488c76e57dd9b3bee901f71d5c95eaf1db4a5a31fe46a28654e837144207c270"
30 28
31# https://nvd.nist.gov/vuln/detail/CVE-2023-39018 29# https://nvd.nist.gov/vuln/detail/CVE-2023-39018
32# https://github.com/bramp/ffmpeg-cli-wrapper/issues/291 30# https://github.com/bramp/ffmpeg-cli-wrapper/issues/291