rpidistro-ffmpeg: upgrade 4.3.4 -> 5.1.4
Some checks failed
Mirrors / Yocto Git Mirror (push) Has been cancelled

Reduce amount of patches applied as they
are no longer required for building.

From older commit no longer required

* 0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch
* 0002-Fix-build-on-powerpc-and-ppc64.patch
* 0003-avcodec-pngenc-remove-monowhite-from-apng-formats.patch
* 0004-ffmpeg-4.3.4-rpi_14.patc
* 0005-fix-flags.diff

Created by OE community to fix builds and are no longer required

* 2002-libavdevice-opengl_enc-update-dynamic-function-loader.patch
* 2003-libavcodec-fix-v4l2_req_devscan.patch

rpidistro-ffmpeg updates:

* removal of avresample flag. No longer exists
* removal of rpi flag. No longer exists
* include vout-egl and epoxy if opengl or x11 included
  in DISTRO_FEATURES.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
This commit is contained in:
Vincent Davis Jr 2024-06-09 18:17:29 -04:00 committed by Andrei Gherzan
parent b7fa9b4ba1
commit eb8ffc4e63
10 changed files with 24106 additions and 68916 deletions

View File

@ -1,292 +0,0 @@
From: James Cowgill <jcowgill@debian.org>
Date: Sun, 11 Aug 2019 16:50:56 +0100
Subject: avcodec/arm/sbcenc: avoid callee preserved vfp registers
Upstream-Status: Inappropriate
RPI-Distro repo clones original ffmpeg and applies patches to enable
raspiberry pi support.
When compiling FFmpeg with GCC-9, some very random segfaults were
observed in code which had previously called down into the SBC encoder
NEON assembly routines. This was caused by these functions clobbering
some of the vfp callee saved registers (d8 - d15 aka q4 - q7). GCC was
using these registers to save local variables, but after these
functions returned, they would contain garbage.
Fix by reallocating the registers in the two affected functions in
the following way:
ff_sbc_analyze_4_neon: q2-q5 => q8-q11, then q1-q4 => q8-q11
ff_sbc_analyze_8_neon: q2-q9 => q8-q15
The reason for using these replacements is to keep closely related
sets of registers consecutively numbered which hopefully makes the
code more easy to follow. Since this commit only reallocates
registers, it should have no performance impact.
Signed-off-by: James Cowgill <jcowgill@debian.org>
---
libavcodec/arm/sbcdsp_neon.S | 220 +++++++++++++++++++++----------------------
1 file changed, 110 insertions(+), 110 deletions(-)
diff --git a/libavcodec/arm/sbcdsp_neon.S b/libavcodec/arm/sbcdsp_neon.S
index d83d21d..914abfb 100644
--- a/libavcodec/arm/sbcdsp_neon.S
+++ b/libavcodec/arm/sbcdsp_neon.S
@@ -38,49 +38,49 @@ function ff_sbc_analyze_4_neon, export=1
/* TODO: merge even and odd cases (or even merge all four calls to this
* function) in order to have only aligned reads from 'in' array
* and reduce number of load instructions */
- vld1.16 {d4, d5}, [r0, :64]!
- vld1.16 {d8, d9}, [r2, :128]!
+ vld1.16 {d16, d17}, [r0, :64]!
+ vld1.16 {d20, d21}, [r2, :128]!
- vmull.s16 q0, d4, d8
- vld1.16 {d6, d7}, [r0, :64]!
- vmull.s16 q1, d5, d9
- vld1.16 {d10, d11}, [r2, :128]!
+ vmull.s16 q0, d16, d20
+ vld1.16 {d18, d19}, [r0, :64]!
+ vmull.s16 q1, d17, d21
+ vld1.16 {d22, d23}, [r2, :128]!
- vmlal.s16 q0, d6, d10
- vld1.16 {d4, d5}, [r0, :64]!
- vmlal.s16 q1, d7, d11
- vld1.16 {d8, d9}, [r2, :128]!
+ vmlal.s16 q0, d18, d22
+ vld1.16 {d16, d17}, [r0, :64]!
+ vmlal.s16 q1, d19, d23
+ vld1.16 {d20, d21}, [r2, :128]!
- vmlal.s16 q0, d4, d8
- vld1.16 {d6, d7}, [r0, :64]!
- vmlal.s16 q1, d5, d9
- vld1.16 {d10, d11}, [r2, :128]!
+ vmlal.s16 q0, d16, d20
+ vld1.16 {d18, d19}, [r0, :64]!
+ vmlal.s16 q1, d17, d21
+ vld1.16 {d22, d23}, [r2, :128]!
- vmlal.s16 q0, d6, d10
- vld1.16 {d4, d5}, [r0, :64]!
- vmlal.s16 q1, d7, d11
- vld1.16 {d8, d9}, [r2, :128]!
+ vmlal.s16 q0, d18, d22
+ vld1.16 {d16, d17}, [r0, :64]!
+ vmlal.s16 q1, d19, d23
+ vld1.16 {d20, d21}, [r2, :128]!
- vmlal.s16 q0, d4, d8
- vmlal.s16 q1, d5, d9
+ vmlal.s16 q0, d16, d20
+ vmlal.s16 q1, d17, d21
vpadd.s32 d0, d0, d1
vpadd.s32 d1, d2, d3
vrshrn.s32 d0, q0, SBC_PROTO_FIXED_SCALE
- vld1.16 {d2, d3, d4, d5}, [r2, :128]!
+ vld1.16 {d16, d17, d18, d19}, [r2, :128]!
vdup.i32 d1, d0[1] /* TODO: can be eliminated */
vdup.i32 d0, d0[0] /* TODO: can be eliminated */
- vmull.s16 q3, d2, d0
- vmull.s16 q4, d3, d0
- vmlal.s16 q3, d4, d1
- vmlal.s16 q4, d5, d1
+ vmull.s16 q10, d16, d0
+ vmull.s16 q11, d17, d0
+ vmlal.s16 q10, d18, d1
+ vmlal.s16 q11, d19, d1
- vpadd.s32 d0, d6, d7 /* TODO: can be eliminated */
- vpadd.s32 d1, d8, d9 /* TODO: can be eliminated */
+ vpadd.s32 d0, d20, d21 /* TODO: can be eliminated */
+ vpadd.s32 d1, d22, d23 /* TODO: can be eliminated */
vst1.32 {d0, d1}, [r1, :128]
@@ -91,57 +91,57 @@ function ff_sbc_analyze_8_neon, export=1
/* TODO: merge even and odd cases (or even merge all four calls to this
* function) in order to have only aligned reads from 'in' array
* and reduce number of load instructions */
- vld1.16 {d4, d5}, [r0, :64]!
- vld1.16 {d8, d9}, [r2, :128]!
-
- vmull.s16 q6, d4, d8
- vld1.16 {d6, d7}, [r0, :64]!
- vmull.s16 q7, d5, d9
- vld1.16 {d10, d11}, [r2, :128]!
- vmull.s16 q8, d6, d10
- vld1.16 {d4, d5}, [r0, :64]!
- vmull.s16 q9, d7, d11
- vld1.16 {d8, d9}, [r2, :128]!
-
- vmlal.s16 q6, d4, d8
- vld1.16 {d6, d7}, [r0, :64]!
- vmlal.s16 q7, d5, d9
- vld1.16 {d10, d11}, [r2, :128]!
- vmlal.s16 q8, d6, d10
- vld1.16 {d4, d5}, [r0, :64]!
- vmlal.s16 q9, d7, d11
- vld1.16 {d8, d9}, [r2, :128]!
-
- vmlal.s16 q6, d4, d8
- vld1.16 {d6, d7}, [r0, :64]!
- vmlal.s16 q7, d5, d9
- vld1.16 {d10, d11}, [r2, :128]!
- vmlal.s16 q8, d6, d10
- vld1.16 {d4, d5}, [r0, :64]!
- vmlal.s16 q9, d7, d11
- vld1.16 {d8, d9}, [r2, :128]!
-
- vmlal.s16 q6, d4, d8
- vld1.16 {d6, d7}, [r0, :64]!
- vmlal.s16 q7, d5, d9
- vld1.16 {d10, d11}, [r2, :128]!
- vmlal.s16 q8, d6, d10
- vld1.16 {d4, d5}, [r0, :64]!
- vmlal.s16 q9, d7, d11
- vld1.16 {d8, d9}, [r2, :128]!
-
- vmlal.s16 q6, d4, d8
- vld1.16 {d6, d7}, [r0, :64]!
- vmlal.s16 q7, d5, d9
- vld1.16 {d10, d11}, [r2, :128]!
-
- vmlal.s16 q8, d6, d10
- vmlal.s16 q9, d7, d11
-
- vpadd.s32 d0, d12, d13
- vpadd.s32 d1, d14, d15
- vpadd.s32 d2, d16, d17
- vpadd.s32 d3, d18, d19
+ vld1.16 {d16, d17}, [r0, :64]!
+ vld1.16 {d20, d21}, [r2, :128]!
+
+ vmull.s16 q12, d16, d20
+ vld1.16 {d18, d19}, [r0, :64]!
+ vmull.s16 q13, d17, d21
+ vld1.16 {d22, d23}, [r2, :128]!
+ vmull.s16 q14, d18, d22
+ vld1.16 {d16, d17}, [r0, :64]!
+ vmull.s16 q15, d19, d23
+ vld1.16 {d20, d21}, [r2, :128]!
+
+ vmlal.s16 q12, d16, d20
+ vld1.16 {d18, d19}, [r0, :64]!
+ vmlal.s16 q13, d17, d21
+ vld1.16 {d22, d23}, [r2, :128]!
+ vmlal.s16 q14, d18, d22
+ vld1.16 {d16, d17}, [r0, :64]!
+ vmlal.s16 q15, d19, d23
+ vld1.16 {d20, d21}, [r2, :128]!
+
+ vmlal.s16 q12, d16, d20
+ vld1.16 {d18, d19}, [r0, :64]!
+ vmlal.s16 q13, d17, d21
+ vld1.16 {d22, d23}, [r2, :128]!
+ vmlal.s16 q14, d18, d22
+ vld1.16 {d16, d17}, [r0, :64]!
+ vmlal.s16 q15, d19, d23
+ vld1.16 {d20, d21}, [r2, :128]!
+
+ vmlal.s16 q12, d16, d20
+ vld1.16 {d18, d19}, [r0, :64]!
+ vmlal.s16 q13, d17, d21
+ vld1.16 {d22, d23}, [r2, :128]!
+ vmlal.s16 q14, d18, d22
+ vld1.16 {d16, d17}, [r0, :64]!
+ vmlal.s16 q15, d19, d23
+ vld1.16 {d20, d21}, [r2, :128]!
+
+ vmlal.s16 q12, d16, d20
+ vld1.16 {d18, d19}, [r0, :64]!
+ vmlal.s16 q13, d17, d21
+ vld1.16 {d22, d23}, [r2, :128]!
+
+ vmlal.s16 q14, d18, d22
+ vmlal.s16 q15, d19, d23
+
+ vpadd.s32 d0, d24, d25
+ vpadd.s32 d1, d26, d27
+ vpadd.s32 d2, d28, d29
+ vpadd.s32 d3, d30, d31
vrshr.s32 q0, q0, SBC_PROTO_FIXED_SCALE
vrshr.s32 q1, q1, SBC_PROTO_FIXED_SCALE
@@ -153,38 +153,38 @@ function ff_sbc_analyze_8_neon, export=1
vdup.i32 d1, d0[1] /* TODO: can be eliminated */
vdup.i32 d0, d0[0] /* TODO: can be eliminated */
- vld1.16 {d4, d5}, [r2, :128]!
- vmull.s16 q6, d4, d0
- vld1.16 {d6, d7}, [r2, :128]!
- vmull.s16 q7, d5, d0
- vmull.s16 q8, d6, d0
- vmull.s16 q9, d7, d0
-
- vld1.16 {d4, d5}, [r2, :128]!
- vmlal.s16 q6, d4, d1
- vld1.16 {d6, d7}, [r2, :128]!
- vmlal.s16 q7, d5, d1
- vmlal.s16 q8, d6, d1
- vmlal.s16 q9, d7, d1
-
- vld1.16 {d4, d5}, [r2, :128]!
- vmlal.s16 q6, d4, d2
- vld1.16 {d6, d7}, [r2, :128]!
- vmlal.s16 q7, d5, d2
- vmlal.s16 q8, d6, d2
- vmlal.s16 q9, d7, d2
-
- vld1.16 {d4, d5}, [r2, :128]!
- vmlal.s16 q6, d4, d3
- vld1.16 {d6, d7}, [r2, :128]!
- vmlal.s16 q7, d5, d3
- vmlal.s16 q8, d6, d3
- vmlal.s16 q9, d7, d3
-
- vpadd.s32 d0, d12, d13 /* TODO: can be eliminated */
- vpadd.s32 d1, d14, d15 /* TODO: can be eliminated */
- vpadd.s32 d2, d16, d17 /* TODO: can be eliminated */
- vpadd.s32 d3, d18, d19 /* TODO: can be eliminated */
+ vld1.16 {d16, d17}, [r2, :128]!
+ vmull.s16 q12, d16, d0
+ vld1.16 {d18, d19}, [r2, :128]!
+ vmull.s16 q13, d17, d0
+ vmull.s16 q14, d18, d0
+ vmull.s16 q15, d19, d0
+
+ vld1.16 {d16, d17}, [r2, :128]!
+ vmlal.s16 q12, d16, d1
+ vld1.16 {d18, d19}, [r2, :128]!
+ vmlal.s16 q13, d17, d1
+ vmlal.s16 q14, d18, d1
+ vmlal.s16 q15, d19, d1
+
+ vld1.16 {d16, d17}, [r2, :128]!
+ vmlal.s16 q12, d16, d2
+ vld1.16 {d18, d19}, [r2, :128]!
+ vmlal.s16 q13, d17, d2
+ vmlal.s16 q14, d18, d2
+ vmlal.s16 q15, d19, d2
+
+ vld1.16 {d16, d17}, [r2, :128]!
+ vmlal.s16 q12, d16, d3
+ vld1.16 {d18, d19}, [r2, :128]!
+ vmlal.s16 q13, d17, d3
+ vmlal.s16 q14, d18, d3
+ vmlal.s16 q15, d19, d3
+
+ vpadd.s32 d0, d24, d25 /* TODO: can be eliminated */
+ vpadd.s32 d1, d26, d27 /* TODO: can be eliminated */
+ vpadd.s32 d2, d28, d29 /* TODO: can be eliminated */
+ vpadd.s32 d3, d30, d31 /* TODO: can be eliminated */
vst1.32 {d0, d1, d2, d3}, [r1, :128]

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Tue, 19 Jan 2021 20:35:29 +0100
Subject: Fix build on powerpc and ppc64
Upstream-Status: Inappropriate
RPI-Distro repo clones original ffmpeg and applies patches to enable
raspiberry pi support.
---
libswscale/ppc/yuv2rgb_altivec.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c
index 5365452..930ef6b 100644
--- a/libswscale/ppc/yuv2rgb_altivec.c
+++ b/libswscale/ppc/yuv2rgb_altivec.c
@@ -283,6 +283,16 @@ static inline void cvtyuvtoRGB(SwsContext *c, vector signed short Y,
* ------------------------------------------------------------------------------
*/
+#if !HAVE_VSX
+static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr)
+{
+ const vector unsigned char *v_addr = (const vector unsigned char *) (addr + offset);
+ vector unsigned char align_perm = vec_lvsl(offset, addr);
+
+ return (vector unsigned char) vec_perm(v_addr[0], v_addr[1], align_perm);
+}
+#endif /* !HAVE_VSX */
+
#define DEFCSP420_CVT(name, out_pixels) \
static int altivec_ ## name(SwsContext *c, const unsigned char **in, \
int *instrides, int srcSliceY, int srcSliceH, \

View File

@ -1,30 +0,0 @@
From: Paul B Mahol <onemda@gmail.com>
Date: Sun, 14 Feb 2021 17:20:03 +0100
Subject: avcodec/pngenc: remove monowhite from apng formats
Upstream-Status: Inappropriate
RPI-Distro repo clones original ffmpeg and applies patches to enable
raspiberry pi support.
Monowhite pixel format is not supported, and it does not make sense
to add support for it.
Fixes #7989
---
libavcodec/pngenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index efcae8c..eebb164 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -1174,7 +1174,7 @@ AVCodec ff_apng_encoder = {
AV_PIX_FMT_PAL8,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A,
AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_YA16BE,
- AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
+ AV_PIX_FMT_NONE
},
.priv_class = &apngenc_class,
};

View File

@ -1,22 +0,0 @@
Upstream-Status: Inappropriate
RPI-Distro repo clones original ffmpeg and applies patches to enable
raspiberry pi support.
--- a/configure
+++ b/configure
@@ -6471,11 +6471,9 @@ enabled mbedtls && { check_pkg
die "ERROR: mbedTLS not found"; }
enabled mediacodec && { enabled jni || die "ERROR: mediacodec requires --enable-jni"; }
( enabled rpi ||
- enabled mmal ) && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
- { ! enabled cross_compile &&
- add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
- add_ldflags -L/opt/vc/lib/ &&
- check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvcos -lvcsm -lvchostif -lvchiq_arm; } ||
+ enabled mmal ) && { { add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
+ add_ldflags -L/opt/vc/lib/ &&
+ check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvcsm -lvchostif -lvchiq_arm -lvcos; } ||
die "ERROR: mmal not found" &&
check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do

View File

@ -1,6 +1,6 @@
From 01e738a8f1414acd0102e432bbc15b4e603fd956 Mon Sep 17 00:00:00 2001 From 702742f9575c87ac8c496d76daf51af7d4aaebd7 Mon Sep 17 00:00:00 2001
From: Vincent Davis Jr <vince@underview.tech> From: Vincent Davis Jr <vince@underview.tech>
Date: Thu, 8 Dec 2022 10:34:20 -0600 Date: Sun, 9 Jun 2024 18:09:25 -0400
Subject: [PATCH] configure: setup for OE-core usage Subject: [PATCH] configure: setup for OE-core usage
Upstream-Status: Inappropriate Upstream-Status: Inappropriate
@ -17,66 +17,63 @@ exists and we also should be using GLESv2.
Update where compiler finds OMX_Core.h Update where compiler finds OMX_Core.h
Only check that sdl2 version greater than 2.0.1 Only check that sdl2 version greater than 3.0.0
Signed-off-by: Vincent Davis Jr <vince@underview.tech> Signed-off-by: Vincent Davis Jr <vince@underview.tech>
--- ---
configure | 16 +++++++++------- configure | 14 +++++++++-----
1 file changed, 9 insertions(+), 7 deletions(-) 1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/configure b/configure diff --git a/configure b/configure
index 723b81f1..0c7f2654 100755 index 7214c221..7a541e63 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -5746,6 +5746,9 @@ enable_weak_pic() { @@ -5898,6 +5898,9 @@ enable_weak_pic() {
} }
enabled pic && enable_weak_pic enabled pic && enable_weak_pic
+# Set CFLAGS and LDFLAGS globally +# Set CFLAGS and LDFLAGS globally
+add_cflags -I${sysroot}/usr/include/ -I${sysroot}/usr/include/IL -I${sysroot}/usr/include/drm +add_cflags -I${sysroot}/usr/include/ -I${sysroot}/usr/include/IL -I${sysroot}/usr/include/drm
+add_ldflags -L${sysroot}/usr/lib/ +add_ldflags -L${sysroot}/usr/lib
test_cc <<EOF || die "Symbol mangling check failed." test_cc <<EOF || die "Symbol mangling check failed."
int ff_extern; int ff_extern;
@@ -6471,8 +6474,7 @@ enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt @@ -6716,8 +6719,8 @@ enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt
die "ERROR: mbedTLS not found"; }
enabled mediacodec && { enabled jni || die "ERROR: mediacodec requires --enable-jni"; } enabled mediacodec && { enabled jni || die "ERROR: mediacodec requires --enable-jni"; }
( enabled rpi || enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
- enabled mmal ) && { { add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline && { ! enabled cross_compile &&
- add_ldflags -L/opt/vc/lib/ && - add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
+ enabled mmal ) && { { add_cflags -I${sysroot}/usr/include/interface/vmcs_host/linux -I${sysroot}/usr/include/interface/vcos/pthreads -fgnu89-inline && - add_ldflags -L/opt/vc/lib/ &&
check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvcsm -lvchostif -lvchiq_arm -lvcos; } || + add_cflags -I${sysroot}/usr/include -I${sysroot}/usr/include/interface/vmcs_host/linux -I${sysroot}/usr/include/interface/vcos/pthreads -fgnu89-inline &&
+ add_ldflags -L${sysroot}/usr/lib &&
check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
die "ERROR: mmal not found" && die "ERROR: mmal not found" &&
check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; } check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
@@ -6492,15 +6494,15 @@ enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL @@ -6737,12 +6740,13 @@ enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL
check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" || check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" || check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" || check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
+ check_lib opengl GLES2/gl2.h glGetError "-lGLESv2" || + check_lib opengl GLES2/gl2.h glGetError "-lGLESv2" ||
die "ERROR: opengl not found." die "ERROR: opengl not found."
} }
-enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame || enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame ||
+enabled omx_rpi && { test_code cc IL/OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame ||
{ ! enabled cross_compile && { ! enabled cross_compile &&
- add_cflags -isystem/opt/vc/include/IL && - add_cflags -isystem/opt/vc/include/IL &&
- test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame; } || - test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame; } ||
+ add_cflags -I${sysroot}/usr/include/IL &&
+ test_code cc IL/OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame; } || + test_code cc IL/OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame; } ||
die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } && die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
enable omx enable omx
-enabled omx && require_headers OMX_Core.h enabled omx && require_headers OMX_Core.h
+enabled omx && require_headers IL/OMX_Core.h @@ -6788,7 +6792,7 @@ fi
enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
@@ -6540,7 +6542,7 @@ fi
if enabled sdl2; then if enabled sdl2; then
SDL2_CONFIG="${cross_prefix}sdl2-config" SDL2_CONFIG="${cross_prefix}sdl2-config"
- test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent - test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 3.0.0" SDL_events.h SDL_PollEvent
+ test_pkg_config sdl2 "sdl2 >= 2.0.1" SDL_events.h SDL_PollEvent + test_pkg_config sdl2 "sdl2 >= 2.0.1" SDL_events.h SDL_PollEvent
if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
sdl2_cflags=$("${SDL2_CONFIG}" --cflags) sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
sdl2_extralibs=$("${SDL2_CONFIG}" --libs) sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
-- --
2.38.1 2.34.1

View File

@ -1,111 +0,0 @@
From be426ad76c3e486f1364dd292cf8e1c633c80e91 Mon Sep 17 00:00:00 2001
From: Vincent Davis Jr <vince@underview.tech>
Date: Thu, 8 Dec 2022 10:39:47 -0600
Subject: [PATCH] libavdevice: opengl_enc.c update dynamic function loader
Upstream-Status: Inappropriate
RPI-Distro repo clones original ffmpeg and applies patches to enable
raspiberry pi support.
For meta-raspberrypi ffmpeg builds, when opengl
is enabled do_compile will fail. Reasion is that
glGetProcAddress is undefined in either GLES2/gl2.h
or GLES2/gl2ext.h.
define SelectedGetProcAddress to SDL_GL_GetProcAddress
if sdl2 is included. If not included, define function
pointers at compile time versus runtime.
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
---
libavdevice/opengl_enc.c | 44 ++++++++++++++++++++++++++++++++++++----
1 file changed, 40 insertions(+), 4 deletions(-)
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 2bdb8da7..eabc1bf8 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -37,12 +37,13 @@
#include <OpenGL/gl3.h>
#elif HAVE_ES2_GL_H
#include <ES2/gl.h>
-#else
-#include <GL/gl.h>
-#include <GL/glext.h>
#endif
#if HAVE_GLXGETPROCADDRESS
#include <GL/glx.h>
+#else
+#define GL_GLEXT_PROTOTYPES
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
#endif
#if CONFIG_SDL2
@@ -493,8 +494,14 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl)
#if HAVE_GLXGETPROCADDRESS
#define SelectedGetProcAddress glXGetProcAddress
+#define CAN_DYNAMIC_LOAD 1
#elif HAVE_WGLGETPROCADDRESS
#define SelectedGetProcAddress wglGetProcAddress
+#elif CONFIG_SDL2
+#define SelectedGetProcAddress SDL_GL_GetProcAddress
+#define CAN_DYNAMIC_LOAD 1
+#else
+#define CAN_DYNAMIC_LOAD 0
#endif
#define LOAD_OPENGL_FUN(name, type) \
@@ -504,7 +511,8 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl)
return AVERROR(ENOSYS); \
}
-#if CONFIG_SDL2
+#if CAN_DYNAMIC_LOAD
+#if CONFIG_SDL2
if (!opengl->no_window)
return opengl_sdl_load_procedures(opengl);
#endif
@@ -534,9 +542,37 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl)
LOAD_OPENGL_FUN(glGetShaderInfoLog, FF_PFNGLGETSHADERINFOLOGPROC)
LOAD_OPENGL_FUN(glEnableVertexAttribArray, FF_PFNGLENABLEVERTEXATTRIBARRAYPROC)
LOAD_OPENGL_FUN(glVertexAttribPointer, FF_PFNGLVERTEXATTRIBPOINTERPROC)
+#else
+ procs->glActiveTexture = glActiveTexture;
+ procs->glGenBuffers = glGenBuffers;
+ procs->glDeleteBuffers = glDeleteBuffers;
+ procs->glBufferData = glBufferData;
+ procs->glBindBuffer = glBindBuffer;
+ procs->glGetAttribLocation = glGetAttribLocation;
+ procs->glGetUniformLocation = glGetUniformLocation;
+ procs->glUniform1f = glUniform1f;
+ procs->glUniform1i = glUniform1i;
+ procs->glUniformMatrix4fv = glUniformMatrix4fv;
+ procs->glCreateProgram = glCreateProgram;
+ procs->glDeleteProgram = glDeleteProgram;
+ procs->glUseProgram = glUseProgram;
+ procs->glLinkProgram = glLinkProgram;
+ procs->glGetProgramiv = glGetProgramiv;
+ procs->glGetProgramInfoLog = glGetProgramInfoLog;
+ procs->glAttachShader = glAttachShader;
+ procs->glCreateShader = glCreateShader;
+ procs->glDeleteShader = glDeleteShader;
+ procs->glCompileShader = glCompileShader;
+ procs->glShaderSource = glShaderSource;
+ procs->glGetShaderiv = glGetShaderiv;
+ procs->glGetShaderInfoLog = glGetShaderInfoLog;
+ procs->glEnableVertexAttribArray = glEnableVertexAttribArray;
+ procs->glVertexAttribPointer = (FF_PFNGLVERTEXATTRIBPOINTERPROC) glVertexAttribPointer;
+#endif
return 0;
+#undef CAN_DYNAMIC_LOAD
#undef SelectedGetProcAddress
#undef LOAD_OPENGL_FUN
}
--
2.38.1

View File

@ -1,45 +0,0 @@
From 62c2f041890a6e20770350721a0a2138d0b38634 Mon Sep 17 00:00:00 2001
From: Vincent Davis Jr <vince@underview.tech>
Date: Sat, 3 Dec 2022 23:35:51 -0600
Subject: [PATCH] libavcodec: fix v4l2_req_devscan.h
Upstream-Status: Inappropriate
RPI-Distro repo clones original ffmpeg and applies patches to enable
raspiberry pi support.
Fixes minor differences between v4l2_req_devscan.c
and v4l2_req_devscan.h after all patches have been
applied.
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
---
libavcodec/v4l2_req_devscan.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/v4l2_req_devscan.h b/libavcodec/v4l2_req_devscan.h
index 0baef365..cd9c49ac 100644
--- a/libavcodec/v4l2_req_devscan.h
+++ b/libavcodec/v4l2_req_devscan.h
@@ -1,6 +1,8 @@
#ifndef _DEVSCAN_H_
#define _DEVSCAN_H_
+#include <stdint.h>
+
struct devscan;
struct decdev;
enum v4l2_buf_type;
@@ -13,7 +15,8 @@ const char *decdev_video_path(const struct decdev *const dev);
enum v4l2_buf_type decdev_src_type(const struct decdev *const dev);
uint32_t decdev_src_pixelformat(const struct decdev *const dev);
-const struct decdev *devscan_find(struct devscan *const scan, const uint32_t src_fmt_v4l2);
+const struct decdev *devscan_find(struct devscan *const scan,
+ const uint32_t src_fmt_v4l2);
int devscan_build(void * const dc, struct devscan **pscan);
void devscan_delete(struct devscan **const pScan);
--
2.38.1

View File

@ -33,27 +33,22 @@ RPROVIDES:${PN} = "${PROVIDES}"
DEPENDS = "nasm-native" DEPENDS = "nasm-native"
inherit autotools pkgconfig inherit autotools pkgconfig
PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample ffplay \ PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc ffplay \
v4l2 drm udev alsa bzlib lzma pic pthreads shared theora zlib libvorbis x264 gpl \ v4l2 drm udev alsa bzlib lzma pic pthreads shared theora zlib libvorbis x264 gpl \
${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mmal rpi sand vout-drm', d)} \ ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mmal sand vout-drm', d)} \
${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb vout-egl epoxy', '', d)}" ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'epoxy vout-egl', '', d)}"
SRC_URI = "\ SRC_URI = "\
git://git@github.com/RPi-Distro/ffmpeg;protocol=https;branch=pios/bullseye \ git://git@github.com/RPi-Distro/ffmpeg;protocol=https;branch=pios/bookworm \
file://0001-avcodec-arm-sbcenc-avoid-callee-preserved-vfp-regist.patch \ file://0001-ffmpeg-5.1.4-rpi_24.patch \
file://0002-Fix-build-on-powerpc-and-ppc64.patch \
file://0003-avcodec-pngenc-remove-monowhite-from-apng-formats.patch \
file://0004-ffmpeg-4.3.4-rpi_14.patch \
file://0005-fix-flags.diff \
file://2001-configure-setup-for-OE-core-usage.patch \ file://2001-configure-setup-for-OE-core-usage.patch \
file://2002-libavdevice-opengl_enc-update-dynamic-function-loader.patch \
file://2003-libavcodec-fix-v4l2_req_devscan.patch \
file://2004-libavcodec-omx-replace-opt-vc-path-with-usr-lib.patch \ file://2004-libavcodec-omx-replace-opt-vc-path-with-usr-lib.patch \
" "
SRCREV = "246e1a55a0eca931537d8706acd8b133c07beb05" SRCREV = "1c363463c432c5ed492c7b759abb6e015b93b6b5"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
@ -65,7 +60,7 @@ PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" #PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
# features to support # features to support
PACKAGECONFIG[ffplay] = "--enable-ffplay,--disable-ffplay" PACKAGECONFIG[ffplay] = "--enable-ffplay,--disable-ffplay"
@ -101,7 +96,6 @@ PACKAGECONFIG[epoxy] = "--enable-epoxy,--disable-epoxy,libepoxy"
PACKAGECONFIG[v4l2] = "--enable-libv4l2 --enable-v4l2-m2m,,v4l-utils" PACKAGECONFIG[v4l2] = "--enable-libv4l2 --enable-v4l2-m2m,,v4l-utils"
PACKAGECONFIG[mmal] = "--enable-omx --enable-omx-rpi --enable-mmal,,userland" PACKAGECONFIG[mmal] = "--enable-omx --enable-omx-rpi --enable-mmal,,userland"
PACKAGECONFIG[sand] = "--enable-sand,," PACKAGECONFIG[sand] = "--enable-sand,,"
PACKAGECONFIG[rpi] = "--enable-rpi,,"
PACKAGECONFIG[vout-drm] = "--enable-vout-drm,,libdrm" PACKAGECONFIG[vout-drm] = "--enable-vout-drm,,libdrm"
PACKAGECONFIG[vout-egl] = "--enable-vout-egl,,virtual/egl" PACKAGECONFIG[vout-egl] = "--enable-vout-egl,,virtual/egl"