summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch38
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb (renamed from meta/recipes-multimedia/alsa/alsa-lib_1.2.7.2.bb)8
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.2.11.bb (renamed from meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb)2
-rw-r--r--meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb (renamed from meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.7.2.bb)2
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb (renamed from meta/recipes-multimedia/alsa/alsa-utils_1.2.7.bb)8
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/av1_ordering_info.patch91
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_av1_stable_API.patch1382
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb (renamed from meta/recipes-multimedia/ffmpeg/ffmpeg_5.1.1.bb)40
-rw-r--r--meta/recipes-multimedia/flac/flac_1.4.3.bb (renamed from meta/recipes-multimedia/flac/flac_1.4.0.bb)17
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch3
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-devtools_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gst-devtools_1.20.3.bb)2
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.3.bb)2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb3
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.20.3.bb)2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch4
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch4
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.3.bb)6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch12
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-include-required-system-headers-for-isspace-and-ssca.patch35
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch22
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch10
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.bb)11
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch56
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch38
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.3.bb)23
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc4
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.3.bb)8
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.20.3.bb)10
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.20.3.bb)2
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.20.3.bb)14
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch24
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch56
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch20
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch40
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch107
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest21
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.22.11.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb)13
-rw-r--r--meta/recipes-multimedia/liba52/liba52/buildcleanup.patch89
-rw-r--r--meta/recipes-multimedia/liba52/liba52_0.7.4.bb29
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.43.bb (renamed from meta/recipes-multimedia/libpng/libpng_1.6.38.bb)13
-rw-r--r--meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb6
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch739
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb (renamed from meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb)10
-rw-r--r--meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb1
-rw-r--r--meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch184
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch86
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch32
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch238
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch28
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2023-52356.patch49
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2023-6228.patch31
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch27
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch36
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch162
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.6.0.bb (renamed from meta/recipes-multimedia/libtiff/tiff_4.4.0.bb)28
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch156
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch55
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch63
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch70
-rw-r--r--meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch43
-rw-r--r--meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb51
-rw-r--r--meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb (renamed from meta/recipes-multimedia/mpg123/mpg123_1.30.2.bb)5
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc6
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb (renamed from meta/recipes-multimedia/pulseaudio/pulseaudio_16.1.bb)2
-rw-r--r--meta/recipes-multimedia/speex/speexdsp_1.2.1.bb2
-rw-r--r--meta/recipes-multimedia/webp/libwebp_1.4.0.bb (renamed from meta/recipes-multimedia/webp/libwebp_1.2.4.bb)4
-rw-r--r--meta/recipes-multimedia/x264/x264_git.bb2
70 files changed, 3111 insertions, 1282 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch
new file mode 100644
index 0000000000..30aeef5817
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch
@@ -0,0 +1,38 @@
+From 2a736a0d2543f206fd2653aaae8a08a4c42eb917 Mon Sep 17 00:00:00 2001
+From: Michael Opdenacker <michael.opdenacker@bootlin.com>
+Date: Tue, 30 Jan 2024 14:24:25 +0100
+Subject: [PATCH] topology: correct version script path
+
+From: Jan Palus <jpalus@fastmail.com>
+
+contrary to libasound, version script for libatopology is a regular
+source file. while it's often the case that $(builddir) and $(srcdir)
+point to the same directory, they don't always have to. therefore path
+needs to point explicitly to $(srcdir) for Versions script in topology
+
+Closes: https://github.com/alsa-project/alsa-lib/pull/383
+Fixes: GH-382
+Fixes: dc7da761f3a2 ("topology: separate Versions linker script")
+Signed-off-by: Jan Palus <jpalus@fastmail.com>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+Upstream-Status: Backport [https://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=2a736a0d2543f206fd2653aaae8a08a4c42eb917]
+---
+ src/topology/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/topology/Makefile.am b/src/topology/Makefile.am
+index 04299588..e0b78373 100644
+--- a/src/topology/Makefile.am
++++ b/src/topology/Makefile.am
+@@ -2,7 +2,7 @@ EXTRA_DIST = Versions
+ COMPATNUM=@LIBTOOL_VERSION_INFO@
+
+ if VERSIONED_SYMBOLS
+-VSYMS = -Wl,--version-script=Versions
++VSYMS = -Wl,--version-script=$(srcdir)/Versions
+ else
+ VSYMS =
+ endif
+--
+2.34.1
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.7.2.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb
index 9efdae8ad5..c212b17aa3 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.7.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb
@@ -9,14 +9,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \
"
-SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
-SRC_URI[sha256sum] = "8a35b7218e50f2a2c79342d0de98ded81439ce19e12809385ec9be9596de7c2f"
+SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \
+ file://0001-topology-correct-version-script-path.patch \
+ "
+SRC_URI[sha256sum] = "9f3f2f69b995f9ad37359072fbc69a3a88bfba081fc83e9be30e14662795bb4d"
inherit autotools pkgconfig
EXTRA_OECONF += " \
${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
- --disable-python \
+ --disable-python --disable-old-symbols \
"
PACKAGES =+ "alsa-server alsa-conf libatopology"
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.2.11.bb
index 56acc84559..53868041c0 100644
--- a/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb
+++ b/meta/recipes-multimedia/alsa/alsa-tools_1.2.11.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f65
SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2"
-SRC_URI[sha256sum] = "35a71027a01f4d7de4722e223520e940de68b3c570b6c671691567ae28f9893e"
+SRC_URI[sha256sum] = "0915c9634a502fd3655ca9c574d259bc9e79983d91d45aeacff6f3c00f8ae3e9"
inherit autotools-brokensep pkgconfig
# brokensep as as10k1 (and probably more) fail out of tree
diff --git a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.7.2.bb b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb
index 51314f33aa..ce1a42c9b8 100644
--- a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.7.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb
@@ -8,7 +8,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4"
SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
-SRC_URI[sha256sum] = "53ef5639c4097b228e8f5cfaa2e7b829d04b5de2dc9a38d54efa8aa350d3f5fd"
+SRC_URI[sha256sum] = "387c01cf30e2a1676d7b8f72b2681cf219abca70dd1ec2a9e33add5bf3feae81"
# Something went wrong at upstream tarballing
inherit allarch
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.2.7.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb
index a78df2e112..e598fac9f8 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.2.7.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb
@@ -24,8 +24,9 @@ PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev
PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
# alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
-SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2"
-SRC_URI[sha256sum] = "e906bf2404ff04c448eaa3d226d283a62b9a283f12e4fd8457fb24bac274e678"
+SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2 \
+ "
+SRC_URI[sha256sum] = "9ac6ca3a883f151e568dcf979b8d2e5cbecc51b819bb0e6bb8a2e9b34cc428a7"
# On build machines with python-docutils (not python3-docutils !!) installed
# rst2man (not rst2man.py) is detected and compile fails with
@@ -54,6 +55,7 @@ ALSA_UTILS_PKGS = "\
alsa-utils-alsaloop \
alsa-utils-alsaucm \
alsa-utils-scripts \
+ alsa-utils-nhltdmicinfo \
"
PACKAGES += "${ALSA_UTILS_PKGS}"
@@ -79,6 +81,7 @@ FILES:alsa-utils-scripts = "${sbindir}/alsaconf \
${sbindir}/alsa-info.sh \
${sbindir}/alsabat-test.sh \
"
+FILES:alsa-utils-nhltdmicinfo = "${bindir}/nhlt-dmic-info"
SUMMARY:alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
SUMMARY:alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
@@ -95,6 +98,7 @@ SUMMARY:alsa-utils-aseqdump = "Shows the events received at an ALSA sequence
SUMMARY:alsa-utils-alsaloop = "ALSA PCM loopback utility"
SUMMARY:alsa-utils-alsaucm = "ALSA Use Case Manager"
SUMMARY:alsa-utils-scripts = "Shell scripts that show help info and create ALSA configuration files"
+SUMMARY:alsa-utils-nhltdmicinfo = "Dumps microphone array information from ACPI NHLT table"
RRECOMMENDS:alsa-utils-alsactl = "alsa-states"
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/av1_ordering_info.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/av1_ordering_info.patch
new file mode 100644
index 0000000000..bfc894563c
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/av1_ordering_info.patch
@@ -0,0 +1,91 @@
+From cafb4c554845332eeb33284cf6498049997dc67e Mon Sep 17 00:00:00 2001
+From: Mark Thompson <sw@jkqxz.net>
+Date: Wed, 20 Mar 2024 20:35:28 +0000
+Subject: [PATCH] lavc/cbs_av1: Save more frame ordering information
+
+This is wanted by the Vulkan decoder.
+
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/ecdc94b97f809d5f2b88640842fd0541951ad295]
+---
+ libavcodec/cbs_av1.h | 5 +++++
+ libavcodec/cbs_av1_syntax_template.c | 25 +++++++++++++++++++++----
+ 2 files changed, 26 insertions(+), 4 deletions(-)
+
+diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h
+index a5402f069d..a027013bc7 100644
+--- a/libavcodec/cbs_av1.h
++++ b/libavcodec/cbs_av1.h
+@@ -427,6 +427,8 @@ typedef struct AV1ReferenceFrameState {
+ int bit_depth; // RefBitDepth
+ int order_hint; // RefOrderHint
+
++ int saved_order_hints[AV1_TOTAL_REFS_PER_FRAME]; // SavedOrderHints[ref]
++
+ int8_t loop_filter_ref_deltas[AV1_TOTAL_REFS_PER_FRAME];
+ int8_t loop_filter_mode_deltas[2];
+ uint8_t feature_enabled[AV1_MAX_SEGMENTS][AV1_SEG_LVL_MAX];
+@@ -464,6 +466,9 @@ typedef struct CodedBitstreamAV1Context {
+ int tile_rows;
+ int tile_num;
+
++ int order_hints[AV1_TOTAL_REFS_PER_FRAME]; // OrderHints
++ int ref_frame_sign_bias[AV1_TOTAL_REFS_PER_FRAME]; // RefFrameSignBias
++
+ AV1ReferenceFrameState ref[AV1_NUM_REF_FRAMES];
+
+ // AVOptions
+diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
+index 3be1f2d30f..2979c5d98f 100644
+--- a/libavcodec/cbs_av1_syntax_template.c
++++ b/libavcodec/cbs_av1_syntax_template.c
+@@ -1414,6 +1414,8 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
+ priv->ref[i].valid = 0;
+ priv->ref[i].order_hint = 0;
+ }
++ for (i = 0; i < AV1_REFS_PER_FRAME; i++)
++ priv->order_hints[i + AV1_REF_FRAME_LAST] = 0;
+ }
+
+ flag(disable_cdf_update);
+@@ -1568,11 +1570,20 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
+ else
+ flag(use_ref_frame_mvs);
+
+- infer(allow_intrabc, 0);
+- }
++ for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
++ int ref_frame = AV1_REF_FRAME_LAST + i;
++ int hint = priv->ref[current->ref_frame_idx[i]].order_hint;
++ priv->order_hints[ref_frame] = hint;
++ if (!seq->enable_order_hint) {
++ priv->ref_frame_sign_bias[ref_frame] = 0;
++ } else {
++ priv->ref_frame_sign_bias[ref_frame] =
++ cbs_av1_get_relative_dist(seq, hint,
++ current->order_hint) > 0;
++ }
++ }
+
+- if (!frame_is_intra) {
+- // Derive reference frame sign biases.
++ infer(allow_intrabc, 0);
+ }
+
+ if (seq->reduced_still_picture_header || current->disable_cdf_update)
+@@ -1674,6 +1685,12 @@ update_refs:
+ .bit_depth = priv->bit_depth,
+ .order_hint = priv->order_hint,
+ };
++
++ for (int j = 0; j < AV1_REFS_PER_FRAME; j++) {
++ priv->ref[i].saved_order_hints[j + AV1_REF_FRAME_LAST] =
++ priv->order_hints[j + AV1_REF_FRAME_LAST];
++ }
++
+ memcpy(priv->ref[i].loop_filter_ref_deltas, current->loop_filter_ref_deltas,
+ sizeof(current->loop_filter_ref_deltas));
+ memcpy(priv->ref[i].loop_filter_mode_deltas, current->loop_filter_mode_deltas,
+--
+2.25.1
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_av1_stable_API.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_av1_stable_API.patch
new file mode 100644
index 0000000000..74db148b3b
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_av1_stable_API.patch
@@ -0,0 +1,1382 @@
+From ecdc94b97f809d5f2b88640842fd0541951ad295 Mon Sep 17 00:00:00 2001
+From: Lynne <dev@lynne.ee>
+Date: Fri, 19 Jan 2024 10:49:02 +1000
+Subject: [PATCH] vulkan_av1: port to the new stable API
+
+Co-Authored-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/ecdc94b97f809d5f2b88640842fd0541951ad295]
+---
+ configure | 4 +-
+ libavcodec/Makefile | 5 +-
+ libavcodec/vulkan_av1.c | 514 ++++++++++--------
+ libavcodec/vulkan_decode.c | 31 +-
+ libavcodec/vulkan_decode.h | 2 +-
+ libavcodec/vulkan_video.h | 2 -
+ .../vulkan_video_codec_av1std_decode_mesa.h | 36 --
+ libavcodec/vulkan_video_codec_av1std_mesa.h | 403 --------------
+ libavutil/hwcontext_vulkan.c | 2 +-
+ libavutil/vulkan_functions.h | 2 +-
+ libavutil/vulkan_loader.h | 2 +-
+ 11 files changed, 306 insertions(+), 697 deletions(-)
+ delete mode 100644 libavcodec/vulkan_video_codec_av1std_decode_mesa.h
+ delete mode 100644 libavcodec/vulkan_video_codec_av1std_mesa.h
+
+diff --git a/configure b/configure
+index e853deb51d..9fa639fca6 100755
+--- a/configure
++++ b/configure
+@@ -7300,8 +7300,8 @@ enabled vdpau &&
+ "in maintaining it."
+
+ if enabled vulkan; then
+- check_pkg_config_header_only vulkan "vulkan >= 1.3.255" "vulkan/vulkan.h" "defined VK_VERSION_1_3" ||
+- check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 255)"
++ check_pkg_config_header_only vulkan "vulkan >= 1.3.277" "vulkan/vulkan.h" "defined VK_VERSION_1_3" ||
++ check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 277)"
+ fi
+
+ if disabled vulkan; then
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index 7ef2e03ca6..9ce6d445c1 100644
+--- a/libavcodec/Makefile
++++ b/libavcodec/Makefile
+@@ -1258,8 +1258,7 @@ SKIPHEADERS += %_tablegen.h \
+ aacenc_quantization.h \
+ aacenc_quantization_misc.h \
+ bitstream_template.h \
+- vulkan_video_codec_av1std.h \
+- $(ARCH)/vpx_arith.h \
++ $(ARCH)/vpx_arith.h \
+
+ SKIPHEADERS-$(CONFIG_AMF) += amfenc.h
+ SKIPHEADERS-$(CONFIG_D3D11VA) += d3d11va.h dxva2_internal.h
+@@ -1280,7 +1279,7 @@ SKIPHEADERS-$(CONFIG_QSVENC) += qsvenc.h
+ SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h
+ SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h
+ SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h
+-SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h
++SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h
+ SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h
+ SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h
+
+diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c
+index 5afd5353cc..c9e398eaec 100644
+--- a/libavcodec/vulkan_av1.c
++++ b/libavcodec/vulkan_av1.c
+@@ -36,33 +36,47 @@ const FFVulkanDecodeDescriptor ff_vk_dec_av1_desc = {
+ typedef struct AV1VulkanDecodePicture {
+ FFVulkanDecodePicture vp;
+
+- /* Workaround for a spec issue.
+- *Can be removed once no longer needed, and threading can be enabled. */
++ /* TODO: investigate if this can be removed to make decoding completely
++ * independent. */
+ FFVulkanDecodeContext *dec;
+
+- StdVideoAV1MESATile tiles[MAX_TILES];
+- StdVideoAV1MESATileList tile_list;
+- const uint32_t *tile_offsets;
++ uint32_t tile_sizes[MAX_TILES];
+
+ /* Current picture */
+- VkVideoDecodeAV1DpbSlotInfoMESA vkav1_ref;
+- StdVideoAV1MESAFrameHeader av1_frame_header;
+- VkVideoDecodeAV1PictureInfoMESA av1_pic_info;
++ StdVideoDecodeAV1ReferenceInfo std_ref;
++ VkVideoDecodeAV1DpbSlotInfoKHR vkav1_ref;
++ uint16_t width_in_sbs_minus1[64];
++ uint16_t height_in_sbs_minus1[64];
++ uint16_t mi_col_starts[64];
++ uint16_t mi_row_starts[64];
++ StdVideoAV1TileInfo tile_info;
++ StdVideoAV1Quantization quantization;
++ StdVideoAV1Segmentation segmentation;
++ StdVideoAV1LoopFilter loop_filter;
++ StdVideoAV1CDEF cdef;
++ StdVideoAV1LoopRestoration loop_restoration;
++ StdVideoAV1GlobalMotion global_motion;
++ StdVideoAV1FilmGrain film_grain;
++ StdVideoDecodeAV1PictureInfo std_pic_info;
++ VkVideoDecodeAV1PictureInfoKHR av1_pic_info;
+
+ /* Picture refs */
+ const AV1Frame *ref_src [AV1_NUM_REF_FRAMES];
+- VkVideoDecodeAV1DpbSlotInfoMESA vkav1_refs[AV1_NUM_REF_FRAMES];
++ StdVideoDecodeAV1ReferenceInfo std_refs [AV1_NUM_REF_FRAMES];
++ VkVideoDecodeAV1DpbSlotInfoKHR vkav1_refs[AV1_NUM_REF_FRAMES];
+
+ uint8_t frame_id_set;
+ uint8_t frame_id;
++ uint8_t ref_frame_sign_bias_mask;
+ } AV1VulkanDecodePicture;
+
+ static int vk_av1_fill_pict(AVCodecContext *avctx, const AV1Frame **ref_src,
+ VkVideoReferenceSlotInfoKHR *ref_slot, /* Main structure */
+ VkVideoPictureResourceInfoKHR *ref, /* Goes in ^ */
+- VkVideoDecodeAV1DpbSlotInfoMESA *vkav1_ref, /* Goes in ^ */
++ StdVideoDecodeAV1ReferenceInfo *vkav1_std_ref,
++ VkVideoDecodeAV1DpbSlotInfoKHR *vkav1_ref, /* Goes in ^ */
+ const AV1Frame *pic, int is_current, int has_grain,
+- int dpb_slot_index)
++ int *saved_order_hints)
+ {
+ FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data;
+ AV1VulkanDecodePicture *hp = pic->hwaccel_picture_private;
+@@ -73,31 +87,42 @@ static int vk_av1_fill_pict(AVCodecContext *avctx, const AV1Frame **ref_src,
+ if (err < 0)
+ return err;
+
+- *vkav1_ref = (VkVideoDecodeAV1DpbSlotInfoMESA) {
+- .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_MESA,
+- .frameIdx = hp->frame_id,
++ *vkav1_std_ref = (StdVideoDecodeAV1ReferenceInfo) {
++ .flags = (StdVideoDecodeAV1ReferenceInfoFlags) {
++ .disable_frame_end_update_cdf = pic->raw_frame_header->disable_frame_end_update_cdf,
++ .segmentation_enabled = pic->raw_frame_header->segmentation_enabled,
++ },
++ .frame_type = pic->raw_frame_header->frame_type,
++ .OrderHint = pic->raw_frame_header->order_hint,
++ .RefFrameSignBias = hp->ref_frame_sign_bias_mask,
+ };
+
+- for (unsigned i = 0; i < 7; i++) {
+- const int idx = pic->raw_frame_header->ref_frame_idx[i];
+- vkav1_ref->ref_order_hint[i] = pic->raw_frame_header->ref_order_hint[idx];
+- }
++ if (saved_order_hints)
++ for (int i = 0; i < AV1_TOTAL_REFS_PER_FRAME; i++)
++ vkav1_std_ref->SavedOrderHints[i] = saved_order_hints[i];
++
++ *vkav1_ref = (VkVideoDecodeAV1DpbSlotInfoKHR) {
++ .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR,
++ .pStdReferenceInfo = vkav1_std_ref,
++ };
+
+- vkav1_ref->disable_frame_end_update_cdf = pic->raw_frame_header->disable_frame_end_update_cdf;
++ vkav1_std_ref->flags.disable_frame_end_update_cdf = pic->raw_frame_header->disable_frame_end_update_cdf;
++ vkav1_std_ref->flags.segmentation_enabled = pic->raw_frame_header->segmentation_enabled;
++ vkav1_std_ref->frame_type = pic->raw_frame_header->frame_type;
+
+ *ref = (VkVideoPictureResourceInfoKHR) {
+ .sType = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR,
+ .codedOffset = (VkOffset2D){ 0, 0 },
+ .codedExtent = (VkExtent2D){ pic->f->width, pic->f->height },
+ .baseArrayLayer = ((has_grain || dec->dedicated_dpb) && dec->layered_dpb) ?
+- dpb_slot_index : 0,
++ hp->frame_id : 0,
+ .imageViewBinding = vkpic->img_view_ref,
+ };
+
+ *ref_slot = (VkVideoReferenceSlotInfoKHR) {
+ .sType = VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR,
+ .pNext = vkav1_ref,
+- .slotIndex = dpb_slot_index,
++ .slotIndex = hp->frame_id,
+ .pPictureResource = ref,
+ };
+
+@@ -115,15 +140,40 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf)
+
+ const AV1RawSequenceHeader *seq = s->raw_seq;
+
+- StdVideoAV1MESASequenceHeader av1_sequence_header;
+- VkVideoDecodeAV1SessionParametersAddInfoMESA av1_params_info;
+- VkVideoDecodeAV1SessionParametersCreateInfoMESA av1_params;
++ StdVideoAV1SequenceHeader av1_sequence_header;
++ StdVideoAV1TimingInfo av1_timing_info;
++ StdVideoAV1ColorConfig av1_color_config;
++ VkVideoDecodeAV1SessionParametersCreateInfoKHR av1_params;
+ VkVideoSessionParametersCreateInfoKHR session_params_create;
+
+ int err;
+
+- av1_sequence_header = (StdVideoAV1MESASequenceHeader) {
+- .flags = (StdVideoAV1MESASequenceHeaderFlags) {
++ av1_timing_info = (StdVideoAV1TimingInfo) {
++ .flags = (StdVideoAV1TimingInfoFlags) {
++ .equal_picture_interval = seq->timing_info.equal_picture_interval,
++ },
++ .num_units_in_display_tick = seq->timing_info.num_units_in_display_tick,
++ .time_scale = seq->timing_info.time_scale,
++ .num_ticks_per_picture_minus_1 = seq->timing_info.num_ticks_per_picture_minus_1,
++ };
++
++ av1_color_config = (StdVideoAV1ColorConfig) {
++ .flags = (StdVideoAV1ColorConfigFlags) {
++ .mono_chrome = seq->color_config.mono_chrome,
++ .color_range = seq->color_config.color_range,
++ .separate_uv_delta_q = seq->color_config.separate_uv_delta_q,
++ },
++ .BitDepth = seq->color_config.twelve_bit ? 12 :
++ seq->color_config.high_bitdepth ? 10 : 8,
++ .subsampling_x = seq->color_config.subsampling_x,
++ .subsampling_y = seq->color_config.subsampling_y,
++ .color_primaries = seq->color_config.color_primaries,
++ .transfer_characteristics = seq->color_config.transfer_characteristics,
++ .matrix_coefficients = seq->color_config.matrix_coefficients,
++ };
++
++ av1_sequence_header = (StdVideoAV1SequenceHeader) {
++ .flags = (StdVideoAV1SequenceHeaderFlags) {
+ .still_picture = seq->still_picture,
+ .reduced_still_picture_header = seq->reduced_still_picture_header,
+ .use_128x128_superblock = seq->use_128x128_superblock,
+@@ -152,34 +202,15 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf)
+ .delta_frame_id_length_minus_2 = seq->delta_frame_id_length_minus_2,
+ .additional_frame_id_length_minus_1 = seq->additional_frame_id_length_minus_1,
+ .order_hint_bits_minus_1 = seq->order_hint_bits_minus_1,
+- .timing_info = (StdVideoAV1MESATimingInfo) {
+- .flags = (StdVideoAV1MESATimingInfoFlags) {
+- .equal_picture_interval = seq->timing_info.equal_picture_interval,
+- },
+- .num_units_in_display_tick = seq->timing_info.num_units_in_display_tick,
+- .time_scale = seq->timing_info.time_scale,
+- .num_ticks_per_picture_minus_1 = seq->timing_info.num_ticks_per_picture_minus_1,
+- },
+- .color_config = (StdVideoAV1MESAColorConfig) {
+- .flags = (StdVideoAV1MESAColorConfigFlags) {
+- .mono_chrome = seq->color_config.mono_chrome,
+- .color_range = seq->color_config.color_range,
+- .separate_uv_delta_q = seq->color_config.separate_uv_delta_q,
+- },
+- .bit_depth = seq->color_config.twelve_bit ? 12 :
+- seq->color_config.high_bitdepth ? 10 : 8,
+- .subsampling_x = seq->color_config.subsampling_x,
+- .subsampling_y = seq->color_config.subsampling_y,
+- },
++ .seq_force_integer_mv = seq->seq_force_integer_mv,
++ .seq_force_screen_content_tools = seq->seq_force_screen_content_tools,
++ .pTimingInfo = &av1_timing_info,
++ .pColorConfig = &av1_color_config,
+ };
+
+- av1_params_info = (VkVideoDecodeAV1SessionParametersAddInfoMESA) {
+- .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_ADD_INFO_MESA,
+- .sequence_header = &av1_sequence_header,
+- };
+- av1_params = (VkVideoDecodeAV1SessionParametersCreateInfoMESA) {
+- .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA,
+- .pParametersAddInfo = &av1_params_info,
++ av1_params = (VkVideoDecodeAV1SessionParametersCreateInfoKHR) {
++ .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR,
++ .pStdSequenceHeader = &av1_sequence_header,
+ };
+ session_params_create = (VkVideoSessionParametersCreateInfoKHR) {
+ .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
+@@ -211,8 +242,14 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
+
+ const AV1RawFrameHeader *frame_header = s->raw_frame_header;
+ const AV1RawFilmGrainParams *film_grain = &s->cur_frame.film_grain;
++ CodedBitstreamAV1Context *cbs_ctx = (CodedBitstreamAV1Context *)(s->cbc->priv_data);
++
+ const int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) &&
+ film_grain->apply_grain;
++ StdVideoAV1FrameRestorationType remap_lr_type[4] = { STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE,
++ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE,
++ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER,
++ STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ };
+
+ if (!dec->session_params) {
+ err = vk_av1_create_params(avctx, &dec->session_params);
+@@ -233,15 +270,31 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
+ dec->frame_id_alloc_mask |= (1 << slot_idx);
+ }
+
+- /* Fill in references */
+- for (int i = 0; i < AV1_NUM_REF_FRAMES; i++) {
+- const AV1Frame *ref_frame = &s->ref[i];
+- if (s->ref[i].f->pict_type == AV_PICTURE_TYPE_NONE)
++ ap->ref_frame_sign_bias_mask = 0x0;
++ for (int i = 0; i < STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME; i++)
++ ap->ref_frame_sign_bias_mask |= cbs_ctx->ref_frame_sign_bias[i] << i;
++
++ for (int i = 0; i < STD_VIDEO_AV1_REFS_PER_FRAME; i++) {
++ const int idx = pic->raw_frame_header->ref_frame_idx[i];
++ const AV1Frame *ref_frame = &s->ref[idx];
++ AV1VulkanDecodePicture *hp = ref_frame->hwaccel_picture_private;
++ int found = 0;
++
++ if (ref_frame->f->pict_type == AV_PICTURE_TYPE_NONE)
++ continue;
++
++ for (int j = 0; j < ref_count; j++) {
++ if (vp->ref_slots[j].slotIndex == hp->frame_id) {
++ found = 1;
++ break;
++ }
++ }
++ if (found)
+ continue;
+
+- err = vk_av1_fill_pict(avctx, &ap->ref_src[i], &vp->ref_slots[i],
+- &vp->refs[i], &ap->vkav1_refs[i],
+- ref_frame, 0, 0, i);
++ err = vk_av1_fill_pict(avctx, &ap->ref_src[ref_count], &vp->ref_slots[ref_count],
++ &vp->refs[ref_count], &ap->std_refs[ref_count], &ap->vkav1_refs[ref_count],
++ ref_frame, 0, 0, cbs_ctx->ref[idx].saved_order_hints);
+ if (err < 0)
+ return err;
+
+@@ -249,20 +302,32 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
+ }
+
+ err = vk_av1_fill_pict(avctx, NULL, &vp->ref_slot, &vp->ref,
++ &ap->std_ref,
+ &ap->vkav1_ref,
+- pic, 1, apply_grain, 8);
++ pic, 1, apply_grain, NULL);
+ if (err < 0)
+ return err;
+
+- ap->tile_list.nb_tiles = 0;
+- ap->tile_list.tile_list = ap->tiles;
+-
+- ap->av1_pic_info = (VkVideoDecodeAV1PictureInfoMESA) {
+- .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_MESA,
+- .frame_header = &ap->av1_frame_header,
+- .tile_list = &ap->tile_list,
++ ap->av1_pic_info = (VkVideoDecodeAV1PictureInfoKHR) {
++ .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR,
++ .pStdPictureInfo = &ap->std_pic_info,
++ .frameHeaderOffset = 0,
++ .tileCount = 0,
++ .pTileOffsets = NULL,
++ .pTileSizes = ap->tile_sizes,
+ };
+
++ for (int i = 0; i < STD_VIDEO_AV1_REFS_PER_FRAME; i++) {
++ const int idx = pic->raw_frame_header->ref_frame_idx[i];
++ const AV1Frame *ref_frame = &s->ref[idx];
++ AV1VulkanDecodePicture *hp = ref_frame->hwaccel_picture_private;
++
++ if (ref_frame->f->pict_type == AV_PICTURE_TYPE_NONE)
++ ap->av1_pic_info.referenceNameSlotIndices[i] = -1;
++ else
++ ap->av1_pic_info.referenceNameSlotIndices[i] = hp->frame_id;
++ }
++
+ vp->decode_info = (VkVideoDecodeInfoKHR) {
+ .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR,
+ .pNext = &ap->av1_pic_info,
+@@ -279,9 +344,87 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
+ },
+ };
+
++ ap->tile_info = (StdVideoAV1TileInfo) {
++ .flags = (StdVideoAV1TileInfoFlags) {
++ .uniform_tile_spacing_flag = frame_header->uniform_tile_spacing_flag,
++ },
++ .TileCols = frame_header->tile_cols,
++ .TileRows = frame_header->tile_rows,
++ .context_update_tile_id = frame_header->context_update_tile_id,
++ .tile_size_bytes_minus_1 = frame_header->tile_size_bytes_minus1,
++ .pWidthInSbsMinus1 = ap->width_in_sbs_minus1,
++ .pHeightInSbsMinus1 = ap->height_in_sbs_minus1,
++ .pMiColStarts = ap->mi_col_starts,
++ .pMiRowStarts = ap->mi_row_starts,
++ };
++
++ ap->quantization = (StdVideoAV1Quantization) {
++ .flags.using_qmatrix = frame_header->using_qmatrix,
++ .flags.diff_uv_delta = frame_header->diff_uv_delta,
++ .base_q_idx = frame_header->base_q_idx,
++ .DeltaQYDc = frame_header->delta_q_y_dc,
++ .DeltaQUDc = frame_header->delta_q_u_dc,
++ .DeltaQUAc = frame_header->delta_q_u_ac,
++ .DeltaQVDc = frame_header->delta_q_v_dc,
++ .DeltaQVAc = frame_header->delta_q_v_ac,
++ .qm_y = frame_header->qm_y,
++ .qm_u = frame_header->qm_u,
++ .qm_v = frame_header->qm_v,
++ };
++
++ ap->loop_filter = (StdVideoAV1LoopFilter) {
++ .flags = (StdVideoAV1LoopFilterFlags) {
++ .loop_filter_delta_enabled = frame_header->loop_filter_delta_enabled,
++ .loop_filter_delta_update = frame_header->loop_filter_delta_update,
++ },
++ .loop_filter_sharpness = frame_header->loop_filter_sharpness,
++ };
++
++ for (int i = 0; i < STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS; i++)
++ ap->loop_filter.loop_filter_level[i] = frame_header->loop_filter_level[i];
++ for (int i = 0; i < STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS; i++)
++ ap->loop_filter.loop_filter_mode_deltas[i] = frame_header->loop_filter_mode_deltas[i];
++
++ ap->cdef = (StdVideoAV1CDEF) {
++ .cdef_damping_minus_3 = frame_header->cdef_damping_minus_3,
++ .cdef_bits = frame_header->cdef_bits,
++ };
++
++ ap->loop_restoration = (StdVideoAV1LoopRestoration) {
++ .FrameRestorationType[0] = remap_lr_type[frame_header->lr_type[0]],
++ .FrameRestorationType[1] = remap_lr_type[frame_header->lr_type[1]],
++ .FrameRestorationType[2] = remap_lr_type[frame_header->lr_type[2]],
++ .LoopRestorationSize[0] = 1 + frame_header->lr_unit_shift,
++ .LoopRestorationSize[1] = 1 + frame_header->lr_unit_shift - frame_header->lr_uv_shift,
++ .LoopRestorationSize[2] = 1 + frame_header->lr_unit_shift - frame_header->lr_uv_shift,
++ };
++
++ ap->film_grain = (StdVideoAV1FilmGrain) {
++ .flags = (StdVideoAV1FilmGrainFlags) {
++ .chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma,
++ .overlap_flag = film_grain->overlap_flag,
++ .clip_to_restricted_range = film_grain->clip_to_restricted_range,
++ },
++ .grain_scaling_minus_8 = film_grain->grain_scaling_minus_8,
++ .ar_coeff_lag = film_grain->ar_coeff_lag,
++ .ar_coeff_shift_minus_6 = film_grain->ar_coeff_shift_minus_6,
++ .grain_scale_shift = film_grain->grain_scale_shift,
++ .grain_seed = film_grain->grain_seed,
++ .film_grain_params_ref_idx = film_grain->film_grain_params_ref_idx,
++ .num_y_points = film_grain->num_y_points,
++ .num_cb_points = film_grain->num_cb_points,
++ .num_cr_points = film_grain->num_cr_points,
++ .cb_mult = film_grain->cb_mult,
++ .cb_luma_mult = film_grain->cb_luma_mult,
++ .cb_offset = film_grain->cb_offset,
++ .cr_mult = film_grain->cr_mult,
++ .cr_luma_mult = film_grain->cr_luma_mult,
++ .cr_offset = film_grain->cr_offset,
++ };
++
+ /* Setup frame header */
+- ap->av1_frame_header = (StdVideoAV1MESAFrameHeader) {
+- .flags = (StdVideoAV1MESAFrameHeaderFlags) {
++ ap->std_pic_info = (StdVideoDecodeAV1PictureInfo) {
++ .flags = (StdVideoDecodeAV1PictureInfoFlags) {
+ .error_resilient_mode = frame_header->error_resilient_mode,
+ .disable_cdf_update = frame_header->disable_cdf_update,
+ .use_superres = frame_header->use_superres,
+@@ -302,174 +445,92 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
+ .reference_select = frame_header->reference_select,
+ .skip_mode_present = frame_header->skip_mode_present,
+ .delta_q_present = frame_header->delta_q_present,
++ .delta_lf_present = frame_header->delta_lf_present,
++ .delta_lf_multi = frame_header->delta_lf_multi,
++ .segmentation_enabled = frame_header->segmentation_enabled,
++ .segmentation_update_map = frame_header->segmentation_update_map,
++ .segmentation_temporal_update = frame_header->segmentation_temporal_update,
++ .segmentation_update_data = frame_header->segmentation_update_data,
++ .UsesLr = frame_header->lr_type[0] || frame_header->lr_type[1] || frame_header->lr_type[2],
++ .apply_grain = apply_grain,
+ },
+- .frame_to_show_map_idx = frame_header->frame_to_show_map_idx,
+- .frame_presentation_time = frame_header->frame_presentation_time,
+- .display_frame_id = frame_header->display_frame_id,
+ .frame_type = frame_header->frame_type,
+ .current_frame_id = frame_header->current_frame_id,
+- .order_hint = frame_header->order_hint,
++ .OrderHint = frame_header->order_hint,
+ .primary_ref_frame = frame_header->primary_ref_frame,
+- .frame_width_minus_1 = frame_header->frame_width_minus_1,
+- .frame_height_minus_1 = frame_header->frame_height_minus_1,
+- .coded_denom = frame_header->coded_denom,
+- .render_width_minus_1 = frame_header->render_width_minus_1,
+- .render_height_minus_1 = frame_header->render_height_minus_1,
+ .refresh_frame_flags = frame_header->refresh_frame_flags,
+ .interpolation_filter = frame_header->interpolation_filter,
+- .tx_mode = frame_header->tx_mode,
+- .tiling = (StdVideoAV1MESATileInfo) {
+- .flags = (StdVideoAV1MESATileInfoFlags) {
+- .uniform_tile_spacing_flag = frame_header->uniform_tile_spacing_flag,
+- },
+- .tile_cols = frame_header->tile_cols,
+- .tile_rows = frame_header->tile_rows,
+- .context_update_tile_id = frame_header->context_update_tile_id,
+- .tile_size_bytes_minus1 = frame_header->tile_size_bytes_minus1,
+- },
+- .quantization = (StdVideoAV1MESAQuantization) {
+- .flags.using_qmatrix = frame_header->using_qmatrix,
+- .base_q_idx = frame_header->base_q_idx,
+- .delta_q_y_dc = frame_header->delta_q_y_dc,
+- .diff_uv_delta = frame_header->diff_uv_delta,
+- .delta_q_u_dc = frame_header->delta_q_u_dc,
+- .delta_q_u_ac = frame_header->delta_q_u_ac,
+- .delta_q_v_dc = frame_header->delta_q_v_dc,
+- .delta_q_v_ac = frame_header->delta_q_v_ac,
+- .qm_y = frame_header->qm_y,
+- .qm_u = frame_header->qm_u,
+- .qm_v = frame_header->qm_v,
+- },
+- .delta_q = (StdVideoAV1MESADeltaQ) {
+- .flags = (StdVideoAV1MESADeltaQFlags) {
+- .delta_lf_present = frame_header->delta_lf_present,
+- .delta_lf_multi = frame_header->delta_lf_multi,
+- },
+- .delta_q_res = frame_header->delta_q_res,
+- .delta_lf_res = frame_header->delta_lf_res,
+- },
+- .loop_filter = (StdVideoAV1MESALoopFilter) {
+- .flags = (StdVideoAV1MESALoopFilterFlags) {
+- .delta_enabled = frame_header->loop_filter_delta_enabled,
+- .delta_update = frame_header->loop_filter_delta_update,
+- },
+- .level = {
+- frame_header->loop_filter_level[0], frame_header->loop_filter_level[1],
+- frame_header->loop_filter_level[2], frame_header->loop_filter_level[3],
+- },
+- .sharpness = frame_header->loop_filter_sharpness,
+- .mode_deltas = {
+- frame_header->loop_filter_mode_deltas[0], frame_header->loop_filter_mode_deltas[1],
+- },
+- },
+- .cdef = (StdVideoAV1MESACDEF) {
+- .damping_minus_3 = frame_header->cdef_damping_minus_3,
+- .bits = frame_header->cdef_bits,
+- },
+- .lr = (StdVideoAV1MESALoopRestoration) {
+- .lr_unit_shift = frame_header->lr_unit_shift,
+- .lr_uv_shift = frame_header->lr_uv_shift,
+- .lr_type = { frame_header->lr_type[0], frame_header->lr_type[1], frame_header->lr_type[2] },
+- },
+- .segmentation = (StdVideoAV1MESASegmentation) {
+- .flags = (StdVideoAV1MESASegmentationFlags) {
+- .enabled = frame_header->segmentation_enabled,
+- .update_map = frame_header->segmentation_update_map,
+- .temporal_update = frame_header->segmentation_temporal_update,
+- .update_data = frame_header->segmentation_update_data,
+- },
+- },
+- .film_grain = (StdVideoAV1MESAFilmGrainParameters) {
+- .flags = (StdVideoAV1MESAFilmGrainFlags) {
+- .apply_grain = apply_grain,
+- .chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma,
+- .overlap_flag = film_grain->overlap_flag,
+- .clip_to_restricted_range = film_grain->clip_to_restricted_range,
+- },
+- .grain_scaling_minus_8 = film_grain->grain_scaling_minus_8,
+- .ar_coeff_lag = film_grain->ar_coeff_lag,
+- .ar_coeff_shift_minus_6 = film_grain->ar_coeff_shift_minus_6,
+- .grain_scale_shift = film_grain->grain_scale_shift,
+- .grain_seed = film_grain->grain_seed,
+- .num_y_points = film_grain->num_y_points,
+- .num_cb_points = film_grain->num_cb_points,
+- .num_cr_points = film_grain->num_cr_points,
+- .cb_mult = film_grain->cb_mult,
+- .cb_luma_mult = film_grain->cb_luma_mult,
+- .cb_offset = film_grain->cb_offset,
+- .cr_mult = film_grain->cr_mult,
+- .cr_luma_mult = film_grain->cr_luma_mult,
+- .cr_offset = film_grain->cr_offset,
+- },
++ .TxMode = frame_header->tx_mode,
++ .delta_q_res = frame_header->delta_q_res,
++ .delta_lf_res = frame_header->delta_lf_res,
++ .SkipModeFrame[0] = s->cur_frame.skip_mode_frame_idx[0],
++ .SkipModeFrame[1] = s->cur_frame.skip_mode_frame_idx[1],
++ .coded_denom = frame_header->coded_denom,
++ .pTileInfo = &ap->tile_info,
++ .pQuantization = &ap->quantization,
++ .pSegmentation = &ap->segmentation,
++ .pLoopFilter = &ap->loop_filter,
++ .pCDEF = &ap->cdef,
++ .pLoopRestoration = &ap->loop_restoration,
++ .pGlobalMotion = &ap->global_motion,
++ .pFilmGrain = apply_grain ? &ap->film_grain : NULL,
+ };
+
+ for (int i = 0; i < 64; i++) {
+- ap->av1_frame_header.tiling.width_in_sbs_minus_1[i] = frame_header->width_in_sbs_minus_1[i];
+- ap->av1_frame_header.tiling.height_in_sbs_minus_1[i] = frame_header->height_in_sbs_minus_1[i];
+- ap->av1_frame_header.tiling.tile_start_col_sb[i] = frame_header->tile_start_col_sb[i];
+- ap->av1_frame_header.tiling.tile_start_row_sb[i] = frame_header->tile_start_row_sb[i];
++ ap->width_in_sbs_minus1[i] = frame_header->width_in_sbs_minus_1[i];
++ ap->height_in_sbs_minus1[i] = frame_header->height_in_sbs_minus_1[i];
++ ap->mi_col_starts[i] = frame_header->tile_start_col_sb[i];
++ ap->mi_row_starts[i] = frame_header->tile_start_row_sb[i];
+ }
+
+- for (int i = 0; i < 8; i++) {
+- ap->av1_frame_header.segmentation.feature_enabled_bits[i] = 0;
+- for (int j = 0; j < 8; j++) {
+- ap->av1_frame_header.segmentation.feature_enabled_bits[i] |= (frame_header->feature_enabled[i][j] << j);
+- ap->av1_frame_header.segmentation.feature_data[i][j] = frame_header->feature_value[i][j];
++ for (int i = 0; i < STD_VIDEO_AV1_MAX_SEGMENTS; i++) {
++ ap->segmentation.FeatureEnabled[i] = 0x0;
++ for (int j = 0; j < STD_VIDEO_AV1_SEG_LVL_MAX; j++) {
++ ap->segmentation.FeatureEnabled[i] |= (frame_header->feature_enabled[i][j] << j);
++ ap->segmentation.FeatureData[i][j] = frame_header->feature_value[i][j];
+ }
+-
+- ap->av1_frame_header.loop_filter.ref_deltas[i] = frame_header->loop_filter_ref_deltas[i];
+-
+- ap->av1_frame_header.cdef.y_pri_strength[i] = frame_header->cdef_y_pri_strength[i];
+- ap->av1_frame_header.cdef.y_sec_strength[i] = frame_header->cdef_y_sec_strength[i];
+- ap->av1_frame_header.cdef.uv_pri_strength[i] = frame_header->cdef_uv_pri_strength[i];
+- ap->av1_frame_header.cdef.uv_sec_strength[i] = frame_header->cdef_uv_sec_strength[i];
+-
+- ap->av1_frame_header.ref_order_hint[i] = frame_header->ref_order_hint[i];
+- ap->av1_frame_header.global_motion[i] = (StdVideoAV1MESAGlobalMotion) {
+- .flags = (StdVideoAV1MESAGlobalMotionFlags) {
+- .gm_invalid = s->cur_frame.gm_invalid[i],
+- },
+- .gm_type = s->cur_frame.gm_type[i],
+- .gm_params = {
+- s->cur_frame.gm_params[i][0], s->cur_frame.gm_params[i][1],
+- s->cur_frame.gm_params[i][2], s->cur_frame.gm_params[i][3],
+- s->cur_frame.gm_params[i][4], s->cur_frame.gm_params[i][5],
+- },
+- };
+ }
+
+- for (int i = 0; i < 7; i++) {
+- ap->av1_frame_header.ref_frame_idx[i] = frame_header->ref_frame_idx[i];
+- ap->av1_frame_header.delta_frame_id_minus1[i] = frame_header->delta_frame_id_minus1[i];
++ for (int i = 0; i < STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME; i++)
++ ap->loop_filter.loop_filter_ref_deltas[i] = frame_header->loop_filter_ref_deltas[i];
++
++ for (int i = 0; i < STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS; i++) {
++ ap->cdef.cdef_y_pri_strength[i] = frame_header->cdef_y_pri_strength[i];
++ ap->cdef.cdef_y_sec_strength[i] = frame_header->cdef_y_sec_strength[i];
++ ap->cdef.cdef_uv_pri_strength[i] = frame_header->cdef_uv_pri_strength[i];
++ ap->cdef.cdef_uv_sec_strength[i] = frame_header->cdef_uv_sec_strength[i];
+ }
+
+- ap->av1_pic_info.skip_mode_frame_idx[0] = s->cur_frame.skip_mode_frame_idx[0];
+- ap->av1_pic_info.skip_mode_frame_idx[1] = s->cur_frame.skip_mode_frame_idx[1];
++ for (int i = 0; i < STD_VIDEO_AV1_NUM_REF_FRAMES; i++) {
++ ap->std_pic_info.OrderHints[i] = frame_header->ref_order_hint[i];
++ ap->global_motion.GmType[i] = s->cur_frame.gm_type[i];
++ for (int j = 0; j < STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS; j++) {
++ ap->global_motion.gm_params[i][j] = s->cur_frame.gm_params[i][j];
++ }
++ }
+
+ if (apply_grain) {
+- for (int i = 0; i < 14; i++) {
+- ap->av1_frame_header.film_grain.point_y_value[i] = film_grain->point_y_value[i];
+- ap->av1_frame_header.film_grain.point_y_scaling[i] = film_grain->point_y_scaling[i];
++ for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_Y_POINTS; i++) {
++ ap->film_grain.point_y_value[i] = film_grain->point_y_value[i];
++ ap->film_grain.point_y_scaling[i] = film_grain->point_y_scaling[i];
+ }
+
+- for (int i = 0; i < 10; i++) {
+- ap->av1_frame_header.film_grain.point_cb_value[i] = film_grain->point_cb_value[i];
+- ap->av1_frame_header.film_grain.point_cb_scaling[i] = film_grain->point_cb_scaling[i];
+- ap->av1_frame_header.film_grain.point_cr_value[i] = film_grain->point_cr_value[i];
+- ap->av1_frame_header.film_grain.point_cr_scaling[i] = film_grain->point_cr_scaling[i];
++ for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_CB_POINTS; i++) {
++ ap->film_grain.point_cb_value[i] = film_grain->point_cb_value[i];
++ ap->film_grain.point_cb_scaling[i] = film_grain->point_cb_scaling[i];
++ ap->film_grain.point_cr_value[i] = film_grain->point_cr_value[i];
++ ap->film_grain.point_cr_scaling[i] = film_grain->point_cr_scaling[i];
+ }
+
+- for (int i = 0; i < 24; i++) {
+- ap->av1_frame_header.film_grain.ar_coeffs_y_plus_128[i] = film_grain->ar_coeffs_y_plus_128[i];
+- ap->av1_frame_header.film_grain.ar_coeffs_cb_plus_128[i] = film_grain->ar_coeffs_cb_plus_128[i];
+- ap->av1_frame_header.film_grain.ar_coeffs_cr_plus_128[i] = film_grain->ar_coeffs_cr_plus_128[i];
+- }
++ for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_POS_LUMA; i++)
++ ap->film_grain.ar_coeffs_y_plus_128[i] = film_grain->ar_coeffs_y_plus_128[i];
+
+- ap->av1_frame_header.film_grain.ar_coeffs_cb_plus_128[24] = film_grain->ar_coeffs_cb_plus_128[24];
+- ap->av1_frame_header.film_grain.ar_coeffs_cr_plus_128[24] = film_grain->ar_coeffs_cr_plus_128[24];
++ for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_POS_CHROMA; i++) {
++ ap->film_grain.ar_coeffs_cb_plus_128[i] = film_grain->ar_coeffs_cb_plus_128[i];
++ ap->film_grain.ar_coeffs_cr_plus_128[i] = film_grain->ar_coeffs_cr_plus_128[i];
++ }
+ }
+
+- /* Workaround for a spec issue. */
+ ap->dec = dec;
+
+ return 0;
+@@ -484,25 +545,20 @@ static int vk_av1_decode_slice(AVCodecContext *avctx,
+ AV1VulkanDecodePicture *ap = s->cur_frame.hwaccel_picture_private;
+ FFVulkanDecodePicture *vp = &ap->vp;
+
++ /* Too many tiles, exceeding all defined levels in the AV1 spec */
++ if (ap->av1_pic_info.tileCount > MAX_TILES)
++ return AVERROR(ENOSYS);
++
+ for (int i = s->tg_start; i <= s->tg_end; i++) {
+- ap->tiles[ap->tile_list.nb_tiles] = (StdVideoAV1MESATile) {
+- .size = s->tile_group_info[i].tile_size,
+- .offset = s->tile_group_info[i].tile_offset,
+- .row = s->tile_group_info[i].tile_row,
+- .column = s->tile_group_info[i].tile_column,
+- .tg_start = s->tg_start,
+- .tg_end = s->tg_end,
+- };
++ ap->tile_sizes[ap->av1_pic_info.tileCount] = s->tile_group_info[i].tile_size;
+
+ err = ff_vk_decode_add_slice(avctx, vp,
+ data + s->tile_group_info[i].tile_offset,
+ s->tile_group_info[i].tile_size, 0,
+- &ap->tile_list.nb_tiles,
+- &ap->tile_offsets);
++ &ap->av1_pic_info.tileCount,
++ &ap->av1_pic_info.pTileOffsets);
+ if (err < 0)
+ return err;
+-
+- ap->tiles[ap->tile_list.nb_tiles - 1].offset = ap->tile_offsets[ap->tile_list.nb_tiles - 1];
+ }
+
+ return 0;
+@@ -518,7 +574,7 @@ static int vk_av1_end_frame(AVCodecContext *avctx)
+ FFVulkanDecodePicture *rvp[AV1_NUM_REF_FRAMES] = { 0 };
+ AVFrame *rav[AV1_NUM_REF_FRAMES] = { 0 };
+
+- if (!ap->tile_list.nb_tiles)
++ if (!ap->av1_pic_info.tileCount)
+ return 0;
+
+ if (!dec->session_params) {
+@@ -536,7 +592,7 @@ static int vk_av1_end_frame(AVCodecContext *avctx)
+ }
+
+ av_log(avctx, AV_LOG_VERBOSE, "Decoding frame, %"SIZE_SPECIFIER" bytes, %i tiles\n",
+- vp->slices_size, ap->tile_list.nb_tiles);
++ vp->slices_size, ap->av1_pic_info.tileCount);
+
+ return ff_vk_decode_frame(avctx, pic->f, vp, rav, rvp);
+ }
+@@ -580,8 +636,6 @@ const FFHWAccel ff_av1_vulkan_hwaccel = {
+ * flexibility, this index cannot be present anywhere.
+ * The current implementation tracks the index for the driver and submits it
+ * as necessary information. Due to needing to modify the decoding context,
+- * which is not thread-safe, on frame free, threading is disabled.
+- * In the future, once this is fixed in the spec, the workarounds may be removed
+- * and threading enabled. */
++ * which is not thread-safe, on frame free, threading is disabled. */
+ .caps_internal = HWACCEL_CAP_ASYNC_SAFE,
+ };
+diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
+index 91929d165f..4561f26b62 100644
+--- a/libavcodec/vulkan_decode.c
++++ b/libavcodec/vulkan_decode.c
+@@ -61,7 +61,7 @@ static const VkVideoProfileInfoKHR *get_video_profile(FFVulkanDecodeShared *ctx,
+ VkStructureType profile_struct_type =
+ codec_id == AV_CODEC_ID_H264 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR :
+ codec_id == AV_CODEC_ID_HEVC ? VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR :
+- codec_id == AV_CODEC_ID_AV1 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_MESA :
++ codec_id == AV_CODEC_ID_AV1 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR :
+ 0;
+
+ profile_list = ff_vk_find_struct(ctx->s.hwfc->create_pnext,
+@@ -674,7 +674,7 @@ static VkResult vulkan_setup_profile(AVCodecContext *avctx,
+ const struct FFVkCodecMap *vk_codec,
+ VkVideoDecodeH264CapabilitiesKHR *h264_caps,
+ VkVideoDecodeH265CapabilitiesKHR *h265_caps,
+- VkVideoDecodeAV1CapabilitiesMESA *av1_caps,
++ VkVideoDecodeAV1CapabilitiesKHR *av1_caps,
+ VkVideoCapabilitiesKHR *caps,
+ VkVideoDecodeCapabilitiesKHR *dec_caps,
+ int cur_profile)
+@@ -685,7 +685,7 @@ static VkResult vulkan_setup_profile(AVCodecContext *avctx,
+
+ VkVideoDecodeH264ProfileInfoKHR *h264_profile = &prof->h264_profile;
+ VkVideoDecodeH265ProfileInfoKHR *h265_profile = &prof->h265_profile;
+- VkVideoDecodeAV1ProfileInfoMESA *av1_profile = &prof->av1_profile;
++ VkVideoDecodeAV1ProfileInfoKHR *av1_profile = &prof->av1_profile;
+
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->sw_pix_fmt);
+ if (!desc)
+@@ -713,8 +713,9 @@ static VkResult vulkan_setup_profile(AVCodecContext *avctx,
+ } else if (avctx->codec_id == AV_CODEC_ID_AV1) {
+ dec_caps->pNext = av1_caps;
+ usage->pNext = av1_profile;
+- av1_profile->sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_MESA;
+- av1_profile->stdProfileIdc = cur_profile;
++ av1_profile->sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR;
++ av1_profile->stdProfile = cur_profile;
++ av1_profile->filmGrainSupport = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN);
+ }
+
+ usage->sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR;
+@@ -769,8 +770,8 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
+ VkVideoDecodeH265CapabilitiesKHR h265_caps = {
+ .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR,
+ };
+- VkVideoDecodeAV1CapabilitiesMESA av1_caps = {
+- .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_MESA,
++ VkVideoDecodeAV1CapabilitiesKHR av1_caps = {
++ .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR,
+ };
+
+ VkPhysicalDeviceVideoFormatInfoKHR fmt_info = {
+@@ -789,7 +790,7 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
+ cur_profile = avctx->profile;
+ base_profile = avctx->codec_id == AV_CODEC_ID_H264 ? AV_PROFILE_H264_CONSTRAINED_BASELINE :
+ avctx->codec_id == AV_CODEC_ID_H265 ? AV_PROFILE_HEVC_MAIN :
+- avctx->codec_id == AV_CODEC_ID_AV1 ? STD_VIDEO_AV1_MESA_PROFILE_MAIN :
++ avctx->codec_id == AV_CODEC_ID_AV1 ? STD_VIDEO_AV1_PROFILE_MAIN :
+ 0;
+
+ ret = vulkan_setup_profile(avctx, prof, hwctx, vk, vk_codec,
+@@ -837,7 +838,7 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
+
+ max_level = avctx->codec_id == AV_CODEC_ID_H264 ? ff_vk_h264_level_to_av(h264_caps.maxLevelIdc) :
+ avctx->codec_id == AV_CODEC_ID_H265 ? ff_vk_h265_level_to_av(h265_caps.maxLevelIdc) :
+- avctx->codec_id == AV_CODEC_ID_AV1 ? av1_caps.maxLevelIdc :
++ avctx->codec_id == AV_CODEC_ID_AV1 ? av1_caps.maxLevel :
+ 0;
+
+ av_log(avctx, AV_LOG_VERBOSE, "Decoder capabilities for %s profile \"%s\":\n",
+@@ -908,17 +909,11 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
+ "VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR set "
+ "but VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR is unset!\n");
+ return AVERROR_EXTERNAL;
+- } else if (!(dec_caps->flags & VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR) &&
+- avctx->codec_id == AV_CODEC_ID_AV1) {
+- av_log(avctx, AV_LOG_ERROR, "Cannot initialize Vulkan decoding session, buggy driver: "
+- "codec is AV1, but VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR isn't set!\n");
+- return AVERROR_EXTERNAL;
+ }
+
+ /* TODO: make dedicated_dpb tunable */
+ dec->dedicated_dpb = !(dec_caps->flags & VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR);
+ dec->layered_dpb = !(caps->flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR);
+- dec->external_fg = av1_caps.flags & VK_VIDEO_DECODE_AV1_CAPABILITY_EXTERNAL_FILM_GRAIN_MESA;
+
+ if (dec->dedicated_dpb) {
+ fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR;
+@@ -1126,8 +1121,10 @@ int ff_vk_decode_init(AVCodecContext *avctx)
+ VkVideoDecodeH265SessionParametersCreateInfoKHR h265_params = {
+ .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR,
+ };
+- VkVideoDecodeAV1SessionParametersCreateInfoMESA av1_params = {
+- .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA,
++ StdVideoAV1SequenceHeader av1_empty_seq = { 0 };
++ VkVideoDecodeAV1SessionParametersCreateInfoKHR av1_params = {
++ .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR,
++ .pStdSequenceHeader = &av1_empty_seq,
+ };
+ VkVideoSessionParametersCreateInfoKHR session_params_create = {
+ .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
+diff --git a/libavcodec/vulkan_decode.h b/libavcodec/vulkan_decode.h
+index a43e328d73..7ba8b239cb 100644
+--- a/libavcodec/vulkan_decode.h
++++ b/libavcodec/vulkan_decode.h
+@@ -37,7 +37,7 @@ typedef struct FFVulkanDecodeDescriptor {
+ typedef struct FFVulkanDecodeProfileData {
+ VkVideoDecodeH264ProfileInfoKHR h264_profile;
+ VkVideoDecodeH265ProfileInfoKHR h265_profile;
+- VkVideoDecodeAV1ProfileInfoMESA av1_profile;
++ VkVideoDecodeAV1ProfileInfoKHR av1_profile;
+ VkVideoDecodeUsageInfoKHR usage;
+ VkVideoProfileInfoKHR profile;
+ VkVideoProfileListInfoKHR profile_list;
+diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h
+index bb69e920bb..01a1de7d9d 100644
+--- a/libavcodec/vulkan_video.h
++++ b/libavcodec/vulkan_video.h
+@@ -22,8 +22,6 @@
+ #include "vulkan.h"
+
+ #include <vk_video/vulkan_video_codecs_common.h>
+-#include "vulkan_video_codec_av1std.h"
+-#include "vulkan_video_codec_av1std_decode.h"
+
+ #define CODEC_VER_MAJ(ver) (ver >> 22)
+ #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1))
+diff --git a/libavcodec/vulkan_video_codec_av1std_decode.h b/libavcodec/vulkan_video_codec_av1std_decode.h
+deleted file mode 100644
+index e2f37b4e6e..0000000000
+--- a/libavcodec/vulkan_video_codec_av1std_decode.h
++++ /dev/null
+@@ -1,36 +0,0 @@
+-/* Copyright 2023 Lynne
+- * Copyright 2023 Dave Airlie
+- *
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_
+-#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1
+-
+-/*
+-** This header is NOT YET generated from the Khronos Vulkan XML API Registry.
+-**
+-*/
+-
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-#define vulkan_video_codec_av1std_decode 1
+-
+-
+-
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-#endif
+diff --git a/libavcodec/vulkan_video_codec_av1std.h b/libavcodec/vulkan_video_codec_av1std.h
+deleted file mode 100644
+index c91589eee2..0000000000
+--- a/libavcodec/vulkan_video_codec_av1std.h
++++ /dev/null
+@@ -1,403 +0,0 @@
+-/* Copyright 2023 Lynne
+- * Copyright 2023 Dave Airlie
+- *
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_
+-#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1
+-
+-/*
+-** This header is NOT YET generated from the Khronos Vulkan XML API Registry.
+-**
+-*/
+-
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-#define vulkan_video_codec_av1std 1
+-
+-#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \
+- ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))
+-#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 VK_MAKE_VIDEO_STD_VERSION(0, 1, 0)
+-#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0
+-#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode"
+-
+-typedef enum StdVideoAV1MESAProfile {
+- STD_VIDEO_AV1_MESA_PROFILE_MAIN = 0,
+- STD_VIDEO_AV1_MESA_PROFILE_HIGH = 1,
+- STD_VIDEO_AV1_MESA_PROFILE_PROFESSIONAL = 2,
+-} StdVideoAV1MESAProfile;
+-
+-typedef enum StdVideoAV1MESALevel {
+- STD_VIDEO_AV1_MESA_LEVEL_2_0 = 0,
+- STD_VIDEO_AV1_MESA_LEVEL_2_1 = 1,
+- STD_VIDEO_AV1_MESA_LEVEL_2_2 = 2,
+- STD_VIDEO_AV1_MESA_LEVEL_2_3 = 3,
+- STD_VIDEO_AV1_MESA_LEVEL_3_0 = 4,
+- STD_VIDEO_AV1_MESA_LEVEL_3_1 = 5,
+- STD_VIDEO_AV1_MESA_LEVEL_3_2 = 6,
+- STD_VIDEO_AV1_MESA_LEVEL_3_3 = 7,
+- STD_VIDEO_AV1_MESA_LEVEL_4_0 = 8,
+- STD_VIDEO_AV1_MESA_LEVEL_4_1 = 9,
+- STD_VIDEO_AV1_MESA_LEVEL_4_2 = 10,
+- STD_VIDEO_AV1_MESA_LEVEL_4_3 = 11,
+- STD_VIDEO_AV1_MESA_LEVEL_5_0 = 12,
+- STD_VIDEO_AV1_MESA_LEVEL_5_1 = 13,
+- STD_VIDEO_AV1_MESA_LEVEL_5_2 = 14,
+- STD_VIDEO_AV1_MESA_LEVEL_5_3 = 15,
+- STD_VIDEO_AV1_MESA_LEVEL_6_0 = 16,
+- STD_VIDEO_AV1_MESA_LEVEL_6_1 = 17,
+- STD_VIDEO_AV1_MESA_LEVEL_6_2 = 18,
+- STD_VIDEO_AV1_MESA_LEVEL_6_3 = 19,
+- STD_VIDEO_AV1_MESA_LEVEL_7_0 = 20,
+- STD_VIDEO_AV1_MESA_LEVEL_7_1 = 21,
+- STD_VIDEO_AV1_MESA_LEVEL_7_2 = 22,
+- STD_VIDEO_AV1_MESA_LEVEL_7_3 = 23,
+- STD_VIDEO_AV1_MESA_LEVEL_MAX = 31,
+-} StdVideoAV1MESALevel;
+-
+-typedef struct StdVideoAV1MESAFilmGrainFlags {
+- uint8_t apply_grain;
+- uint8_t chroma_scaling_from_luma;
+- uint8_t overlap_flag;
+- uint8_t clip_to_restricted_range;
+-} StdVideoAV1MESAFilmGrainFlags;
+-
+-typedef struct StdVideoAV1MESAFilmGrainParameters {
+- StdVideoAV1MESAFilmGrainFlags flags;
+- uint32_t grain_scaling_minus_8;
+- uint32_t ar_coeff_lag;
+- uint32_t ar_coeff_shift_minus_6;
+- uint32_t grain_scale_shift;
+-
+- uint16_t grain_seed;
+- uint8_t num_y_points;
+- uint8_t point_y_value[14];
+- uint8_t point_y_scaling[14];
+-
+- uint8_t num_cb_points;
+- uint8_t point_cb_value[10];
+- uint8_t point_cb_scaling[10];
+-
+- uint8_t num_cr_points;
+- uint8_t point_cr_value[10];
+- uint8_t point_cr_scaling[10];
+-
+- int8_t ar_coeffs_y_plus_128[24];
+- int8_t ar_coeffs_cb_plus_128[25];
+- int8_t ar_coeffs_cr_plus_128[25];
+- uint8_t cb_mult;
+- uint8_t cb_luma_mult;
+- uint16_t cb_offset;
+- uint8_t cr_mult;
+- uint8_t cr_luma_mult;
+- uint16_t cr_offset;
+-} StdVideoAV1MESAFilmGrainParameters;
+-
+-typedef struct StdVideoAV1MESAGlobalMotionFlags {
+- uint8_t gm_invalid;
+-} StdVideoAV1MESAGlobalMotionFlags;
+-
+-typedef struct StdVideoAV1MESAGlobalMotion {
+- StdVideoAV1MESAGlobalMotionFlags flags;
+- uint8_t gm_type;
+- uint32_t gm_params[6];
+-} StdVideoAV1MESAGlobalMotion;
+-
+-typedef struct StdVideoAV1MESALoopRestoration {
+- uint8_t lr_type[3];
+- uint8_t lr_unit_shift;
+- uint8_t lr_uv_shift;
+-} StdVideoAV1MESALoopRestoration;
+-
+-typedef struct StdVideoAV1MESATileInfoFlags {
+- uint8_t uniform_tile_spacing_flag;
+-} StdVideoAV1MESATileInfoFlags;
+-
+-typedef struct StdVideoAV1MESATileInfo {
+- StdVideoAV1MESATileInfoFlags flags;
+- uint8_t tile_cols;
+- uint8_t tile_rows;
+- uint8_t tile_start_col_sb[64];
+- uint8_t tile_start_row_sb[64];
+- uint8_t width_in_sbs_minus_1[64];
+- uint8_t height_in_sbs_minus_1[64];
+- uint16_t context_update_tile_id;
+- uint8_t tile_size_bytes_minus1;
+-} StdVideoAV1MESATileInfo;
+-
+-typedef struct StdVideoAV1MESAQuantizationFlags {
+- uint8_t using_qmatrix;
+-} StdVideoAV1MESAQuantizationFlags;
+-
+-typedef struct StdVideoAV1MESAQuantization {
+- StdVideoAV1MESAQuantizationFlags flags;
+- uint8_t base_q_idx;
+- int8_t delta_q_y_dc;
+- uint8_t diff_uv_delta;
+- int8_t delta_q_u_dc;
+- int8_t delta_q_u_ac;
+- int8_t delta_q_v_dc;
+- int8_t delta_q_v_ac;
+- uint8_t qm_y;
+- uint8_t qm_u;
+- uint8_t qm_v;
+-} StdVideoAV1MESAQuantization;
+-
+-typedef struct StdVideoAV1MESACDEF {
+- uint8_t damping_minus_3;
+- uint8_t bits;
+- uint8_t y_pri_strength[8];
+- uint8_t y_sec_strength[8];
+- uint8_t uv_pri_strength[8];
+- uint8_t uv_sec_strength[8];
+-} StdVideoAV1MESACDEF;
+-
+-typedef struct StdVideoAV1MESADeltaQFlags {
+- uint8_t delta_lf_present;
+- uint8_t delta_lf_multi;
+-} StdVideoAV1MESADeltaQFlags;
+-
+-typedef struct StdVideoAV1MESADeltaQ {
+- StdVideoAV1MESADeltaQFlags flags;
+- uint8_t delta_q_res;
+- uint8_t delta_lf_res;
+-} StdVideoAV1MESADeltaQ;
+-
+-typedef struct StdVideoAV1MESASegmentationFlags {
+- uint8_t enabled;
+- uint8_t update_map;
+- uint8_t temporal_update;
+- uint8_t update_data;
+-} StdVideoAV1MESASegmentationFlags;
+-
+-typedef struct StdVideoAV1MESASegmentation {
+- StdVideoAV1MESASegmentationFlags flags;
+- uint8_t feature_enabled_bits[8];
+- int16_t feature_data[8][8];
+-} StdVideoAV1MESASegmentation;
+-
+-typedef struct StdVideoAV1MESALoopFilterFlags {
+- uint8_t delta_enabled;
+- uint8_t delta_update;
+-} StdVideoAV1MESALoopFilterFlags;
+-
+-typedef struct StdVideoAV1MESALoopFilter {
+- StdVideoAV1MESALoopFilterFlags flags;
+- uint8_t level[4];
+- uint8_t sharpness;
+- int8_t ref_deltas[8];
+- int8_t mode_deltas[2];
+-} StdVideoAV1MESALoopFilter;
+-
+-typedef struct StdVideoAV1MESAFrameHeaderFlags {
+- uint8_t error_resilient_mode;
+- uint8_t disable_cdf_update;
+- uint8_t use_superres;
+- uint8_t render_and_frame_size_different;
+- uint8_t allow_screen_content_tools;
+- uint8_t is_filter_switchable;
+- uint8_t force_integer_mv;
+- uint8_t frame_size_override_flag;
+- uint8_t buffer_removal_time_present_flag;
+- uint8_t allow_intrabc;
+- uint8_t frame_refs_short_signaling;
+- uint8_t allow_high_precision_mv;
+- uint8_t is_motion_mode_switchable;
+- uint8_t use_ref_frame_mvs;
+- uint8_t disable_frame_end_update_cdf;
+- uint8_t allow_warped_motion;
+- uint8_t reduced_tx_set;
+- uint8_t reference_select;
+- uint8_t skip_mode_present;
+- uint8_t delta_q_present;
+- uint8_t UsesLr;
+-} StdVideoAV1MESAFrameHeaderFlags;
+-
+-typedef struct StdVideoAV1MESAFrameHeader {
+- StdVideoAV1MESAFrameHeaderFlags flags;
+-
+- uint32_t frame_presentation_time;
+- uint32_t display_frame_id;
+- uint32_t current_frame_id;
+- uint8_t frame_to_show_map_idx;
+- uint8_t frame_type;
+- uint8_t order_hint;
+- uint8_t primary_ref_frame;
+- uint16_t frame_width_minus_1;
+- uint16_t frame_height_minus_1;
+- uint16_t render_width_minus_1;
+- uint16_t render_height_minus_1;
+- uint8_t coded_denom;
+-
+- uint8_t refresh_frame_flags;
+- uint8_t ref_order_hint[8];
+- int8_t ref_frame_idx[7];
+- uint32_t delta_frame_id_minus1[7];
+-
+- uint8_t interpolation_filter;
+- uint8_t tx_mode;
+-
+- StdVideoAV1MESATileInfo tiling;
+- StdVideoAV1MESAQuantization quantization;
+- StdVideoAV1MESASegmentation segmentation;
+- StdVideoAV1MESADeltaQ delta_q;
+- StdVideoAV1MESALoopFilter loop_filter;
+- StdVideoAV1MESACDEF cdef;
+- StdVideoAV1MESALoopRestoration lr;
+- StdVideoAV1MESAGlobalMotion global_motion[8]; // One per ref frame
+- StdVideoAV1MESAFilmGrainParameters film_grain;
+-} StdVideoAV1MESAFrameHeader;
+-
+-typedef struct StdVideoAV1MESAScreenCoding {
+- uint8_t seq_force_screen_content_tools;
+-} StdVideoAV1MESAScreenCoding;
+-
+-typedef struct StdVideoAV1MESATimingInfoFlags {
+- uint8_t equal_picture_interval;
+-} StdVideoAV1MESATimingInfoFlags;
+-
+-typedef struct StdVideoAV1MESATimingInfo {
+- StdVideoAV1MESATimingInfoFlags flags;
+- uint32_t num_units_in_display_tick;
+- uint32_t time_scale;
+- uint32_t num_ticks_per_picture_minus_1;
+-} StdVideoAV1MESATimingInfo;
+-
+-typedef struct StdVideoAV1MESAColorConfigFlags {
+- uint8_t mono_chrome;
+- uint8_t color_range;
+- uint8_t separate_uv_delta_q;
+-} StdVideoAV1MESAColorConfigFlags;
+-
+-typedef struct StdVideoAV1MESAColorConfig {
+- StdVideoAV1MESAColorConfigFlags flags;
+- uint8_t bit_depth;
+- uint8_t subsampling_x;
+- uint8_t subsampling_y;
+-} StdVideoAV1MESAColorConfig;
+-
+-typedef struct StdVideoAV1MESASequenceHeaderFlags {
+- uint8_t still_picture;
+- uint8_t reduced_still_picture_header;
+- uint8_t use_128x128_superblock;
+- uint8_t enable_filter_intra;
+- uint8_t enable_intra_edge_filter;
+- uint8_t enable_interintra_compound;
+- uint8_t enable_masked_compound;
+- uint8_t enable_warped_motion;
+- uint8_t enable_dual_filter;
+- uint8_t enable_order_hint;
+- uint8_t enable_jnt_comp;
+- uint8_t enable_ref_frame_mvs;
+- uint8_t frame_id_numbers_present_flag;
+- uint8_t enable_superres;
+- uint8_t enable_cdef;
+- uint8_t enable_restoration;
+- uint8_t film_grain_params_present;
+- uint8_t timing_info_present_flag;
+- uint8_t initial_display_delay_present_flag;
+-} StdVideoAV1MESASequenceHeaderFlags;
+-
+-typedef struct StdVideoAV1MESASequenceHeader {
+- StdVideoAV1MESASequenceHeaderFlags flags;
+-
+- StdVideoAV1MESAProfile seq_profile;
+- uint8_t frame_width_bits_minus_1;
+- uint8_t frame_height_bits_minus_1;
+- uint16_t max_frame_width_minus_1;
+- uint16_t max_frame_height_minus_1;
+- uint8_t delta_frame_id_length_minus_2;
+- uint8_t additional_frame_id_length_minus_1;
+- uint8_t order_hint_bits_minus_1;
+- uint8_t seq_choose_integer_mv;
+- uint8_t seq_force_integer_mv;
+-
+- StdVideoAV1MESATimingInfo timing_info;
+- StdVideoAV1MESAColorConfig color_config;
+-} StdVideoAV1MESASequenceHeader;
+-
+-typedef struct StdVideoAV1MESATile {
+- uint16_t tg_start;
+- uint16_t tg_end;
+- uint16_t row;
+- uint16_t column;
+- uint32_t size;
+- uint32_t offset;
+-} StdVideoAV1MESATile;
+-
+-typedef struct StdVideoAV1MESATileList {
+- StdVideoAV1MESATile *tile_list;
+- uint32_t nb_tiles;
+-} StdVideoAV1MESATileList;
+-
+-typedef struct VkVideoDecodeAV1PictureInfoMESA {
+- VkStructureType sType;
+- const void *pNext;
+- StdVideoAV1MESAFrameHeader *frame_header;
+- StdVideoAV1MESATileList *tile_list;
+- uint8_t skip_mode_frame_idx[2];
+-} VkVideoDecodeAV1PictureInfoMESA;
+-
+-typedef struct VkVideoDecodeAV1DpbSlotInfoMESA {
+- VkStructureType sType;
+- const void *pNext;
+- uint8_t frameIdx;
+- uint8_t ref_order_hint[7];
+- uint8_t disable_frame_end_update_cdf;
+-} VkVideoDecodeAV1DpbSlotInfoMESA;
+-
+-typedef struct VkVideoDecodeAV1SessionParametersAddInfoMESA {
+- VkStructureType sType;
+- const void *pNext;
+- StdVideoAV1MESASequenceHeader *sequence_header;
+-} VkVideoDecodeAV1SessionParametersAddInfoMESA;
+-
+-typedef struct VkVideoDecodeAV1SessionParametersCreateInfoMESA {
+- VkStructureType sType;
+- const void *pNext;
+- const VkVideoDecodeAV1SessionParametersAddInfoMESA *pParametersAddInfo;
+-} VkVideoDecodeAV1SessionParametersCreateInfoMESA;
+-
+-typedef struct VkVideoDecodeAV1ProfileInfoMESA {
+- VkStructureType sType;
+- const void *pNext;
+- StdVideoAV1MESAProfile stdProfileIdc;
+-} VkVideoDecodeAV1ProfileInfoMESA;
+-
+-typedef enum VkVideoDecodeAV1CapabilityFlagBitsMESA {
+- VK_VIDEO_DECODE_AV1_CAPABILITY_EXTERNAL_FILM_GRAIN_MESA = 0x00000001,
+- VK_VIDEO_DECODE_AV1_CAPABILITY_FLAG_BITS_MAX_ENUM_MESA = 0x7FFFFFFF
+-} VkVideoDecodeAV1CapabilityFlagBitsMESA;
+-typedef VkFlags VkVideoDecodeAV1CapabilityFlagsMESA;
+-
+-typedef struct VkVideoDecodeAV1CapabilitiesMESA {
+- VkStructureType sType;
+- const void *pNext;
+- VkVideoDecodeAV1CapabilityFlagsMESA flags;
+- StdVideoAV1MESALevel maxLevelIdc;
+-} VkVideoDecodeAV1CapabilitiesMESA;
+-
+-#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_MESA 1000509000
+-#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA 1000509001
+-#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_ADD_INFO_MESA 1000509002
+-#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_MESA 1000509003
+-#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_MESA 1000509004
+-#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_MESA 1000509005
+-
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-#endif
+diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
+index 91b9f96ccf..6e3b96b73a 100644
+--- a/libavutil/hwcontext_vulkan.c
++++ b/libavutil/hwcontext_vulkan.c
+@@ -446,7 +446,7 @@ static const VulkanOptExtension optional_device_exts[] = {
+ { VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_QUEUE },
+ { VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H264 },
+ { VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H265 },
+- { "VK_MESA_video_decode_av1", FF_VK_EXT_VIDEO_DECODE_AV1 },
++ { VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_AV1 },
+ };
+
+ static VkBool32 VKAPI_CALL vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
+diff --git a/libavutil/vulkan_functions.h b/libavutil/vulkan_functions.h
+index 65021b04b1..6b379acf93 100644
+--- a/libavutil/vulkan_functions.h
++++ b/libavutil/vulkan_functions.h
+@@ -43,7 +43,7 @@ typedef enum FFVulkanExtensions {
+ FF_VK_EXT_VIDEO_DECODE_QUEUE = 1ULL << 11, /* VK_KHR_video_decode_queue */
+ FF_VK_EXT_VIDEO_DECODE_H264 = 1ULL << 12, /* VK_EXT_video_decode_h264 */
+ FF_VK_EXT_VIDEO_DECODE_H265 = 1ULL << 13, /* VK_EXT_video_decode_h265 */
+- FF_VK_EXT_VIDEO_DECODE_AV1 = 1ULL << 14, /* VK_MESA_video_decode_av1 */
++ FF_VK_EXT_VIDEO_DECODE_AV1 = 1ULL << 14, /* VK_KHR_video_decode_av1 */
+ FF_VK_EXT_ATOMIC_FLOAT = 1ULL << 15, /* VK_EXT_shader_atomic_float */
+ FF_VK_EXT_COOP_MATRIX = 1ULL << 16, /* VK_KHR_cooperative_matrix */
+
+diff --git a/libavutil/vulkan_loader.h b/libavutil/vulkan_loader.h
+index f9e739e1e3..73cf03935d 100644
+--- a/libavutil/vulkan_loader.h
++++ b/libavutil/vulkan_loader.h
+@@ -58,7 +58,7 @@ static inline uint64_t ff_vk_extensions_to_mask(const char * const *extensions,
+ { VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_QUEUE },
+ { VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H264 },
+ { VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H265 },
+- { "VK_MESA_video_decode_av1", FF_VK_EXT_VIDEO_DECODE_AV1 },
++ { VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_AV1 },
+ };
+
+ FFVulkanExtensions mask = 0x0;
+diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c
+--- ffmpeg-6.1.1.orig/libavcodec/vulkan_video.c
++++ ffmpeg-6.1.1/libavcodec/vulkan_video.c
+@@ -37,7 +37,7 @@ const FFVkCodecMap ff_vk_codec_map[AV_CO
+ 0,
+ 0,
+ FF_VK_EXT_VIDEO_DECODE_AV1,
+- 0x01000000 /* TODO fix this */
++ VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR
+ },
+ };
+
+--
+2.25.1
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.1.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
index 2306fe4a42..c0bce2db7a 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.1.1.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
@@ -22,8 +22,20 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz"
-SRC_URI[sha256sum] = "95bf3ff8c496511e71e958fb249e663c8c9c3de583c5bebc0f5a9745abbc0435"
+SRC_URI = " \
+ https://www.ffmpeg.org/releases/${BP}.tar.xz \
+ file://av1_ordering_info.patch \
+ file://vulkan_av1_stable_API.patch \
+"
+
+SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968"
+
+# https://nvd.nist.gov/vuln/detail/CVE-2023-39018
+# https://github.com/bramp/ffmpeg-cli-wrapper/issues/291
+# https://security-tracker.debian.org/tracker/CVE-2023-39018
+# https://bugzilla.suse.com/show_bug.cgi?id=CVE-2023-39018
+CVE_STATUS[CVE-2023-39018] = "cpe-incorrect: This issue belongs to ffmpeg-cli-wrapper \
+(Java wrapper around the FFmpeg CLI) and not ffmepg itself."
# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
ARM_INSTRUCTION_SET:armv4 = "arm"
@@ -39,8 +51,7 @@ DEPENDS = "nasm-native"
inherit autotools pkgconfig
PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
- alsa bzlib lzma pic pthreads shared theora zlib \
- ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \
+ alsa bzlib lzma theora zlib \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}"
# libraries to build in addition to avutil
@@ -70,6 +81,7 @@ PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt"
PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
+PACKAGECONFIG[v4l2] = "--enable-libv4l2,--disable-libv4l2,v4l-utils"
PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
@@ -79,13 +91,6 @@ PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-# other configuration options
-PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2"
-PACKAGECONFIG[pic] = "--enable-pic"
-PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads"
-PACKAGECONFIG[shared] = "--enable-shared"
-PACKAGECONFIG[strip] = ",--disable-stripping"
-
# Check codecs that require --enable-nonfree
USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
@@ -96,6 +101,10 @@ def cpu(d):
return 'generic'
EXTRA_OECONF = " \
+ --disable-stripping \
+ --enable-pic \
+ --enable-shared \
+ --enable-pthreads \
${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
\
--cross-prefix=${TARGET_PREFIX} \
@@ -113,6 +122,7 @@ EXTRA_OECONF = " \
--libdir=${libdir} \
--shlibdir=${libdir} \
--datadir=${datadir}/ffmpeg \
+ ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
--cpu=${@cpu(d)} \
--pkg-config=pkg-config \
"
@@ -125,19 +135,25 @@ EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mi
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \
--disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa"
-EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic"
+EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic --disable-rvv --disable-asm"
EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic"
EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic"
+EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
+EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
# gold crashes on x86, another solution is to --disable-asm but thats more hacky
# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}"
EXTRA_OEMAKE = "V=1"
do_configure() {
+ export TMPDIR="${B}/tmp"
+ mkdir -p ${B}/tmp
${S}/configure ${EXTRA_OECONF}
+ sed -i -e "s,^X86ASMFLAGS=.*,& --debug-prefix-map=${S}=${TARGET_DBGSRC_DIR} --debug-prefix-map=${B}=${TARGET_DBGSRC_DIR},g" ${B}/ffbuild/config.mak
}
# patch out build host paths for reproducibility
diff --git a/meta/recipes-multimedia/flac/flac_1.4.0.bb b/meta/recipes-multimedia/flac/flac_1.4.3.bb
index 360396380d..d4e463cda5 100644
--- a/meta/recipes-multimedia/flac/flac_1.4.0.bb
+++ b/meta/recipes-multimedia/flac/flac_1.4.3.bb
@@ -5,35 +5,28 @@ BUGTRACKER = "https://github.com/xiph/flac/issues"
SECTION = "libs"
LICENSE = "GFDL-1.2 & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
- file://src/Makefile.am;beginline=1;endline=17;md5=146d2c8c2fd287545cc1bd81f31e8758 \
+ file://src/Makefile.am;beginline=1;endline=17;md5=b1dab2704be7f01bfbd9b7f6d5f000a9 \
file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://src/flac/main.c;beginline=1;endline=18;md5=893456854ce6bf14a1a7ea77266eebab \
+ file://src/flac/main.c;beginline=1;endline=18;md5=23099119c034d894bd1bf7ef5bd22101 \
file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \
- file://src/plugin_common/all.h;beginline=1;endline=18;md5=73c74192ce89ee6238d15a171e00c971 \
- file://COPYING.Xiph;md5=3d6da238b5b57a0965d6730291119f65 \
- file://include/FLAC/all.h;beginline=65;endline=70;md5=64474f2b22e9e77b28d8b8b25c983a48"
+ file://COPYING.Xiph;md5=0c90e41ab2fa7e69ca9391330d870221 \
+ file://include/FLAC/all.h;beginline=65;endline=70;md5=39aaf5e03c7364363884c8b8ddda8eea"
SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz"
-SRC_URI[sha256sum] = "af41c0733c93c237c3e52f64dd87e3b0d9af38259f1c7d11e8cbf583c48c2506"
+SRC_URI[sha256sum] = "6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70"
CVE_PRODUCT = "libflac flac"
inherit autotools gettext
EXTRA_OECONF = "--disable-oggtest \
- --disable-xmms-plugin \
--without-libiconv-prefix \
ac_cv_prog_NASM="" \
"
PACKAGECONFIG ??= " \
- ${@bb.utils.filter("TUNE_FEATURES", "altivec vsx", d)} \
- ${@bb.utils.contains_any("TUNE_FEATURES", "core2 corei7", "sse", "", d)} \
ogg \
"
-PACKAGECONFIG[sse] = "--enable-sse,--disable-sse"
-PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec"
-PACKAGECONFIG[vsx] = "--enable-vsx,--disable-vsx"
PACKAGECONFIG[avx] = "--enable-avx,--disable-avx"
PACKAGECONFIG[ogg] = "--enable-ogg --with-ogg-libraries=${STAGING_LIBDIR} --with-ogg-includes=${STAGING_INCDIR},--disable-ogg,libogg"
diff --git a/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch b/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch
index c0e4581358..21e30d6d46 100644
--- a/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch
+++ b/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch
@@ -1,4 +1,4 @@
-From 73b1002eda17451db1f58431b42c25203f1d3097 Mon Sep 17 00:00:00 2001
+From 0c73b8131efba63c5cd37ea8c7551434c3b57304 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 9 Sep 2018 17:38:10 -0700
Subject: [PATCH] connect has a different signature on musl
@@ -11,6 +11,7 @@ typcasted to struct sockaddr_in* type inside the function before use
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
validate/plugins/fault_injection/socket_interposer.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-multimedia/gstreamer/gst-devtools_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gst-devtools_1.22.11.bb
index c515e173c8..2be406192f 100644
--- a/meta/recipes-multimedia/gstreamer/gst-devtools_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-devtools_1.22.11.bb
@@ -12,7 +12,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV}
file://0001-connect-has-a-different-signature-on-musl.patch \
"
-SRC_URI[sha256sum] = "bbbd45ead703367ea8f4be9b3c082d7b62bef47b240a39083f27844e28758c47"
+SRC_URI[sha256sum] = "07766425ecb5bf857ab5ad3962321c55cd89f9386b720843f9df71c0a455eb9b"
DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base"
RRECOMMENDS:${PN} = "git"
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb b/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb
index 02282ac5d9..70b72fd7fb 100644
--- a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb
@@ -23,7 +23,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
do_install:append() {
- install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
+ install -m 0644 -D ${UNPACKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
}
RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.11.bb
index e8da49af99..f3287efa96 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.11.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz"
-SRC_URI[sha256sum] = "3fedd10560fcdfaa1b6462cbf79a38c4e7b57d7f390359393fc0cef6dbf27dfe"
+SRC_URI[sha256sum] = "6b13dcc9332ef27a7c1e7005c0196883874f91622f8aa6e52f218b05b15d2bf5"
S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
index 57a9adbaec..6cc11e1928 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
@@ -34,8 +34,7 @@ RDEPENDS:gstreamer1.0-meta-base = "\
gstreamer1.0-plugins-base-audioconvert \
gstreamer1.0-plugins-base-audioresample \
gstreamer1.0-plugins-base-typefindfunctions \
- gstreamer1.0-plugins-base-videoscale \
- gstreamer1.0-plugins-base-videoconvert \
+ gstreamer1.0-plugins-base-videoconvertscale \
gstreamer1.0-plugins-good-autodetect \
gstreamer1.0-plugins-good-soup"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.11.bb
index fb48562a2b..97348fb398 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.11.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
-SRC_URI[sha256sum] = "8db48040bb41f09edf8d17ff6d16c54888d7777ba4501c2c69f0083350ea9a15"
+SRC_URI[sha256sum] = "18dfdf5f6b773d67e62a315c6cf6247da320b83603a5819493f53c69ed2eeef6"
S = "${WORKDIR}/gst-omx-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch
index 4b3451d321..a57fcd7d21 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch
@@ -1,4 +1,4 @@
-From 6c3eeaf6435608f744303c17d52245f926cd28ac Mon Sep 17 00:00:00 2001
+From 8be0c6ac60c96e87d8aa443be9c431844dc3d92a Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 26 Jan 2016 15:16:01 -0800
Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch
index e3e5d9fb60..6509a293b7 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch
@@ -1,4 +1,4 @@
-From 701255c5797f222f0c47ace6437d213607b98d1e Mon Sep 17 00:00:00 2001
+From 426ee79adeecc24605426030a486d7c5a755048c Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Wed, 3 Feb 2016 18:05:41 -0800
Subject: [PATCH] avoid including <sys/poll.h> directly
@@ -14,7 +14,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
-index 92c918c..5e27871 100644
+index b8e5b1a..5bca6e5 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -98,7 +98,7 @@
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
index 029b80e174..50a3143eca 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
@@ -1,4 +1,4 @@
-From 3bc5d48257032b6bbee532aad15062fbbcc43bfe Mon Sep 17 00:00:00 2001
+From e6eb7536fcfc2c75f7831f67b1f16f3f36ef2545 Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Mon, 27 Jan 2020 10:22:35 +0000
Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build
@@ -18,7 +18,7 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
1 file changed, 3 insertions(+)
diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
-index 1d86b90..b5c8b95 100644
+index 37e2015..326f737 100644
--- a/ext/opencv/meson.build
+++ b/ext/opencv/meson.build
@@ -87,6 +87,9 @@ if opencv_found
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.11.bb
index 39d5e08b21..523ee7a5ae 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.11.bb
@@ -1,7 +1,7 @@
require gstreamer1.0-plugins-common.inc
require gstreamer1.0-plugins-license.inc
-DESCRIPTION = "'Bad' GStreamer plugins and helper libraries "
+SUMMARY = "'Bad' GStreamer plugins and helper libraries "
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues"
@@ -10,7 +10,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad
file://0002-avoid-including-sys-poll.h-directly.patch \
file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
"
-SRC_URI[sha256sum] = "7a11c13b55dd1d2386dd902219e41cbfcdda8e1e0aa3e738186c95074b35da4f"
+SRC_URI[sha256sum] = "808d3b33fc4c71aeb2561c364a87c2e8a3e2343319a83244c8391be4b09499c8"
S = "${WORKDIR}/gst-plugins-bad-${PV}"
@@ -60,7 +60,7 @@ PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde26
PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2"
PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms"
PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug"
-PACKAGECONFIG[msdk] = "-Dmsdk=enabled,-Dmsdk=disabled,intel-mediasdk"
+PACKAGECONFIG[msdk] = "-Dmsdk=enabled -Dmfx_api=oneVPL,-Dmsdk=disabled,onevpl-intel-gpu"
PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon"
PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft"
PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch
index d5d9838372..34c99ded42 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch
@@ -1,13 +1,14 @@
-From f9d48cd85ee68207733b1b91a00453462c33524a Mon Sep 17 00:00:00 2001
+From 63fe5a7b4ef70e2c490bad3b0838329935a8d77c Mon Sep 17 00:00:00 2001
From: zhouming <b42586@freescale.com>
Date: Wed, 14 May 2014 10:16:20 +0800
-Subject: [PATCH 1/4] ENGR00312515: get caps from src pad when query caps
+Subject: [PATCH] ENGR00312515: get caps from src pad when query caps
https://bugzilla.gnome.org/show_bug.cgi?id=728312
Upstream-Status: Pending
Signed-off-by: zhouming <b42586@freescale.com>
+
---
gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
@@ -16,10 +17,10 @@ Signed-off-by: zhouming <b42586@freescale.com>
diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c
old mode 100644
new mode 100755
-index f545857..62d10ef
+index 173da37..2b7f34c
--- a/gst-libs/gst/tag/gsttagdemux.c
+++ b/gst-libs/gst/tag/gsttagdemux.c
-@@ -1777,6 +1777,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
+@@ -1796,6 +1796,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
}
break;
}
@@ -39,6 +40,3 @@ index f545857..62d10ef
default:
res = gst_pad_query_default (pad, parent, query);
break;
---
-2.28.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-include-required-system-headers-for-isspace-and-ssca.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-include-required-system-headers-for-isspace-and-ssca.patch
deleted file mode 100644
index 23c1048a36..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-include-required-system-headers-for-isspace-and-ssca.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From c85a53a41d4e6bfc49c377217ece12a1f330a690 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 12 Aug 2022 22:50:06 -0700
-Subject: [PATCH] include required system headers for isspace() and sscanf()
- functions
-
-Newer compilers ( clang 15 ) has turned stricter and errors out instead
-of warning on implicit function declations
-Fixes
-gstssaparse.c:297:12: error: call to undeclared library function 'isspace' with type 'int (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
-while (isspace(*t))
-
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2879]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gst/subparse/gstssaparse.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
-index ff802fa..5ebe678 100755
---- a/gst/subparse/gstssaparse.c
-+++ b/gst/subparse/gstssaparse.c
-@@ -24,6 +24,8 @@
- #include "config.h"
- #endif
-
-+#include <ctype.h> /* isspace() */
-+#include <stdio.h> /* sscanf() */
- #include <stdlib.h> /* atoi() */
- #include <string.h>
-
---
-2.37.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch
index e453a500c9..2adeae93d6 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch
@@ -1,14 +1,15 @@
-From f587861bbe12ad0b10370f835592746aafedbf56 Mon Sep 17 00:00:00 2001
+From 7bf9525528c8f4a47413d7f82214d76f95f0c5f6 Mon Sep 17 00:00:00 2001
From: Mingke Wang <mingke.wang@freescale.com>
Date: Thu, 19 Mar 2015 14:17:10 +0800
-Subject: [PATCH 2/4] ssaparse: enhance SSA text lines parsing.
+Subject: [PATCH] ssaparse: enhance SSA text lines parsing.
some parser will pass in the original ssa text line which starts with "Dialog:"
and there's are maybe multiple Dialog lines in one input buffer.
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496]
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/178]
Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
+
---
gst/subparse/gstssaparse.c | 150 +++++++++++++++++++++++++++++++++----
1 file changed, 134 insertions(+), 16 deletions(-)
@@ -17,10 +18,10 @@ Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
old mode 100644
new mode 100755
-index c849c08..4b9636c
+index d6fdb9c..5ebe678
--- a/gst/subparse/gstssaparse.c
+++ b/gst/subparse/gstssaparse.c
-@@ -262,6 +262,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
+@@ -270,6 +270,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
* gst_ssa_parse_push_line:
* @parse: caller element
* @txt: text to push
@@ -28,7 +29,7 @@ index c849c08..4b9636c
* @start: timestamp for the buffer
* @duration: duration for the buffer
*
-@@ -271,27 +272,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
+@@ -279,27 +280,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
* Returns: result of the push of the created buffer
*/
static GstFlowReturn
@@ -173,7 +174,7 @@ index c849c08..4b9636c
GST_LOG_OBJECT (parse, "Text : %s", t);
if (gst_ssa_parse_remove_override_codes (parse, t)) {
-@@ -309,13 +416,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
+@@ -317,13 +424,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
gst_buffer_fill (buf, 0, escaped, len + 1);
gst_buffer_set_size (buf, len);
g_free (escaped);
@@ -200,7 +201,7 @@ index c849c08..4b9636c
ret = gst_pad_push (parse->srcpad, buf);
-@@ -335,6 +451,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
+@@ -343,6 +459,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
GstClockTime ts;
gchar *txt;
GstMapInfo map;
@@ -208,7 +209,7 @@ index c849c08..4b9636c
if (G_UNLIKELY (!parse->framed))
goto not_framed;
-@@ -352,13 +469,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
+@@ -360,13 +477,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
/* make double-sure it's 0-terminated and all */
gst_buffer_map (buf, &map, GST_MAP_READ);
txt = g_strndup ((gchar *) map.data, map.size);
@@ -224,6 +225,3 @@ index c849c08..4b9636c
if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) {
GstSegment segment;
---
-2.28.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch
index 2af83ff8b9..a605533be8 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch
@@ -1,19 +1,20 @@
-From 153f3b83a3fed77785bd1420bed8bbafa2d791b3 Mon Sep 17 00:00:00 2001
+From 2b07840122bc2e83bd23dad59aa80d9479f2e1e4 Mon Sep 17 00:00:00 2001
From: Carlos Rafael Giani <crg7475@mailbox.org>
Date: Tue, 21 May 2019 14:01:11 +0200
-Subject: [PATCH 3/4] viv-fb: Make sure config.h is included
+Subject: [PATCH] viv-fb: Make sure config.h is included
This prevents build errors due to missing GST_API_* symbols
Upstream-Status: Pending
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
+
---
gst-libs/gst/gl/gl-prelude.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h
-index 05e1f62..96ce5e6 100644
+index 85fca5a..946c729 100644
--- a/gst-libs/gst/gl/gl-prelude.h
+++ b/gst-libs/gst/gl/gl-prelude.h
@@ -22,6 +22,10 @@
@@ -27,6 +28,3 @@ index 05e1f62..96ce5e6 100644
#include <gst/gst.h>
#ifdef BUILDING_GST_GL
---
-2.28.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.11.bb
index e5e346e5e9..7aa10eb646 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.11.bb
@@ -1,6 +1,6 @@
require gstreamer1.0-plugins-common.inc
-DESCRIPTION = "'Base' GStreamer plugins and helper libraries"
+SUMMARY = "'Base' GStreamer plugins and helper libraries"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues"
LICENSE = "LGPL-2.1-or-later"
@@ -10,9 +10,8 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-ba
file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
file://0003-viv-fb-Make-sure-config.h-is-included.patch \
file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
- file://0001-include-required-system-headers-for-isspace-and-ssca.patch \
"
-SRC_URI[sha256sum] = "7e30b3dd81a70380ff7554f998471d6996ff76bbe6fc5447096f851e24473c9f"
+SRC_URI[sha256sum] = "65eaf72296cc5edc985695a4d80affc931e64a79f4879d05615854f7a2cf5bd1"
S = "${WORKDIR}/gst-plugins-base-${PV}"
@@ -22,7 +21,8 @@ inherit gobject-introspection
# opengl packageconfig factored out to make it easy for distros
# and BSP layers to choose OpenGL APIs/platforms/window systems
-PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
+PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}"
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
@@ -33,7 +33,7 @@ PACKAGECONFIG ??= " \
"
OPENGL_APIS = 'opengl gles2'
-OPENGL_PLATFORMS = 'egl'
+OPENGL_PLATFORMS = 'egl glx'
X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
@@ -62,6 +62,7 @@ PACKAGECONFIG[gles2] = ",,virtual/libgles2"
# OpenGL platform packageconfigs
PACKAGECONFIG[egl] = ",,virtual/egl"
+PACKAGECONFIG[glx] = ",,virtual/libgl"
# OpenGL window systems (except for X11)
PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch
deleted file mode 100644
index 788d752058..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From bf8b2fa0f6870589d036f0f33c140a3f85b530a0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 31 Mar 2020 21:23:28 -0700
-Subject: [PATCH] qt: include ext/qt/gstqtgl.h instead of gst/gl/gstglfuncs.h
-
-gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to
-prefer qt headers definitions for GLsync
-
-This helps in fixing build errors like below
-
-/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: error: conflicting declaration 'typedef struct __GLsync* GLsync'
- 24 | typedef struct __GLsync *GLsync;
- | ^~~~~~
-In file included from /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:84,
- from ../gst-plugins-good-1.16.2/ext/qt/gstqsgtexture.cc:30:
-/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: note: previous declaration as 'typedef void* GLsync
-'
- 40 | typedef gpointer GLsync;
- | ^~~~~~
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ext/qt/gstqsgtexture.cc | 2 +-
- ext/qt/qtwindow.cc | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
-index a05d26e..4cc9fc6 100644
---- a/ext/qt/gstqsgtexture.cc
-+++ b/ext/qt/gstqsgtexture.cc
-@@ -27,7 +27,7 @@
-
- #include <gst/video/video.h>
- #include <gst/gl/gl.h>
--#include <gst/gl/gstglfuncs.h>
-+#include <ext/qt/gstqtgl.h>
- #include "gstqsgtexture.h"
-
- #define GST_CAT_DEFAULT gst_qsg_texture_debug
-diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
-index 9360c33..0dfd3f1 100644
---- a/ext/qt/qtwindow.cc
-+++ b/ext/qt/qtwindow.cc
-@@ -25,7 +25,7 @@
- #include <stdio.h>
-
- #include <gst/video/video.h>
--#include <gst/gl/gstglfuncs.h>
-+#include <ext/qt/gstqtgl.h>
- #include "qtwindow.h"
- #include "gstqsgtexture.h"
- #include "gstqtglutility.h"
---
-2.28.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch
new file mode 100644
index 0000000000..33bd4200f6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch
@@ -0,0 +1,38 @@
+From b77d4806fd5de50d0b017a3e6a19c5bfdef7b3e4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Feb 2023 12:47:31 -0800
+Subject: [PATCH] v4l2: Define ioctl_req_t for posix/linux case
+
+this is an issue seen with musl based linux distros e.g. alpine [1]
+musl is not going to change this since it breaks ABI/API interfaces
+Newer compilers are stringent ( e.g. clang16 ) which can now detect
+signature mismatches in function pointers too, existing code warned but
+did not error with older clang
+
+Fixes
+gstv4l2object.c:544:23: error: incompatible function pointer types assigning to 'gint (*)(gint, ioctl_req_t, ...)' (aka 'int (*)(int, unsigned long, ...)') from 'int (int, int, ...)' [-Wincompatible-function-pointer-types]
+ v4l2object->ioctl = ioctl;
+ ^ ~~~~~
+
+[1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/7580
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3950]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ sys/v4l2/gstv4l2object.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h
+index d95b375..5223cbb 100644
+--- a/sys/v4l2/gstv4l2object.h
++++ b/sys/v4l2/gstv4l2object.h
+@@ -76,6 +76,8 @@ typedef gboolean (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object);
+ * 'unsigned long' for the 2nd parameter */
+ #ifdef __ANDROID__
+ typedef unsigned ioctl_req_t;
++#elif defined(__linux__) && !defined(__GLIBC__) /* musl/linux */
++typedef int ioctl_req_t;
+ #else
+ typedef gulong ioctl_req_t;
+ #endif
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb
index 0235935a4a..9ce3f73f7c 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb
@@ -1,14 +1,13 @@
require gstreamer1.0-plugins-common.inc
-DESCRIPTION = "'Good' GStreamer plugins"
+SUMMARY = "'Good' GStreamer plugins"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
- file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
- "
+ file://0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch"
-SRC_URI[sha256sum] = "f8f3c206bf5cdabc00953920b47b3575af0ef15e9f871c0b6966f6d0aa5868b7"
+SRC_URI[sha256sum] = "6ddd032381827d31820540735f0004b429436b0bdac19aaeab44fa22faad52e2"
S = "${WORKDIR}/gst-plugins-good-${PV}"
@@ -19,12 +18,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
DEPENDS += "gstreamer1.0-plugins-base libcap zlib"
RPROVIDES:${PN}-pulseaudio += "${PN}-pulse"
RPROVIDES:${PN}-soup += "${PN}-souphttpsrc"
+RDEPENDS:${PN}-soup += "${MLPREFIX}${@bb.utils.contains('PACKAGECONFIG', 'soup2', 'libsoup-2.4', 'libsoup', d)}"
+
+PACKAGECONFIG_SOUP ?= "soup3"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
+ ${PACKAGECONFIG_SOUP} \
${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \
${@bb.utils.contains('TUNE_FEATURES', 'm64', 'asm', '', d)} \
- bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 \
+ bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 speex taglib v4l2 \
"
X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
@@ -48,13 +51,9 @@ PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng"
PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils"
PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
-PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}"
-# Starting with version 1.20, the GStreamer soup plugin loads libsoup with dlopen()
-# instead of linking to it. And instead of using the default libsoup C headers, it
-# uses its own stub header. Consequently, objdump will not show the libsoup .so as
-# a dependency, and libsoup won't be added to an image. Fix this by setting libsoup
-# as RDEPEND instead of DEPEND.
-PACKAGECONFIG[soup] = "-Dsoup=enabled,-Dsoup=disabled,,libsoup-2.4"
+PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native qttools-native ${QT5WAYLANDDEPENDS}"
+PACKAGECONFIG[soup2] = "-Dsoup=enabled,,libsoup-2.4,,,soup3"
+PACKAGECONFIG[soup3] = "-Dsoup=enabled,,libsoup,,,soup2"
PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex"
PACKAGECONFIG[rpi] = "-Drpicamsrc=enabled,-Drpicamsrc=disabled,userland"
PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc
index 6638f13540..8b1c001111 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc
@@ -1,7 +1,7 @@
# This .inc file contains functionality for automatically setting
# the the license of all plugins according to the GSTREAMER_GPL.
-PACKAGESPLITFUNCS:append = " set_gstreamer_license "
+PACKAGESPLITFUNCS += "set_gstreamer_license"
python set_gstreamer_license () {
import oe.utils
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
index afc7be40c8..d77aeed8a2 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
@@ -9,8 +9,8 @@
# Dynamically generate packages for all enabled plugins
PACKAGES_DYNAMIC = "^${PN}-.* ^libgst.*"
-PACKAGESPLITFUNCS:prepend = " split_gstreamer10_packages "
-PACKAGESPLITFUNCS:append = " set_gstreamer10_metapkg_rdepends "
+PACKAGESPLITFUNCS =+ "split_gstreamer10_packages"
+PACKAGESPLITFUNCS += "set_gstreamer10_metapkg_rdepends"
python split_gstreamer10_packages () {
gst_libdir = d.expand('${libdir}/gstreamer-1.0')
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.11.bb
index ad7b84b5ab..99f41d4f3d 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.11.bb
@@ -1,12 +1,12 @@
require gstreamer1.0-plugins-common.inc
require gstreamer1.0-plugins-license.inc
-DESCRIPTION = "'Ugly GStreamer plugins"
+SUMMARY = "'Ugly GStreamer plugins"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues"
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+ "
LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
LICENSE_FLAGS = "commercial"
@@ -14,7 +14,8 @@ LICENSE_FLAGS = "commercial"
SRC_URI = " \
https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
"
-SRC_URI[sha256sum] = "8caa20789a09c304b49cf563d33cca9421b1875b84fcc187e4a385fa01d6aefd"
+
+SRC_URI[sha256sum] = "7758b7decfd20c00cae5700822bcbbf03f98c723e33e17634db2e07ca1da60bf"
S = "${WORKDIR}/gst-plugins-ugly-${PV}"
@@ -24,7 +25,6 @@ GST_PLUGIN_SET_HAS_EXAMPLES = "0"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
- a52dec mpeg2dec \
"
PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.11.bb
index 57026ba73b..0fbb03f757 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.11.bb
@@ -8,7 +8,7 @@ LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "db348120eae955b8cc4de3560a7ea06e36d6e1ddbaa99a7ad96b59846601cfdc"
+SRC_URI[sha256sum] = "f7a5450d93fd81bf46060dca7f4a048d095b6717961fec211731a11a994c99a7"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
@@ -23,8 +23,8 @@ EXTRA_OEMESON += "\
-Dlibpython-dir=${libdir} \
"
-# gobject-introspection is mandatory and cannot be configured
-REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
-GIR_MESON_OPTION = ""
+inherit meson pkgconfig setuptools3-base upstream-version-is-even features_check
+
+FILES:${PN} += "${libdir}/gstreamer-1.0"
-inherit meson pkgconfig setuptools3-base upstream-version-is-even gobject-introspection features_check
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.11.bb
index fd4f82fcc3..554ed9ec8f 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.11.bb
@@ -10,7 +10,7 @@ PNREAL = "gst-rtsp-server"
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "ee402718be9b127f0e5e66ca4c1b4f42e4926ec93ba307b7ccca5dc6cc9794ca"
+SRC_URI[sha256sum] = "ec49d474750a6ff6729c85b448abc607fb6840b21717ad7abc967e2adbf07a24"
S = "${WORKDIR}/${PNREAL}-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.11.bb
index 6e580f9f79..87eb8484a1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.11.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "6ee99eb316abdde9ad37002915bd8c3867918f6fdc74b7cf2ac4c1ae0d690b45"
+SRC_URI[sha256sum] = "6eae1360658302b9b512fa46b4d06f5b818dfce5f2f43d7d710ca8142719d8ad"
S = "${WORKDIR}/${REALPN}-${PV}"
DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
@@ -40,12 +40,12 @@ PACKAGECONFIG ??= "drm encoders \
${PACKAGECONFIG_GL} \
${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
-PACKAGECONFIG[drm] = "-Dwith_drm=yes,-Dwith_drm=no,udev libdrm"
-PACKAGECONFIG[egl] = "-Dwith_egl=yes,-Dwith_egl=no,virtual/egl"
-PACKAGECONFIG[encoders] = "-Dwith_encoders=yes,-Dwith_encoders=no"
-PACKAGECONFIG[glx] = "-Dwith_glx=yes,-Dwith_glx=no,virtual/libgl"
-PACKAGECONFIG[wayland] = "-Dwith_wayland=yes,-Dwith_wayland=no,wayland-native wayland wayland-protocols"
-PACKAGECONFIG[x11] = "-Dwith_x11=yes,-Dwith_x11=no,virtual/libx11 libxrandr libxrender"
+PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,udev libdrm"
+PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
+PACKAGECONFIG[encoders] = "-Dencoders=enabled,-Dencoders=disabled"
+PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/libgl"
+PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols"
+PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxrandr libxrender"
FILES:${PN} += "${libdir}/gstreamer-*/*.so"
FILES:${PN}-dbg += "${libdir}/gstreamer-*/.debug"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
index 312c04fbfd..0d839bd6c8 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
@@ -1,20 +1,21 @@
-From 1eb77a4ea5a3967c688d8f1192f99c605badc7e2 Mon Sep 17 00:00:00 2001
+From 5372cd5bf2a9dd247b9c5fc6e4fe248046dbb085 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 11 Apr 2021 19:48:13 +0100
-Subject: [PATCH 1/4] tests: respect the idententaion used in meson
+Subject: [PATCH] tests: respect the idententaion used in meson
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
---
- subprojects/gstreamer/tests/check/meson.build | 10 +++++-----
+ tests/check/meson.build | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
-diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
-index 9c4228b6e4..506606684d 100644
---- a/subprojects/gstreamer/tests/check/meson.build
-+++ b/subprojects/gstreamer/tests/check/meson.build
-@@ -146,11 +146,11 @@ foreach t : core_tests
+diff --git a/tests/check/meson.build b/tests/check/meson.build
+index 9787b0a..16caac7 100644
+--- a/tests/check/meson.build
++++ b/tests/check/meson.build
+@@ -145,11 +145,11 @@ foreach t : core_tests
if not skip_test
exe = executable(test_name, fname,
@@ -22,15 +23,12 @@ index 9c4228b6e4..506606684d 100644
- cpp_args : gst_c_args + test_defines,
- include_directories : [configinc],
- link_with : link_with_libs,
-- dependencies : test_deps + glib_deps + gst_deps,
+- dependencies : gst_deps + test_deps,
+ c_args : gst_c_args + test_defines,
+ cpp_args : gst_c_args + test_defines,
+ include_directories : [configinc],
+ link_with : link_with_libs,
-+ dependencies : test_deps + glib_deps + gst_deps,
++ dependencies : gst_deps + test_deps,
)
env = environment()
---
-2.33.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
index d18c19c397..64717e66c3 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
@@ -1,7 +1,7 @@
-From 62f5bb7bfc2498219df7280e73480d8ed2378ce5 Mon Sep 17 00:00:00 2001
+From 27e977d03b0f7c1d0bf19621ef0cec0585410e7b Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 11 Apr 2021 19:48:13 +0100
-Subject: [PATCH 2/4] tests: add support for install the tests
+Subject: [PATCH] tests: add support for install the tests
This will provide to run the tests using the gnome-desktop-testing [1]
@@ -10,19 +10,20 @@ This will provide to run the tests using the gnome-desktop-testing [1]
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
---
- subprojects/gstreamer/meson.build | 4 ++++
- subprojects/gstreamer/meson_options.txt | 1 +
- subprojects/gstreamer/tests/check/meson.build | 22 ++++++++++++++++++-
- .../gstreamer/tests/check/template.test.in | 3 +++
+ meson.build | 4 ++++
+ meson_options.txt | 1 +
+ tests/check/meson.build | 22 +++++++++++++++++++++-
+ tests/check/template.test.in | 3 +++
4 files changed, 29 insertions(+), 1 deletion(-)
- create mode 100644 subprojects/gstreamer/tests/check/template.test.in
+ create mode 100644 tests/check/template.test.in
-diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build
-index d20fe0040f..b595d8f990 100644
---- a/subprojects/gstreamer/meson.build
-+++ b/subprojects/gstreamer/meson.build
-@@ -562,6 +562,10 @@ if bashcomp_dep.found()
+diff --git a/meson.build b/meson.build
+index 60c7bec..f7650b1 100644
+--- a/meson.build
++++ b/meson.build
+@@ -606,6 +606,10 @@ if bashcomp_dep.found()
endif
endif
@@ -33,10 +34,10 @@ index d20fe0040f..b595d8f990 100644
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
pkgconfig = import('pkgconfig')
-diff --git a/subprojects/gstreamer/meson_options.txt b/subprojects/gstreamer/meson_options.txt
-index 7363bdb7a1..a34ba37dad 100644
---- a/subprojects/gstreamer/meson_options.txt
-+++ b/subprojects/gstreamer/meson_options.txt
+diff --git a/meson_options.txt b/meson_options.txt
+index 7363bdb..a34ba37 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
option('memory-alignment', type: 'combo',
choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
@@ -45,10 +46,10 @@ index 7363bdb7a1..a34ba37dad 100644
# Feature options
option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
-diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
-index 506606684d..00a138a568 100644
---- a/subprojects/gstreamer/tests/check/meson.build
-+++ b/subprojects/gstreamer/tests/check/meson.build
+diff --git a/tests/check/meson.build b/tests/check/meson.build
+index 16caac7..f2d400f 100644
+--- a/tests/check/meson.build
++++ b/tests/check/meson.build
@@ -124,10 +124,16 @@ test_defines = [
'-UG_DISABLE_ASSERT',
'-UG_DISABLE_CAST_CHECKS',
@@ -67,16 +68,16 @@ index 506606684d..00a138a568 100644
# sanity checking
if get_option('check').disabled()
if get_option('tests').enabled()
-@@ -151,6 +157,8 @@ foreach t : core_tests
+@@ -150,6 +156,8 @@ foreach t : core_tests
include_directories : [configinc],
link_with : link_with_libs,
- dependencies : test_deps + glib_deps + gst_deps,
+ dependencies : gst_deps + test_deps,
+ install_dir: installed_tests_execdir,
+ install: installed_tests_enabled,
)
env = environment()
-@@ -162,6 +170,18 @@ foreach t : core_tests
+@@ -161,6 +169,18 @@ foreach t : core_tests
env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
@@ -95,15 +96,12 @@ index 506606684d..00a138a568 100644
test(test_name, exe, env: env, timeout : 3 * 60)
endif
endforeach
-diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in
+diff --git a/tests/check/template.test.in b/tests/check/template.test.in
new file mode 100644
-index 0000000000..f701627f87
+index 0000000..f701627
--- /dev/null
-+++ b/subprojects/gstreamer/tests/check/template.test.in
++++ b/tests/check/template.test.in
@@ -0,0 +1,3 @@
+[Test]
+Type=session
+Exec=@installed_tests_dir@/@program@
---
-2.33.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
index 10a6dcc619..0fd830f150 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
@@ -1,7 +1,7 @@
-From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001
+From 7041bc5adf9501beb1428d8bbae6b351a6bf07f9 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sat, 24 Apr 2021 10:34:47 +0100
-Subject: [PATCH 3/4] tests: use a dictionaries for environment
+Subject: [PATCH] tests: use a dictionaries for environment
meson environment() can't be passed to configure_file and it is needed for installed_tests,
use a dictionary as this is simplest solution to install the environment.
@@ -9,15 +9,16 @@ use a dictionary as this is simplest solution to install the environment.
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
---
- subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++-------
+ tests/check/meson.build | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
-diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
-index 00a138a568..48ec2532f8 100644
---- a/subprojects/gstreamer/tests/check/meson.build
-+++ b/subprojects/gstreamer/tests/check/meson.build
-@@ -161,14 +161,19 @@ foreach t : core_tests
+diff --git a/tests/check/meson.build b/tests/check/meson.build
+index f2d400f..50dff7f 100644
+--- a/tests/check/meson.build
++++ b/tests/check/meson.build
+@@ -160,14 +160,19 @@ foreach t : core_tests
install: installed_tests_enabled,
)
@@ -45,6 +46,3 @@ index 00a138a568..48ec2532f8 100644
if installed_tests_enabled
test_conf = configuration_data()
---
-2.33.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
index efa004f8ce..5689dc9fbb 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
@@ -1,7 +1,7 @@
-From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001
+From 1b1d1ce4227b6bea7c7def5dac4a663486e070c2 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 2 May 2021 01:58:01 +0100
-Subject: [PATCH 4/4] tests: add helper script to run the installed_tests
+Subject: [PATCH] tests: add helper script to run the installed_tests
- this is a bash script that will run the installed_tests
with some of the environment variables used in the meson
@@ -10,18 +10,19 @@ testing framework.
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
---
- subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++
- .../gstreamer/tests/check/template.sh.in | 9 +++++++++
- .../gstreamer/tests/check/template.test.in | 2 +-
+ tests/check/meson.build | 17 +++++++++++++++++
+ tests/check/template.sh.in | 9 +++++++++
+ tests/check/template.test.in | 2 +-
3 files changed, 27 insertions(+), 1 deletion(-)
- create mode 100755 subprojects/gstreamer/tests/check/template.sh.in
+ create mode 100755 tests/check/template.sh.in
-diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
-index 48ec2532f8..7dc4990d4e 100644
---- a/subprojects/gstreamer/tests/check/meson.build
-+++ b/subprojects/gstreamer/tests/check/meson.build
-@@ -185,6 +185,23 @@ foreach t : core_tests
+diff --git a/tests/check/meson.build b/tests/check/meson.build
+index 50dff7f..2b9e979 100644
+--- a/tests/check/meson.build
++++ b/tests/check/meson.build
+@@ -184,6 +184,23 @@ foreach t : core_tests
install_dir: installed_tests_metadir,
configuration: test_conf
)
@@ -45,11 +46,11 @@ index 48ec2532f8..7dc4990d4e 100644
endif
test(test_name, exe, env: env, timeout : 3 * 60)
-diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in
+diff --git a/tests/check/template.sh.in b/tests/check/template.sh.in
new file mode 100755
-index 0000000000..cf7d31b0ea
+index 0000000..cf7d31b
--- /dev/null
-+++ b/subprojects/gstreamer/tests/check/template.sh.in
++++ b/tests/check/template.sh.in
@@ -0,0 +1,9 @@
+#!/bin/sh
+
@@ -60,15 +61,12 @@ index 0000000000..cf7d31b0ea
+GST_REGISTRY=@GST_REGISTRY@
+GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@"
+exec @TEST@
-diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in
-index f701627f87..b74ef6ad73 100644
---- a/subprojects/gstreamer/tests/check/template.test.in
-+++ b/subprojects/gstreamer/tests/check/template.test.in
+diff --git a/tests/check/template.test.in b/tests/check/template.test.in
+index f701627..b74ef6a 100644
+--- a/tests/check/template.test.in
++++ b/tests/check/template.test.in
@@ -1,3 +1,3 @@
[Test]
Type=session
-Exec=@installed_tests_dir@/@program@
+Exec=@installed_tests_dir@/@program@.sh
---
-2.33.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch
deleted file mode 100644
index f51df6d20b..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001
-From: Claudius Heine <ch@denx.de>
-Date: Wed, 2 Feb 2022 13:47:02 +0100
-Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase
-
-This testcase seems to be flaky, and upstream marked it as such:
-https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778
-
-This patch removes the testcase to avoid it interfering with out ptest.
-
-Signed-off-by: Claudius Heine <ch@denx.de>
-
-Upstream-Status: Inappropriate [needs proper upstream fix]
----
- tests/check/gst/gstbin.c | 69 -------------------
- 1 file changed, 69 deletions(-)
-
-diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c
-index e366d5fe20..ac29d81474 100644
---- a/tests/check/gst/gstbin.c
-+++ b/tests/check/gst/gstbin.c
-@@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children)
-
- GST_END_TEST;
-
--GST_START_TEST (test_watch_for_state_change)
--{
-- GstElement *src, *sink, *bin;
-- GstBus *bus;
-- GstStateChangeReturn ret;
--
-- bin = gst_element_factory_make ("bin", NULL);
-- fail_unless (bin != NULL, "Could not create bin");
--
-- bus = g_object_new (gst_bus_get_type (), NULL);
-- gst_object_ref_sink (bus);
-- gst_element_set_bus (GST_ELEMENT_CAST (bin), bus);
--
-- src = gst_element_factory_make ("fakesrc", NULL);
-- fail_if (src == NULL, "Could not create fakesrc");
-- sink = gst_element_factory_make ("fakesink", NULL);
-- fail_if (sink == NULL, "Could not create fakesink");
--
-- gst_bin_add (GST_BIN (bin), sink);
-- gst_bin_add (GST_BIN (bin), src);
--
-- fail_unless (gst_element_link (src, sink), "could not link src and sink");
--
-- /* change state, spawning two times three messages */
-- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
-- fail_unless (ret == GST_STATE_CHANGE_ASYNC);
-- ret =
-- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
-- GST_CLOCK_TIME_NONE);
-- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
--
-- pop_state_changed (bus, 6);
-- pop_async_done (bus);
-- pop_latency (bus);
--
-- fail_unless (gst_bus_have_pending (bus) == FALSE,
-- "Unexpected messages on bus");
--
-- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
-- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
--
-- pop_state_changed (bus, 3);
--
-- /* this one might return either SUCCESS or ASYNC, likely SUCCESS */
-- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
-- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE);
--
-- pop_state_changed (bus, 3);
-- if (ret == GST_STATE_CHANGE_ASYNC) {
-- pop_async_done (bus);
-- pop_latency (bus);
-- }
--
-- fail_unless (gst_bus_have_pending (bus) == FALSE,
-- "Unexpected messages on bus");
--
-- gst_bus_set_flushing (bus, TRUE);
--
-- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
-- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
--
-- /* clean up */
-- gst_object_unref (bus);
-- gst_object_unref (bin);
--}
--
--GST_END_TEST;
--
- GST_START_TEST (test_state_change_error_message)
- {
- GstElement *src, *sink, *bin;
-@@ -1956,7 +1888,6 @@ gst_bin_suite (void)
- tcase_add_test (tc_chain, test_message_state_changed);
- tcase_add_test (tc_chain, test_message_state_changed_child);
- tcase_add_test (tc_chain, test_message_state_changed_children);
-- tcase_add_test (tc_chain, test_watch_for_state_change);
- tcase_add_test (tc_chain, test_state_change_error_message);
- tcase_add_test (tc_chain, test_add_linked);
- tcase_add_test (tc_chain, test_add_self);
---
-2.33.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
index 0cfa955f03..ab2df80dcc 100755
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest
@@ -1,2 +1,21 @@
-#!/usr/bin/env sh
+#! /bin/sh
+
+# Multiply all timeouts by five so they're more likely to work
+# on a loaded system. The default timeout is 20s so this makes it
+# one minute.
+export CK_TIMEOUT_MULTIPLIER=5
+
+# Skip some tests that we know are problematic
+export GST_CHECKS_IGNORE=""
+
+# gstnetclientclock.c:test_functioning is very sensitive to load
+GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_functioning"
+
+# aggregator.c:test_infinite_seek_50_src_live is known to be flaky
+# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/410
+GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_infinite_seek_50_src_live"
+
+# Known unreliable tests as per subprojects/gst-devtools/validate/launcher/testsuites/check.py:
+GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE:parser_pull_short_read"
+
gnome-desktop-testing-runner gstreamer
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.22.11.bb
index 1f4576c3e1..8965497d01 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.22.11.bb
@@ -17,13 +17,12 @@ S = "${WORKDIR}/gstreamer-${PV}"
SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
file://run-ptest \
- file://0001-tests-respect-the-idententaion-used-in-meson.patch;striplevel=3 \
- file://0002-tests-add-support-for-install-the-tests.patch;striplevel=3 \
- file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \
- file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
- file://0005-tests-remove-gstbin-test_watch_for_state_change-test.patch \
+ file://0001-tests-respect-the-idententaion-used-in-meson.patch \
+ file://0002-tests-add-support-for-install-the-tests.patch \
+ file://0003-tests-use-a-dictionaries-for-environment.patch \
+ file://0004-tests-add-helper-script-to-run-the-installed_tests.patch \
"
-SRC_URI[sha256sum] = "607daf64bbbd5fb18af9d17e21c0d22c4d702fffe83b23cb22d1b1af2ca23a2a"
+SRC_URI[sha256sum] = "3d16259e9dab8b002c57ce208a09b350d8282f5b0197306c0cdba9a0d0799744"
PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
check \
@@ -68,6 +67,8 @@ FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb"
+RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-iso8859-5"
+
CVE_PRODUCT = "gstreamer"
PTEST_BUILD_HOST_FILES = ""
diff --git a/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch b/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch
deleted file mode 100644
index 5168100f3a..0000000000
--- a/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-It makes much more sense to control our own CFLAGS and avoiding fPIC breaks
-some arches too. Assume we know what we're doing and remove all the messing
-around.
-
-RP 23/2/10
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: a52dec-0.7.4/configure.in
-===================================================================
---- a52dec-0.7.4.orig/configure.in 2010-02-23 14:51:50.000000000 +0000
-+++ a52dec-0.7.4/configure.in 2010-02-23 14:52:36.000000000 +0000
-@@ -14,62 +14,6 @@
- AC_PROG_CC
- AC_PROG_GCC_TRADITIONAL
-
--if test x"$GCC" = x"yes"; then
--
-- dnl GCC-specific flags - try to optimize them sometime
-- dnl -Wall -Werror moved to the end to not disturb the configure script
--
-- dnl -O3
-- changequote(<<,>>)
-- OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g"`
-- changequote([,])
-- OPT_CFLAGS="$OPT_CFLAGS -O3"
-- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
--
-- dnl -fomit-frame-pointer
-- OPT_CFLAGS="$CFLAGS -fomit-frame-pointer"
-- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
--
-- dnl arch-specific flags
-- case "$host" in
-- i?86-* | k?-*)
-- case "$host" in
-- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
-- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
-- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
-- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
-- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
-- esac
-- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
-- sparc-* | sparc64-*)
-- OPT_CFLAGS="$CFLAGS -mtune=ultrasparc"
-- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
-- mips-sgi-irix6.*) dnl do we need to be that specific ?
-- OPT_CFLAGS="$CFLAGS -mabi=64"
-- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
-- esac
--elif test x"$CC" = x"tcc" -a x"`$CC -version 2>&1 | grep TenDRA`" != x""; then
-- dnl TenDRA portability checking compiler
-- TENDRA=yes
-- CFLAGS="-Xp -Yansi -f`pwd`/include/tendra.h -DELIDE_CODE"
-- enable_mlib=no
-- enable_oss=no
-- enable_solaris_audio=no
--elif test x"$CC" = x"icc" -a x"`$CC -V 2>&1 | grep Intel`" != x""; then
-- dnl Intel C++ compiler
-- CFLAGS="-g -O3 -unroll -ip"
--else
-- dnl non-gcc flags - we probably need exact configuration triplets here.
-- case "$host" in
-- mips-sgi-irix6.*)
-- OPT_CFLAGS="$CFLAGS -64"
-- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
-- sparc-sun-solaris*)
-- OPT_CFLAGS="$CFLAGS -xCC -fast -xO5"
-- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
-- esac
--fi
--
- dnl Checks for libtool - this must be done after we set cflags
- AC_DISABLE_SHARED
- AC_LIBTOOL_WIN32_DLL
-Index: a52dec-0.7.4/liba52/configure.incl
-===================================================================
---- a52dec-0.7.4.orig/liba52/configure.incl 2010-02-23 14:51:44.000000000 +0000
-+++ a52dec-0.7.4/liba52/configure.incl 2010-02-23 14:51:59.000000000 +0000
-@@ -1,9 +1,6 @@
- AC_SUBST([LIBA52_CFLAGS])
- AC_SUBST([LIBA52_LIBS])
-
--dnl avoid -fPIC when possible
--LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
--
- AC_ARG_ENABLE([double],
- [ --enable-double use double-precision samples])
- if test x"$enable_double" = x"yes"; then
diff --git a/meta/recipes-multimedia/liba52/liba52_0.7.4.bb b/meta/recipes-multimedia/liba52/liba52_0.7.4.bb
deleted file mode 100644
index f6bca4e730..0000000000
--- a/meta/recipes-multimedia/liba52/liba52_0.7.4.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "ATSC A/52 surround sound stream decoder"
-DESCRIPTION = "Library for decoding ATSC A/52 streams. The A/52 standard \
-is used in a variety of applications, including digital television \
-and DVD. It is also known as AC-3."
-HOMEPAGE = "http://liba52.sourceforge.net/"
-LICENSE = "GPL-2.0-or-later"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://include/a52.h;beginline=1;endline=12;md5=81152ceb3562bf20a60d1b6018175dd1"
-SECTION = "libs"
-PR = "r4"
-
-inherit autotools
-
-SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz \
- file://buildcleanup.patch"
-
-SRC_URI[md5sum] = "caa9f5bc44232dc8aeea773fea56be80"
-SRC_URI[sha256sum] = "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33"
-
-UPSTREAM_CHECK_URI = "http://liba52.sourceforge.net/downloads.html"
-
-S = "${WORKDIR}/a52dec-${PV}"
-
-EXTRA_OECONF = " --enable-shared "
-
-PACKAGES =+ "a52dec a52dec-doc"
-
-FILES:a52dec = " ${bindir}/* "
-FILES:a52dec-doc = " ${mandir}/man1/* "
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.38.bb b/meta/recipes-multimedia/libpng/libpng_1.6.43.bb
index dc627203ef..f1febd0a02 100644
--- a/meta/recipes-multimedia/libpng/libpng_1.6.38.bb
+++ b/meta/recipes-multimedia/libpng/libpng_1.6.43.bb
@@ -5,15 +5,15 @@ library for use in applications that read, create, and manipulate PNG \
HOMEPAGE = "http://www.libpng.org/"
SECTION = "libs"
LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5c900cc124ba35a274073b5de7639b13"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0fdbfbe10fc294a6fca24dc76134222a"
DEPENDS = "zlib"
LIBV = "16"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz"
-SRC_URI[sha256sum] = "b3683e8b8111ebf6f1ac004ebb6b0c975cd310ec469d98364388e9cedbfa68be"
+SRC_URI[sha256sum] = "6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c"
-MIRRORS += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/older-releases/"
+MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/"
UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html"
@@ -22,13 +22,12 @@ BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
inherit autotools binconfig-disabled pkgconfig
# Work around missing symbols
-EXTRA_OECONF:append:class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}"
+ARMNEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}"
+ARMNEON:aarch64 = "--enable-hardware-optimizations=on"
+EXTRA_OECONF += "${ARMNEON}"
PACKAGES =+ "${PN}-tools"
FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
BBCLASSEXTEND = "native nativesdk"
-
-# CVE-2019-17371 is actually a memory leak in gif2png 2.x
-CVE_CHECK_IGNORE += "CVE-2019-17371"
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb
index ed2b6437dd..29d48fd333 100644
--- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb
+++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb
@@ -7,18 +7,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=336d6faf40fb600bafb0061f4052f1f4 \
file://src/samplerate.c;beginline=1;endline=7;md5=7a4238289dc36bfb70968ccaa5bd0d4f"
DEPENDS = "libsndfile1"
-SRC_URI = "https://github.com/libsndfile/libsamplerate/releases/download/${PV}/libsamplerate-${PV}.tar.xz \
+SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsamplerate-${PV}.tar.xz \
"
SRC_URI[sha256sum] = "3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893"
CVE_PRODUCT = "libsamplerate"
-UPSTREAM_CHECK_URI = "https://github.com/libsndfile/libsamplerate/releases"
+GITHUB_BASE_URI = "https://github.com/libsndfile/libsamplerate/releases"
S = "${WORKDIR}/libsamplerate-${PV}"
-inherit autotools pkgconfig
+inherit autotools pkgconfig github-releases
# FFTW and ALSA are only used in tests and examples, so they don't affect
# normal builds. It should be safe to ignore these, but explicitly disabling
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch
new file mode 100644
index 0000000000..fa4b2fc08b
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch
@@ -0,0 +1,739 @@
+From c7ce5b0ebeeb58934825077d1324960aa0747718 Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Tue, 10 Oct 2023 16:10:34 -0400
+Subject: [PATCH] mat4/mat5: fix int overflow in dataend calculation
+
+The clang sanitizer warns of a possible signed integer overflow when
+calculating the `dataend` value in `mat4_read_header()`.
+
+```
+src/mat4.c:323:41: runtime error: signed integer overflow: 205 * -100663296 cannot be represented in type 'int'
+SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:41 in
+src/mat4.c:323:48: runtime error: signed integer overflow: 838860800 * 4 cannot be represented in type 'int'
+SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:48 in
+```
+
+Cast the offending `rows` and `cols` ints to `sf_count_t` (the type of
+`dataend` before performing the calculation, to avoid the issue.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/789
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Upstream-Status: Backport [9a829113c88a51e57c1e46473e90609e4b7df151]
+
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+---
+ src/mat4.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mat4.c b/src/mat4.c
+index 0b1b414b..575683ba 100644
+--- a/src/mat4.c
++++ b/src/mat4.c
+@@ -320,7 +320,7 @@ mat4_read_header (SF_PRIVATE *psf)
+ psf->filelength - psf->dataoffset, psf->sf.channels * psf->sf.frames * psf->bytewidth) ;
+ }
+ else if ((psf->filelength - psf->dataoffset) > psf->sf.channels * psf->sf.frames * psf->bytewidth)
+- psf->dataend = psf->dataoffset + rows * cols * psf->bytewidth ;
++ psf->dataend = psf->dataoffset + (sf_count_t) rows * (sf_count_t) cols * psf->bytewidth ;
+
+ psf->datalength = psf->filelength - psf->dataoffset - psf->dataend ;
+
+From 842303f984b2081481e74cb84a9a24ecbe3dec1a Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Wed, 11 Oct 2023 16:36:02 -0400
+Subject: [PATCH] au: avoid int overflow while calculating data_end
+
+At several points in au_read_header(), we calculate the functional end
+of the data segment by adding the (int)au_fmt.dataoffset and the
+(int)au_fmt.datasize. This can overflow the implicit int_32 return value
+and cause undefined behavior.
+
+Instead, precalculate the value and assign it to a 64-bit
+(sf_count_t)data_end variable.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+---
+ src/au.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/au.c b/src/au.c
+index 62bd691d..f68f2587 100644
+--- a/src/au.c
++++ b/src/au.c
+@@ -291,6 +291,7 @@ static int
+ au_read_header (SF_PRIVATE *psf)
+ { AU_FMT au_fmt ;
+ int marker, dword ;
++ sf_count_t data_end ;
+
+ memset (&au_fmt, 0, sizeof (au_fmt)) ;
+ psf_binheader_readf (psf, "pm", 0, &marker) ;
+@@ -317,14 +318,15 @@ au_read_header (SF_PRIVATE *psf)
+ return SFE_AU_EMBED_BAD_LEN ;
+ } ;
+
++ data_end = (sf_count_t) au_fmt.dataoffset + (sf_count_t) au_fmt.datasize ;
+ if (psf->fileoffset > 0)
+- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ;
++ { psf->filelength = data_end ;
+ psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
+ }
+- else if (au_fmt.datasize == -1 || au_fmt.dataoffset + au_fmt.datasize == psf->filelength)
++ else if (au_fmt.datasize == -1 || data_end == psf->filelength)
+ psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
+- else if (au_fmt.dataoffset + au_fmt.datasize < psf->filelength)
+- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ;
++ else if (data_end < psf->filelength)
++ { psf->filelength = data_end ;
+ psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ;
+ }
+ else
+From 0754d3380a54e3fbdde0f684b88955c80c79f58f Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Wed, 11 Oct 2023 16:46:29 -0400
+Subject: [PATCH] avr: fix int overflow in avr_read_header()
+
+Pre-cast hdr.frames to sf_count_t, to provide the calculation with
+enough numeric space to avoid an int-overflow.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+---
+ src/avr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/avr.c b/src/avr.c
+index 6c78ff69..1bc1ffc9 100644
+--- a/src/avr.c
++++ b/src/avr.c
+@@ -162,7 +162,7 @@ avr_read_header (SF_PRIVATE *psf)
+ psf->endian = SF_ENDIAN_BIG ;
+
+ psf->dataoffset = AVR_HDR_SIZE ;
+- psf->datalength = hdr.frames * (hdr.rez / 8) ;
++ psf->datalength = (sf_count_t) hdr.frames * (hdr.rez / 8) ;
+
+ if (psf->fileoffset > 0)
+ psf->filelength = AVR_HDR_SIZE + psf->datalength ;
+From 6ac31a68a614e2bba4a05b54e5558d6270c98376 Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Wed, 11 Oct 2023 16:54:21 -0400
+Subject: [PATCH] sds: fix int overflow warning in sample calculations
+
+The sds_*byte_read() functions compose their uint_32 sample buffers by
+shifting 7bit samples into a 32bit wide buffer, and adding them
+together. Because the 7bit samples are stored in 32bit ints, code
+fuzzers become concerned that the addition operation can overflow and
+cause undefined behavior.
+
+Instead, bitwise-OR the bytes together - which should accomplish the
+same arithmetic operation, without risking an int-overflow.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+
+Do the same for the 3byte and 4byte read functions.
+---
+ src/sds.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/sds.c b/src/sds.c
+index 6bc76171..2a0f164c 100644
+--- a/src/sds.c
++++ b/src/sds.c
+@@ -454,7 +454,7 @@ sds_2byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds)
+
+ ucptr = psds->read_data + 5 ;
+ for (k = 0 ; k < 120 ; k += 2)
+- { sample = arith_shift_left (ucptr [k], 25) + arith_shift_left (ucptr [k + 1], 18) ;
++ { sample = arith_shift_left (ucptr [k], 25) | arith_shift_left (ucptr [k + 1], 18) ;
+ psds->read_samples [k / 2] = (int) (sample - 0x80000000) ;
+ } ;
+
+@@ -498,7 +498,7 @@ sds_3byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds)
+
+ ucptr = psds->read_data + 5 ;
+ for (k = 0 ; k < 120 ; k += 3)
+- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) ;
++ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) ;
+ psds->read_samples [k / 3] = (int) (sample - 0x80000000) ;
+ } ;
+
+@@ -542,7 +542,7 @@ sds_4byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds)
+
+ ucptr = psds->read_data + 5 ;
+ for (k = 0 ; k < 120 ; k += 4)
+- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) + (ucptr [k + 3] << 4) ;
++ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) | (ucptr [k + 3] << 4) ;
+ psds->read_samples [k / 4] = (int) (sample - 0x80000000) ;
+ } ;
+
+From 96428e1dd4998f1cd47df24f8fe9b0da35d7b947 Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Wed, 11 Oct 2023 17:26:51 -0400
+Subject: [PATCH] aiff: fix int overflow when counting header elements
+
+aiff_read_basc_chunk() tries to count the AIFF header size by keeping
+track of the bytes returned by psf_binheader_readf(). Though improbable,
+it is technically possible for these added bytes to exceed the int-sized
+`count` accumulator.
+
+Use a 64-bit sf_count_t type for `count`, to ensure that it always has
+enough numeric space.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+---
+ src/aiff.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/aiff.c b/src/aiff.c
+index a2bda8f4..6b244302 100644
+--- a/src/aiff.c
++++ b/src/aiff.c
+@@ -1702,7 +1702,7 @@ static int
+ aiff_read_basc_chunk (SF_PRIVATE * psf, int datasize)
+ { const char * type_str ;
+ basc_CHUNK bc ;
+- int count ;
++ sf_count_t count ;
+
+ count = psf_binheader_readf (psf, "E442", &bc.version, &bc.numBeats, &bc.rootNote) ;
+ count += psf_binheader_readf (psf, "E222", &bc.scaleType, &bc.sigNumerator, &bc.sigDenominator) ;
+From b352c350d35bf978e4d3a32e5d9df1f2284445f4 Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Wed, 11 Oct 2023 17:43:02 -0400
+Subject: [PATCH] ircam: fix int overflow in ircam_read_header()
+
+When reading the IRCAM header, it is possible for the calculated
+blockwidth to exceed the bounds of a signed int32.
+
+Use a 64bit sf_count_t to store the blockwidth.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+---
+ src/common.h | 2 +-
+ src/ircam.c | 10 +++++-----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/common.h b/src/common.h
+index d92eabde..5369cb67 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -439,7 +439,7 @@ typedef struct sf_private_tag
+ sf_count_t datalength ; /* Length in bytes of the audio data. */
+ sf_count_t dataend ; /* Offset to file tailer. */
+
+- int blockwidth ; /* Size in bytes of one set of interleaved samples. */
++ sf_count_t blockwidth ; /* Size in bytes of one set of interleaved samples. */
+ int bytewidth ; /* Size in bytes of one sample (one channel). */
+
+ void *dither ;
+diff --git a/src/ircam.c b/src/ircam.c
+index 8e7cdba8..3d73ba44 100644
+--- a/src/ircam.c
++++ b/src/ircam.c
+@@ -171,35 +171,35 @@ ircam_read_header (SF_PRIVATE *psf)
+ switch (encoding)
+ { case IRCAM_PCM_16 :
+ psf->bytewidth = 2 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_16 ;
+ break ;
+
+ case IRCAM_PCM_32 :
+ psf->bytewidth = 4 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_32 ;
+ break ;
+
+ case IRCAM_FLOAT :
+ psf->bytewidth = 4 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_FLOAT ;
+ break ;
+
+ case IRCAM_ALAW :
+ psf->bytewidth = 1 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ALAW ;
+ break ;
+
+ case IRCAM_ULAW :
+ psf->bytewidth = 1 ;
+- psf->blockwidth = psf->sf.channels * psf->bytewidth ;
++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ;
+
+ psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ULAW ;
+ break ;
+From 3bcd291e57867f88f558fa6f80990e84311df78c Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Wed, 11 Oct 2023 16:12:22 -0400
+Subject: [PATCH] mat4/mat5: fix int overflow when calculating blockwidth
+
+Pre-cast the components of the blockwidth calculation to sf_count_t to
+avoid overflowing integers during calculation.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+---
+ src/mat4.c | 2 +-
+ src/mat5.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/mat4.c b/src/mat4.c
+index 575683ba..9f046f0c 100644
+--- a/src/mat4.c
++++ b/src/mat4.c
+@@ -104,7 +104,7 @@ mat4_open (SF_PRIVATE *psf)
+
+ psf->container_close = mat4_close ;
+
+- psf->blockwidth = psf->bytewidth * psf->sf.channels ;
++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ;
+
+ switch (subformat)
+ { case SF_FORMAT_PCM_16 :
+diff --git a/src/mat5.c b/src/mat5.c
+index da5a6eca..20f0ea64 100644
+--- a/src/mat5.c
++++ b/src/mat5.c
+@@ -114,7 +114,7 @@ mat5_open (SF_PRIVATE *psf)
+
+ psf->container_close = mat5_close ;
+
+- psf->blockwidth = psf->bytewidth * psf->sf.channels ;
++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ;
+
+ switch (subformat)
+ { case SF_FORMAT_PCM_U8 :
+From c177e292d47ef73b1d3c1bb391320299a0ed2ff9 Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Mon, 16 Oct 2023 12:37:47 -0400
+Subject: [PATCH] common: fix int overflow in psf_binheader_readf()
+
+The psf_binheader_readf() function attempts to count and return the
+number of bytes traversed in the header. During this accumulation, it is
+possible to overflow the int-sized byte_count variable.
+
+Avoid this overflow by checking that the accumulated bytes do not exceed
+INT_MAX and throwing an error if they do. This implies that files with
+multi-gigabyte headers threaten to produce this error, but I imagine
+those files don't really exist - and this error is better than the
+undefined behavior which would have resulted previously.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+---
+ src/common.c | 36 ++++++++++++++++++++++++------------
+ 1 file changed, 24 insertions(+), 12 deletions(-)
+
+diff --git a/src/common.c b/src/common.c
+index 1c3d951d..7f6cceca 100644
+--- a/src/common.c
++++ b/src/common.c
+@@ -18,6 +18,7 @@
+
+ #include <config.h>
+
++#include <limits.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #if HAVE_UNISTD_H
+@@ -990,6 +991,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ double *doubleptr ;
+ char c ;
+ int byte_count = 0, count = 0 ;
++ int read_bytes = 0 ;
+
+ if (! format)
+ return psf_ftell (psf) ;
+@@ -998,6 +1000,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+
+ while ((c = *format++))
+ {
++ read_bytes = 0 ;
+ if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16))
+ break ;
+
+@@ -1014,7 +1017,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ intptr = va_arg (argptr, unsigned int*) ;
+ *intptr = 0 ;
+ ucptr = (unsigned char*) intptr ;
+- byte_count += header_read (psf, ucptr, sizeof (int)) ;
++ read_bytes = header_read (psf, ucptr, sizeof (int)) ;
+ *intptr = GET_MARKER (ucptr) ;
+ break ;
+
+@@ -1022,7 +1025,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ intptr = va_arg (argptr, unsigned int*) ;
+ *intptr = 0 ;
+ ucptr = (unsigned char*) intptr ;
+- byte_count += header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ;
++ read_bytes = header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ;
+ { int k ;
+ intdata = 0 ;
+ for (k = 0 ; k < 16 ; k++)
+@@ -1034,14 +1037,14 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ case '1' :
+ charptr = va_arg (argptr, char*) ;
+ *charptr = 0 ;
+- byte_count += header_read (psf, charptr, sizeof (char)) ;
++ read_bytes = header_read (psf, charptr, sizeof (char)) ;
+ break ;
+
+ case '2' : /* 2 byte value with the current endian-ness */
+ shortptr = va_arg (argptr, unsigned short*) ;
+ *shortptr = 0 ;
+ ucptr = (unsigned char*) shortptr ;
+- byte_count += header_read (psf, ucptr, sizeof (short)) ;
++ read_bytes = header_read (psf, ucptr, sizeof (short)) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *shortptr = GET_BE_SHORT (ucptr) ;
+ else
+@@ -1051,7 +1054,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ case '3' : /* 3 byte value with the current endian-ness */
+ intptr = va_arg (argptr, unsigned int*) ;
+ *intptr = 0 ;
+- byte_count += header_read (psf, sixteen_bytes, 3) ;
++ read_bytes = header_read (psf, sixteen_bytes, 3) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *intptr = GET_BE_3BYTE (sixteen_bytes) ;
+ else
+@@ -1062,7 +1065,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ intptr = va_arg (argptr, unsigned int*) ;
+ *intptr = 0 ;
+ ucptr = (unsigned char*) intptr ;
+- byte_count += header_read (psf, ucptr, sizeof (int)) ;
++ read_bytes = header_read (psf, ucptr, sizeof (int)) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *intptr = psf_get_be32 (ucptr, 0) ;
+ else
+@@ -1072,7 +1075,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ case '8' : /* 8 byte value with the current endian-ness */
+ countptr = va_arg (argptr, sf_count_t *) ;
+ *countptr = 0 ;
+- byte_count += header_read (psf, sixteen_bytes, 8) ;
++ read_bytes = header_read (psf, sixteen_bytes, 8) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ countdata = psf_get_be64 (sixteen_bytes, 0) ;
+ else
+@@ -1083,7 +1086,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ case 'f' : /* Float conversion */
+ floatptr = va_arg (argptr, float *) ;
+ *floatptr = 0.0 ;
+- byte_count += header_read (psf, floatptr, sizeof (float)) ;
++ read_bytes = header_read (psf, floatptr, sizeof (float)) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *floatptr = float32_be_read ((unsigned char*) floatptr) ;
+ else
+@@ -1093,7 +1096,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ case 'd' : /* double conversion */
+ doubleptr = va_arg (argptr, double *) ;
+ *doubleptr = 0.0 ;
+- byte_count += header_read (psf, doubleptr, sizeof (double)) ;
++ read_bytes = header_read (psf, doubleptr, sizeof (double)) ;
+ if (psf->rwf_endian == SF_ENDIAN_BIG)
+ *doubleptr = double64_be_read ((unsigned char*) doubleptr) ;
+ else
+@@ -1117,7 +1120,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ charptr = va_arg (argptr, char*) ;
+ count = va_arg (argptr, size_t) ;
+ memset (charptr, 0, count) ;
+- byte_count += header_read (psf, charptr, count) ;
++ read_bytes = header_read (psf, charptr, count) ;
+ break ;
+
+ case 'G' :
+@@ -1128,7 +1131,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ if (psf->header.indx + count >= psf->header.len && psf_bump_header_allocation (psf, count))
+ break ;
+
+- byte_count += header_gets (psf, charptr, count) ;
++ read_bytes = header_gets (psf, charptr, count) ;
+ break ;
+
+ case 'z' :
+@@ -1152,7 +1155,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ case 'j' : /* Seek to position from current position. */
+ count = va_arg (argptr, size_t) ;
+ header_seek (psf, count, SEEK_CUR) ;
+- byte_count += count ;
++ read_bytes = count ;
+ break ;
+
+ case '!' : /* Clear buffer, forcing re-read. */
+@@ -1164,8 +1167,17 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
+ psf->error = SFE_INTERNAL ;
+ break ;
+ } ;
++
++ if (read_bytes > 0 && byte_count > (INT_MAX - read_bytes))
++ { psf_log_printf (psf, "Header size exceeds INT_MAX. Aborting.", c) ;
++ psf->error = SFE_INTERNAL ;
++ break ;
++ } else
++ { byte_count += read_bytes ;
+ } ;
+
++ } ; /*end while*/
++
+ va_end (argptr) ;
+
+ return byte_count ;
+From a23d563386e7c8d93dcdbe7d5b1d63cad6009116 Mon Sep 17 00:00:00 2001
+From: Alex Stewart <alex.stewart@ni.com>
+Date: Thu, 19 Oct 2023 14:07:19 -0400
+Subject: [PATCH] nms_adpcm: fix int overflow in signal estimate
+
+It is possible (though functionally incorrect) for the signal estimate
+calculation in nms_adpcm_update() to overflow the int value of s_e,
+resulting in undefined behavior.
+
+Since adpcm state signal values are never practically larger than
+16 bits, use smaller numeric sizes throughout the file to avoid the
+overflow.
+
+CVE: CVE-2022-33065
+Fixes: https://github.com/libsndfile/libsndfile/issues/833
+
+Authored-by: Arthur Taylor <art@ified.ca>
+Signed-off-by: Alex Stewart <alex.stewart@ni.com>
+Rebased-by: Alex Stewart <alex.stewart@ni.com>
+---
+ src/nms_adpcm.c | 85 ++++++++++++++++++++++++-------------------------
+ 1 file changed, 42 insertions(+), 43 deletions(-)
+
+diff --git a/src/nms_adpcm.c b/src/nms_adpcm.c
+index 96d6ad26..460ea077 100644
+--- a/src/nms_adpcm.c
++++ b/src/nms_adpcm.c
+@@ -48,36 +48,36 @@
+ /* Variable names from ITU G.726 spec */
+ struct nms_adpcm_state
+ { /* Log of the step size multiplier. Operated on by codewords. */
+- int yl ;
++ short yl ;
+
+ /* Quantizer step size multiplier. Generated from yl. */
+- int y ;
++ short y ;
+
+- /* Coefficents of the pole predictor */
+- int a [2] ;
++ /* Coefficients of the pole predictor */
++ short a [2] ;
+
+- /* Coefficents of the zero predictor */
+- int b [6] ;
++ /* Coefficients of the zero predictor */
++ short b [6] ;
+
+ /* Previous quantized deltas (multiplied by 2^14) */
+- int d_q [7] ;
++ short d_q [7] ;
+
+ /* d_q [x] + s_ez [x], used by the pole-predictor for signs only. */
+- int p [3] ;
++ short p [3] ;
+
+ /* Previous reconstructed signal values. */
+- int s_r [2] ;
++ short s_r [2] ;
+
+ /* Zero predictor components of the signal estimate. */
+- int s_ez ;
++ short s_ez ;
+
+ /* Signal estimate, (including s_ez). */
+- int s_e ;
++ short s_e ;
+
+ /* The most recent codeword (enc:generated, dec:inputted) */
+- int Ik ;
++ char Ik ;
+
+- int parity ;
++ char parity ;
+
+ /*
+ ** Offset into code tables for the bitrate.
+@@ -109,7 +109,7 @@ typedef struct
+ } NMS_ADPCM_PRIVATE ;
+
+ /* Pre-computed exponential interval used in the antilog approximation. */
+-static unsigned int table_expn [] =
++static unsigned short table_expn [] =
+ { 0x4000, 0x4167, 0x42d5, 0x444c, 0x45cb, 0x4752, 0x48e2, 0x4a7a,
+ 0x4c1b, 0x4dc7, 0x4f7a, 0x5138, 0x52ff, 0x54d1, 0x56ac, 0x5892,
+ 0x5a82, 0x5c7e, 0x5e84, 0x6096, 0x62b4, 0x64dd, 0x6712, 0x6954,
+@@ -117,21 +117,21 @@ static unsigned int table_expn [] =
+ } ;
+
+ /* Table mapping codewords to scale factor deltas. */
+-static int table_scale_factor_step [] =
++static short table_scale_factor_step [] =
+ { 0x0, 0x0, 0x0, 0x0, 0x4b0, 0x0, 0x0, 0x0, /* 2-bit */
+ -0x3c, 0x0, 0x90, 0x0, 0x2ee, 0x0, 0x898, 0x0, /* 3-bit */
+ -0x30, 0x12, 0x6b, 0xc8, 0x188, 0x2e0, 0x551, 0x1150, /* 4-bit */
+ } ;
+
+ /* Table mapping codewords to quantized delta interval steps. */
+-static unsigned int table_step [] =
++static unsigned short table_step [] =
+ { 0x73F, 0, 0, 0, 0x1829, 0, 0, 0, /* 2-bit */
+ 0x3EB, 0, 0xC18, 0, 0x1581, 0, 0x226E, 0, /* 3-bit */
+ 0x20C, 0x635, 0xA83, 0xF12, 0x1418, 0x19E3, 0x211A, 0x2BBA, /* 4-bit */
+ } ;
+
+ /* Binary search lookup table for quantizing using table_step. */
+-static int table_step_search [] =
++static short table_step_search [] =
+ { 0, 0x1F6D, 0, -0x1F6D, 0, 0, 0, 0, /* 2-bit */
+ 0x1008, 0x1192, 0, -0x219A, 0x1656, -0x1656, 0, 0, /* 3-bit */
+ 0x872, 0x1277, -0x8E6, -0x232B, 0xD06, -0x17D7, -0x11D3, 0, /* 4-bit */
+@@ -179,23 +179,23 @@ static sf_count_t nms_adpcm_seek (SF_PRIVATE *psf, int mode, sf_count_t offset)
+ ** Maps [1,20480] to [1,1024] in an exponential relationship. This is
+ ** approximately ret = b^exp where b = e^(ln(1024)/ln(20480)) ~= 1.0003385
+ */
+-static inline int
+-nms_adpcm_antilog (int exp)
+-{ int ret ;
++static inline short
++nms_adpcm_antilog (short exp)
++{ int_fast32_t r ;
+
+- ret = 0x1000 ;
+- ret += (((exp & 0x3f) * 0x166b) >> 12) ;
+- ret *= table_expn [(exp & 0x7c0) >> 6] ;
+- ret >>= (26 - (exp >> 11)) ;
++ r = 0x1000 ;
++ r += (((int_fast32_t) (exp & 0x3f) * 0x166b) >> 12) ;
++ r *= table_expn [(exp & 0x7c0) >> 6] ;
++ r >>= (26 - (exp >> 11)) ;
+
+- return ret ;
++ return (short) r ;
+ } /* nms_adpcm_antilog */
+
+ static void
+ nms_adpcm_update (struct nms_adpcm_state *s)
+ { /* Variable names from ITU G.726 spec */
+- int a1ul ;
+- int fa1 ;
++ short a1ul, fa1 ;
++ int_fast32_t se ;
+ int i ;
+
+ /* Decay and Modify the scale factor in the log domain based on the codeword. */
+@@ -222,7 +222,7 @@ nms_adpcm_update (struct nms_adpcm_state *s)
+ else if (fa1 > 256)
+ fa1 = 256 ;
+
+- s->a [0] = (0xff * s->a [0]) >> 8 ;
++ s->a [0] = (s->a [0] * 0xff) >> 8 ;
+ if (s->p [0] != 0 && s->p [1] != 0 && ((s->p [0] ^ s->p [1]) < 0))
+ s->a [0] -= 192 ;
+ else
+@@ -230,7 +230,7 @@ nms_adpcm_update (struct nms_adpcm_state *s)
+ fa1 = -fa1 ;
+ }
+
+- s->a [1] = fa1 + ((0xfe * s->a [1]) >> 8) ;
++ s->a [1] = fa1 + ((s->a [1] * 0xfe) >> 8) ;
+ if (s->p [0] != 0 && s->p [2] != 0 && ((s->p [0] ^ s->p [2]) < 0))
+ s->a [1] -= 128 ;
+ else
+@@ -250,19 +250,18 @@ nms_adpcm_update (struct nms_adpcm_state *s)
+ s->a [0] = a1ul ;
+ } ;
+
+- /* Compute the zero predictor estimate. Rotate past deltas too. */
+- s->s_ez = 0 ;
++ /* Compute the zero predictor estimate and rotate past deltas. */
++ se = 0 ;
+ for (i = 5 ; i >= 0 ; i--)
+- { s->s_ez += s->d_q [i] * s->b [i] ;
++ { se += (int_fast32_t) s->d_q [i] * s->b [i] ;
+ s->d_q [i + 1] = s->d_q [i] ;
+ } ;
++ s->s_ez = se >> 14 ;
+
+- /* Compute the signal estimate. */
+- s->s_e = s->a [0] * s->s_r [0] + s->a [1] * s->s_r [1] + s->s_ez ;
+-
+- /* Return to scale */
+- s->s_ez >>= 14 ;
+- s->s_e >>= 14 ;
++ /* Complete the signal estimate. */
++ se += (int_fast32_t) s->a [0] * s->s_r [0] ;
++ se += (int_fast32_t) s->a [1] * s->s_r [1] ;
++ s->s_e = se >> 14 ;
+
+ /* Rotate members to prepare for next iteration. */
+ s->s_r [1] = s->s_r [0] ;
+@@ -274,7 +273,7 @@ nms_adpcm_update (struct nms_adpcm_state *s)
+ static int16_t
+ nms_adpcm_reconstruct_sample (struct nms_adpcm_state *s, uint8_t I)
+ { /* Variable names from ITU G.726 spec */
+- int dqx ;
++ int_fast32_t dqx ;
+
+ /*
+ ** The ordering of the 12-bit right-shift is a precision loss. It agrees
+@@ -308,17 +307,17 @@ nms_adpcm_codec_init (struct nms_adpcm_state *s, enum nms_enc_type type)
+ /*
+ ** nms_adpcm_encode_sample()
+ **
+-** Encode a linear 16-bit pcm sample into a 2,3, or 4 bit NMS-ADPCM codeword
++** Encode a linear 16-bit pcm sample into a 2, 3, or 4 bit NMS-ADPCM codeword
+ ** using and updating the predictor state.
+ */
+ static uint8_t
+ nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl)
+ { /* Variable names from ITU G.726 spec */
+- int d ;
++ int_fast32_t d ;
+ uint8_t I ;
+
+ /* Down scale the sample from 16 => ~14 bits. */
+- sl = (sl * 0x1fdf) / 0x7fff ;
++ sl = ((int_fast32_t) sl * 0x1fdf) / 0x7fff ;
+
+ /* Compute estimate, and delta from actual value */
+ nms_adpcm_update (s) ;
+@@ -407,7 +406,7 @@ nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl)
+ */
+ static int16_t
+ nms_adpcm_decode_sample (struct nms_adpcm_state *s, uint8_t I)
+-{ int sl ;
++{ int_fast32_t sl ;
+
+ nms_adpcm_update (s) ;
+ sl = nms_adpcm_reconstruct_sample (s, I) ;
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb
index 70626b3c16..a9ee7c3575 100644
--- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb
@@ -3,17 +3,17 @@ DESCRIPTION = "Library for reading and writing files containing sampled \
sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \
one standard library interface."
HOMEPAGE = "https://libsndfile.github.io/libsndfile/"
-AUTHOR = "Erik de Castro Lopo"
DEPENDS = "flac libogg libvorbis"
SECTION = "libs/multimedia"
LICENSE = "LGPL-2.1-only"
-SRC_URI = "https://github.com/libsndfile/libsndfile/releases/download/${PV}/libsndfile-${PV}.tar.xz \
+SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \
file://noopus.patch \
+ file://cve-2022-33065.patch \
"
-UPSTREAM_CHECK_URI = "https://github.com/libsndfile/libsndfile/releases/"
+GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/"
-SRC_URI[sha256sum] = "0f98e101c0f7c850a71225fb5feaf33b106227b3d331333ddc9bacee190bcf41"
+SRC_URI[sha256sum] = "3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e"
LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
@@ -25,7 +25,7 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
-inherit autotools lib_package pkgconfig multilib_header
+inherit autotools lib_package pkgconfig multilib_header github-releases
do_install:append() {
oe_multilib_header sndfile.h
diff --git a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
index 178e1a9240..11674af379 100644
--- a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
+++ b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
@@ -7,7 +7,6 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132"
DEPENDS = "libogg"
-PR = "r1"
SRC_URI = "http://downloads.xiph.org/releases/theora/libtheora-${PV}.tar.bz2 \
file://no-docs.patch"
diff --git a/meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch b/meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch
deleted file mode 100644
index c7c5f616ed..0000000000
--- a/meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-CVE: CVE-2022-2056 CVE-2022-2057 CVE-2022-2058
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 22a205da86ca2d038d0066e1d70752d117258fb4 Mon Sep 17 00:00:00 2001
-From: 4ugustus <wangdw.augustus@qq.com>
-Date: Sat, 11 Jun 2022 09:31:43 +0000
-Subject: [PATCH] fix the FPE in tiffcrop (#415, #427, and #428)
-
----
- libtiff/tif_aux.c | 9 +++++++
- libtiff/tiffiop.h | 1 +
- tools/tiffcrop.c | 62 ++++++++++++++++++++++++++---------------------
- 3 files changed, 44 insertions(+), 28 deletions(-)
-
-diff --git a/libtiff/tif_aux.c b/libtiff/tif_aux.c
-index 140f26c7..5b88c8d0 100644
---- a/libtiff/tif_aux.c
-+++ b/libtiff/tif_aux.c
-@@ -402,6 +402,15 @@ float _TIFFClampDoubleToFloat( double val )
- return (float)val;
- }
-
-+uint32_t _TIFFClampDoubleToUInt32(double val)
-+{
-+ if( val < 0 )
-+ return 0;
-+ if( val > 0xFFFFFFFFU || val != val )
-+ return 0xFFFFFFFFU;
-+ return (uint32_t)val;
-+}
-+
- int _TIFFSeekOK(TIFF* tif, toff_t off)
- {
- /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */
-diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h
-index e3af461d..4e8bdac2 100644
---- a/libtiff/tiffiop.h
-+++ b/libtiff/tiffiop.h
-@@ -365,6 +365,7 @@ extern double _TIFFUInt64ToDouble(uint64_t);
- extern float _TIFFUInt64ToFloat(uint64_t);
-
- extern float _TIFFClampDoubleToFloat(double);
-+extern uint32_t _TIFFClampDoubleToUInt32(double);
-
- extern tmsize_t
- _TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32_t strip,
-diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
-index 1f827b2b..90286a5e 100644
---- a/tools/tiffcrop.c
-+++ b/tools/tiffcrop.c
-@@ -5268,17 +5268,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
- {
- if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER))
- {
-- x1 = (uint32_t) (crop->corners[i].X1 * scale * xres);
-- x2 = (uint32_t) (crop->corners[i].X2 * scale * xres);
-- y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres);
-- y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres);
-+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres);
-+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres);
-+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres);
-+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres);
- }
- else
- {
-- x1 = (uint32_t) (crop->corners[i].X1);
-- x2 = (uint32_t) (crop->corners[i].X2);
-- y1 = (uint32_t) (crop->corners[i].Y1);
-- y2 = (uint32_t) (crop->corners[i].Y2);
-+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1);
-+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2);
-+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1);
-+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2);
- }
- /* a) Region needs to be within image sizes 0.. width-1; 0..length-1
- * b) Corners are expected to be submitted as top-left to bottom-right.
-@@ -5357,17 +5357,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
- {
- if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER)
- { /* User has specified pixels as reference unit */
-- tmargin = (uint32_t)(crop->margins[0]);
-- lmargin = (uint32_t)(crop->margins[1]);
-- bmargin = (uint32_t)(crop->margins[2]);
-- rmargin = (uint32_t)(crop->margins[3]);
-+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]);
-+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]);
-+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]);
-+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]);
- }
- else
- { /* inches or centimeters specified */
-- tmargin = (uint32_t)(crop->margins[0] * scale * yres);
-- lmargin = (uint32_t)(crop->margins[1] * scale * xres);
-- bmargin = (uint32_t)(crop->margins[2] * scale * yres);
-- rmargin = (uint32_t)(crop->margins[3] * scale * xres);
-+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres);
-+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres);
-+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres);
-+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres);
- }
-
- if ((lmargin + rmargin) > image->width)
-@@ -5397,24 +5397,24 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image,
- if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER)
- {
- if (crop->crop_mode & CROP_WIDTH)
-- width = (uint32_t)crop->width;
-+ width = _TIFFClampDoubleToUInt32(crop->width);
- else
- width = image->width - lmargin - rmargin;
-
- if (crop->crop_mode & CROP_LENGTH)
-- length = (uint32_t)crop->length;
-+ length = _TIFFClampDoubleToUInt32(crop->length);
- else
- length = image->length - tmargin - bmargin;
- }
- else
- {
- if (crop->crop_mode & CROP_WIDTH)
-- width = (uint32_t)(crop->width * scale * image->xres);
-+ width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres);
- else
- width = image->width - lmargin - rmargin;
-
- if (crop->crop_mode & CROP_LENGTH)
-- length = (uint32_t)(crop->length * scale * image->yres);
-+ length = _TIFFClampDoubleToUInt32(crop->length * scale * image->yres);
- else
- length = image->length - tmargin - bmargin;
- }
-@@ -5868,13 +5868,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
- {
- if (page->res_unit == RESUNIT_INCH || page->res_unit == RESUNIT_CENTIMETER)
- { /* inches or centimeters specified */
-- hmargin = (uint32_t)(page->hmargin * scale * page->hres * ((image->bps + 7) / 8));
-- vmargin = (uint32_t)(page->vmargin * scale * page->vres * ((image->bps + 7) / 8));
-+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * page->hres * ((image->bps + 7) / 8));
-+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * page->vres * ((image->bps + 7) / 8));
- }
- else
- { /* Otherwise user has specified pixels as reference unit */
-- hmargin = (uint32_t)(page->hmargin * scale * ((image->bps + 7) / 8));
-- vmargin = (uint32_t)(page->vmargin * scale * ((image->bps + 7) / 8));
-+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * ((image->bps + 7) / 8));
-+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * ((image->bps + 7) / 8));
- }
-
- if ((hmargin * 2.0) > (pwidth * page->hres))
-@@ -5912,13 +5912,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
- {
- if (page->mode & PAGE_MODE_PAPERSIZE )
- {
-- owidth = (uint32_t)((pwidth * page->hres) - (hmargin * 2));
-- olength = (uint32_t)((plength * page->vres) - (vmargin * 2));
-+ owidth = _TIFFClampDoubleToUInt32((pwidth * page->hres) - (hmargin * 2));
-+ olength = _TIFFClampDoubleToUInt32((plength * page->vres) - (vmargin * 2));
- }
- else
- {
-- owidth = (uint32_t)(iwidth - (hmargin * 2 * page->hres));
-- olength = (uint32_t)(ilength - (vmargin * 2 * page->vres));
-+ owidth = _TIFFClampDoubleToUInt32(iwidth - (hmargin * 2 * page->hres));
-+ olength = _TIFFClampDoubleToUInt32(ilength - (vmargin * 2 * page->vres));
- }
- }
-
-@@ -5927,6 +5927,12 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
- if (olength > ilength)
- olength = ilength;
-
-+ if (owidth == 0 || olength == 0)
-+ {
-+ TIFFError("computeOutputPixelOffsets", "Integer overflow when calculating the number of pages");
-+ exit(EXIT_FAILURE);
-+ }
-+
- /* Compute the number of pages required for Portrait or Landscape */
- switch (page->orient)
- {
---
-2.34.1
-
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch b/meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch
deleted file mode 100644
index 98020ff92f..0000000000
--- a/meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-CVE: CVE-2022-2053
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 8fe3735942ea1d90d8cef843b55b3efe8ab6feaf Mon Sep 17 00:00:00 2001
-From: Su_Laus <sulau@freenet.de>
-Date: Mon, 15 Aug 2022 22:11:03 +0200
-Subject: [PATCH] =?UTF-8?q?According=20to=20Richard=20Nolde=20https://gitl?=
- =?UTF-8?q?ab.com/libtiff/libtiff/-/issues/401#note=5F877637400=20the=20ti?=
- =?UTF-8?q?ffcrop=20option=20=E2=80=9E-S=E2=80=9C=20is=20also=20mutually?=
- =?UTF-8?q?=20exclusive=20to=20the=20other=20crop=20options=20(-X|-Y),=20-?=
- =?UTF-8?q?Z=20and=20-z.?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This is now checked and ends tiffcrop if those arguments are not mutually exclusive.
-
-This MR will fix the following tiffcrop issues: #349, #414, #422, #423, #424
----
- tools/tiffcrop.c | 31 ++++++++++++++++---------------
- 1 file changed, 16 insertions(+), 15 deletions(-)
-
-diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
-index 90286a5e..c3b758ec 100644
---- a/tools/tiffcrop.c
-+++ b/tools/tiffcrop.c
-@@ -173,12 +173,12 @@ static char tiffcrop_rev_date[] = "02-09-2022";
- #define ROTATECW_270 32
- #define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270)
-
--#define CROP_NONE 0
--#define CROP_MARGINS 1
--#define CROP_WIDTH 2
--#define CROP_LENGTH 4
--#define CROP_ZONES 8
--#define CROP_REGIONS 16
-+#define CROP_NONE 0 /* "-S" -> Page_MODE_ROWSCOLS and page->rows/->cols != 0 */
-+#define CROP_MARGINS 1 /* "-m" */
-+#define CROP_WIDTH 2 /* "-X" */
-+#define CROP_LENGTH 4 /* "-Y" */
-+#define CROP_ZONES 8 /* "-Z" */
-+#define CROP_REGIONS 16 /* "-z" */
- #define CROP_ROTATE 32
- #define CROP_MIRROR 64
- #define CROP_INVERT 128
-@@ -316,7 +316,7 @@ struct crop_mask {
- #define PAGE_MODE_RESOLUTION 1
- #define PAGE_MODE_PAPERSIZE 2
- #define PAGE_MODE_MARGINS 4
--#define PAGE_MODE_ROWSCOLS 8
-+#define PAGE_MODE_ROWSCOLS 8 /* for -S option */
-
- #define INVERT_DATA_ONLY 10
- #define INVERT_DATA_AND_TAG 11
-@@ -781,7 +781,7 @@ static const char usage_info[] =
- " The four debug/dump options are independent, though it makes little sense to\n"
- " specify a dump file without specifying a detail level.\n"
- "\n"
--"Note: The (-X|-Y), -Z and -z options are mutually exclusive.\n"
-+"Note: The (-X|-Y), -Z, -z and -S options are mutually exclusive.\n"
- " In no case should the options be applied to a given selection successively.\n"
- "\n"
- ;
-@@ -2131,13 +2131,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32
- /*NOTREACHED*/
- }
- }
-- /*-- Check for not allowed combinations (e.g. -X, -Y and -Z and -z are mutually exclusive) --*/
-- char XY, Z, R;
-+ /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/
-+ char XY, Z, R, S;
- XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH));
- Z = (crop_data->crop_mode & CROP_ZONES);
- R = (crop_data->crop_mode & CROP_REGIONS);
-- if ((XY && Z) || (XY && R) || (Z && R)) {
-- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z and -z are mutually exclusive.->Exit");
-+ S = (page->mode & PAGE_MODE_ROWSCOLS);
-+ if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) {
-+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit");
- exit(EXIT_FAILURE);
- }
- } /* end process_command_opts */
---
-2.34.1
-
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch b/meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch
deleted file mode 100644
index 54c3345746..0000000000
--- a/meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Mon, 27 Jun 2022 16:09:43 +0200
-Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a
- codec-specific tag and the codec is not configured (fixes #433)
-
-This avoids crashes when querying such tags
-
-CVE: CVE-2022-34526
-Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libtiff/tif_dirinfo.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
-index c30f569b..3371cb5c 100644
---- a/libtiff/tif_dirinfo.c
-+++ b/libtiff/tif_dirinfo.c
-@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
- default:
- return 1;
- }
-+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) {
-+ return 0;
-+ }
- /* Check if codec specific tags are allowed for the current
- * compression scheme (codec) */
- switch (tif->tif_dir.td_compression) {
---
-GitLab
-
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch
new file mode 100644
index 0000000000..f5520fcafd
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch
@@ -0,0 +1,238 @@
+From 335947359ce2dd3862cd9f7c49f92eba065dfed4 Mon Sep 17 00:00:00 2001
+From: Su_Laus <sulau@freenet.de>
+Date: Thu, 1 Feb 2024 13:06:08 +0000
+Subject: [PATCH] manpage: Update TIFF documentation about TIFFOpenOptions.rst
+ and TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes.
+
+CVE: CVE-2023-52355
+Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/335947359ce2dd3862cd9f7c49f92eba065dfed4]
+
+Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
+---
+ doc/functions/TIFFDeferStrileArrayWriting.rst | 5 +++
+ doc/functions/TIFFError.rst | 3 ++
+ doc/functions/TIFFOpen.rst | 13 +++---
+ doc/functions/TIFFOpenOptions.rst | 44 ++++++++++++++++++-
+ doc/functions/TIFFStrileQuery.rst | 5 +++
+ doc/libtiff.rst | 31 ++++++++++++-
+ 6 files changed, 91 insertions(+), 10 deletions(-)
+
+diff --git a/doc/functions/TIFFDeferStrileArrayWriting.rst b/doc/functions/TIFFDeferStrileArrayWriting.rst
+index 60ee746..705aebc 100644
+--- a/doc/functions/TIFFDeferStrileArrayWriting.rst
++++ b/doc/functions/TIFFDeferStrileArrayWriting.rst
+@@ -61,6 +61,11 @@ Diagnostics
+ All error messages are directed to the :c:func:`TIFFErrorExtR` routine.
+ Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine.
+
++Note
++----
++
++This functionality was introduced with libtiff 4.1.
++
+ See also
+ --------
+
+diff --git a/doc/functions/TIFFError.rst b/doc/functions/TIFFError.rst
+index 99924ad..cf4b37c 100644
+--- a/doc/functions/TIFFError.rst
++++ b/doc/functions/TIFFError.rst
+@@ -65,6 +65,9 @@ or :c:func:`TIFFClientOpenExt`.
+ Furthermore, a **custom defined data structure** *user_data* for the
+ error handler can be given along.
+
++Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the
++application-specific handler introduced with libtiff 4.5.
++
+ Note
+ ----
+
+diff --git a/doc/functions/TIFFOpen.rst b/doc/functions/TIFFOpen.rst
+index db79d7b..adc474f 100644
+--- a/doc/functions/TIFFOpen.rst
++++ b/doc/functions/TIFFOpen.rst
+@@ -94,8 +94,9 @@ TIFF structure without closing the file handle and afterwards the
+ file should be closed using its file descriptor *fd*.
+
+ :c:func:`TIFFOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFOpen`,
+-but options, such as re-entrant error and warning handlers may be passed
+-with the *opts* argument. The *opts* argument may be NULL.
++but options, such as re-entrant error and warning handlers and a limit in byte
++that libtiff internal memory allocation functions are allowed to request per call
++may be passed with the *opts* argument. The *opts* argument may be NULL.
+ Refer to :doc:`TIFFOpenOptions` for allocating and filling the *opts* argument
+ parameters. The allocated memory for :c:type:`TIFFOpenOptions`
+ can be released straight after successful execution of the related
+@@ -105,9 +106,7 @@ can be released straight after successful execution of the related
+ but opens a TIFF file with a Unicode filename.
+
+ :c:func:`TIFFFdOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFFdOpen`,
+-but options, such as re-entrant error and warning handlers may be passed
+-with the *opts* argument. The *opts* argument may be NULL.
+-Refer to :doc:`TIFFOpenOptions` for filling the *opts* argument.
++but options argument *opts* like for :c:func:`TIFFOpenExt` can be passed.
+
+ :c:func:`TIFFSetFileName` sets the file name in the tif-structure
+ and returns the old file name.
+@@ -326,5 +325,5 @@ See also
+
+ :doc:`libtiff` (3tiff),
+ :doc:`TIFFClose` (3tiff),
+-:doc:`TIFFStrileQuery`,
+-:doc:`TIFFOpenOptions`
+\ No newline at end of file
++:doc:`TIFFStrileQuery` (3tiff),
++:doc:`TIFFOpenOptions`
+diff --git a/doc/functions/TIFFOpenOptions.rst b/doc/functions/TIFFOpenOptions.rst
+index 5c67566..23f2975 100644
+--- a/doc/functions/TIFFOpenOptions.rst
++++ b/doc/functions/TIFFOpenOptions.rst
+@@ -38,12 +38,17 @@ opaque structure and returns a :c:type:`TIFFOpenOptions` pointer.
+ :c:func:`TIFFOpenOptionsFree` releases the allocated memory for
+ :c:type:`TIFFOpenOptions`. The allocated memory for :c:type:`TIFFOpenOptions`
+ can be released straight after successful execution of the related
+-TIFF open"Ext" functions like :c:func:`TIFFOpenExt`.
++TIFFOpen"Ext" functions like :c:func:`TIFFOpenExt`.
+
+ :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` sets parameter for the
+ maximum single memory limit in byte that ``libtiff`` internal memory allocation
+ functions are allowed to request per call.
+
++.. note::
++ However, the ``libtiff`` external functions :c:func:`_TIFFmalloc`
++ and :c:func:`_TIFFrealloc` **do not apply** this internal memory
++ allocation limit set by :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`!
++
+ :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` sets the function pointer to
+ an application-specific and per-TIFF handle (re-entrant) error handler.
+ Furthermore, a pointer to a **custom defined data structure** *errorhandler_user_data*
+@@ -55,6 +60,43 @@ The *errorhandler_user_data* argument may be NULL.
+ :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` but for the warning handler,
+ which is invoked through :c:func:`TIFFWarningExtR`
+
++Example
++-------
++
++::
++
++ #include "tiffio.h"
++
++ typedef struct MyErrorHandlerUserDataStruct
++ {
++ /* ... any user data structure ... */
++ } MyErrorHandlerUserDataStruct;
++
++ static int myErrorHandler(TIFF *tiff, void *user_data, const char *module,
++ const char *fmt, va_list ap)
++ {
++ MyErrorHandlerUserDataStruct *errorhandler_user_data =
++ (MyErrorHandlerUserDataStruct *)user_data;
++ /*... code of myErrorHandler ...*/
++ return 1;
++ }
++
++
++ main()
++ {
++ tmsize_t limit = (256 * 1024 * 1024);
++ MyErrorHandlerUserDataStruct user_data = { /* ... any data ... */};
++
++ TIFFOpenOptions *opts = TIFFOpenOptionsAlloc();
++ TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit);
++ TIFFOpenOptionsSetErrorHandlerExtR(opts, myErrorHandler, &user_data);
++ TIFF *tif = TIFFOpenExt("foo.tif", "r", opts);
++ TIFFOpenOptionsFree(opts);
++ /* ... go on here ... */
++
++ TIFFClose(tif);
++ }
++
+ Note
+ ----
+
+diff --git a/doc/functions/TIFFStrileQuery.rst b/doc/functions/TIFFStrileQuery.rst
+index f8631af..7931fe4 100644
+--- a/doc/functions/TIFFStrileQuery.rst
++++ b/doc/functions/TIFFStrileQuery.rst
+@@ -66,6 +66,11 @@ Diagnostics
+ All error messages are directed to the :c:func:`TIFFErrorExtR` routine.
+ Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine.
+
++Note
++----
++
++This functionality was introduced with libtiff 4.1.
++
+ See also
+ --------
+
+diff --git a/doc/libtiff.rst b/doc/libtiff.rst
+index 6a0054c..d96a860 100644
+--- a/doc/libtiff.rst
++++ b/doc/libtiff.rst
+@@ -90,11 +90,15 @@ compatibility on machines with a segmented architecture.
+ :c:func:`realloc`, and :c:func:`free` routines in the C library.)
+
+ To deal with segmented pointer issues ``libtiff`` also provides
+-:c:func:`_TIFFmemcpy`, :c:func:`_TIFFmemset`, and :c:func:`_TIFFmemmove`
++:c:func:`_TIFFmemcpy`, :c:func:`_TIFFmemset`, and :c:func:`_TIFFmemcmp`
+ routines that mimic the equivalent ANSI C routines, but that are
+ intended for use with memory allocated through :c:func:`_TIFFmalloc`
+ and :c:func:`_TIFFrealloc`.
+
++With ``libtiff`` 4.5 a method was introduced to limit the internal
++memory allocation that functions are allowed to request per call
++(see :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` and :c:func:`TIFFOpenExt`).
++
+ Error Handling
+ --------------
+
+@@ -106,6 +110,10 @@ routine that can be specified with a call to :c:func:`TIFFSetErrorHandler`.
+ Likewise warning messages are directed to a single handler routine
+ that can be specified with a call to :c:func:`TIFFSetWarningHandler`
+
++Further application-specific and per-TIFF handle (re-entrant) error handler
++and warning handler can be set. Please refer to :doc:`/functions/TIFFError`
++and :doc:`/functions/TIFFOpenOptions`.
++
+ Basic File Handling
+ -------------------
+
+@@ -139,7 +147,7 @@ a ``"w"`` argument:
+ main()
+ {
+ TIFF* tif = TIFFOpen("foo.tif", "w");
+- ... do stuff ...
++ /* ... do stuff ... */
+ TIFFClose(tif);
+ }
+
+@@ -157,6 +165,25 @@ to always call :c:func:`TIFFClose` or :c:func:`TIFFFlush` to flush any
+ buffered information to a file. Note that if you call :c:func:`TIFFClose`
+ you do not need to call :c:func:`TIFFFlush`.
+
++.. warning::
++
++ In order to prevent out-of-memory issues when opening a TIFF file
++ :c:func:`TIFFOpenExt` can be used and then the maximum single memory
++ limit in byte that ``libtiff`` internal memory allocation functions
++ are allowed to request per call can be set with
++ :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`.
++
++Example
++
++::
++
++ tmsize_t limit = (256 * 1024 * 1024);
++ TIFFOpenOptions *opts = TIFFOpenOptionsAlloc();
++ TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit);
++ TIFF *tif = TIFFOpenExt("foo.tif", "w", opts);
++ TIFFOpenOptionsFree(opts);
++ /* ... go on here ... */
++
+ TIFF Directories
+ ----------------
+
+--
+2.40.0
+
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch
new file mode 100644
index 0000000000..19a1ef727a
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch
@@ -0,0 +1,28 @@
+From 16ab4a205cfc938c32686e8d697d048fabf97ed4 Mon Sep 17 00:00:00 2001
+From: Timothy Lyanguzov <theta682@gmail.com>
+Date: Thu, 1 Feb 2024 11:19:06 +0000
+Subject: [PATCH] Fix typo.
+
+CVE: CVE-2023-52355
+Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/16ab4a205cfc938c32686e8d697d048fabf97ed4]
+
+Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
+---
+ doc/libtiff.rst | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/libtiff.rst b/doc/libtiff.rst
+index d96a860..4fedc3e 100644
+--- a/doc/libtiff.rst
++++ b/doc/libtiff.rst
+@@ -169,7 +169,7 @@ you do not need to call :c:func:`TIFFFlush`.
+
+ In order to prevent out-of-memory issues when opening a TIFF file
+ :c:func:`TIFFOpenExt` can be used and then the maximum single memory
+- limit in byte that ``libtiff`` internal memory allocation functions
++ limit in bytes that ``libtiff`` internal memory allocation functions
+ are allowed to request per call can be set with
+ :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`.
+
+--
+2.40.0
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52356.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52356.patch
new file mode 100644
index 0000000000..75f5d8946a
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52356.patch
@@ -0,0 +1,49 @@
+From 51558511bdbbcffdce534db21dbaf5d54b31638a Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Thu, 1 Feb 2024 11:38:14 +0000
+Subject: [PATCH] TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of
+ col/row (fixes #622)
+
+CVE: CVE-2023-52356
+Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/51558511bdbbcffdce534db21dbaf5d54b31638a]
+
+Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
+---
+ libtiff/tif_getimage.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c
+index 41f7dfd..9cd6eee 100644
+--- a/libtiff/tif_getimage.c
++++ b/libtiff/tif_getimage.c
+@@ -3224,6 +3224,13 @@ int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster,
+ if (TIFFRGBAImageOK(tif, emsg) &&
+ TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg))
+ {
++ if (row >= img.height)
++ {
++ TIFFErrorExtR(tif, TIFFFileName(tif),
++ "Invalid row passed to TIFFReadRGBAStrip().");
++ TIFFRGBAImageEnd(&img);
++ return (0);
++ }
+
+ img.row_offset = row;
+ img.col_offset = 0;
+@@ -3301,6 +3308,14 @@ int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster,
+ return (0);
+ }
+
++ if (col >= img.width || row >= img.height)
++ {
++ TIFFErrorExtR(tif, TIFFFileName(tif),
++ "Invalid row/col passed to TIFFReadRGBATile().");
++ TIFFRGBAImageEnd(&img);
++ return (0);
++ }
++
+ /*
+ * The TIFFRGBAImageGet() function doesn't allow us to get off the
+ * edge of the image, even to fill an otherwise valid tile. So we
+--
+2.40.0
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6228.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6228.patch
new file mode 100644
index 0000000000..2020508fdf
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6228.patch
@@ -0,0 +1,31 @@
+From 1e7d217a323eac701b134afc4ae39b6bdfdbc96a Mon Sep 17 00:00:00 2001
+From: Su_Laus <sulau@freenet.de>
+Date: Wed, 17 Jan 2024 06:57:08 +0000
+Subject: [PATCH] codec of input image is available, independently from codec
+ check of output image and return with error if not.
+
+Fixes #606.
+
+CVE: CVE-2023-6228
+Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/1e7d217a323eac701b134afc4ae39b6bdfdbc96a]
+
+Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
+---
+ tools/tiffcp.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tools/tiffcp.c b/tools/tiffcp.c
+index aff0626..a4f7f6b 100644
+--- a/tools/tiffcp.c
++++ b/tools/tiffcp.c
+@@ -846,6 +846,8 @@ static int tiffcp(TIFF *in, TIFF *out)
+ if (!TIFFIsCODECConfigured(compression))
+ return FALSE;
+ TIFFGetFieldDefaulted(in, TIFFTAG_COMPRESSION, &input_compression);
++ if (!TIFFIsCODECConfigured(input_compression))
++ return FALSE;
+ TIFFGetFieldDefaulted(in, TIFFTAG_PHOTOMETRIC, &input_photometric);
+ if (input_compression == COMPRESSION_JPEG)
+ {
+--
+2.40.0
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch
new file mode 100644
index 0000000000..5d15dff1d9
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch
@@ -0,0 +1,27 @@
+From e1640519208121f916da1772a5efb6ca28971b86 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Tue, 31 Oct 2023 15:04:37 +0000
+Subject: [PATCH 3/3] Apply 1 suggestion(s) to 1 file(s)
+
+CVE: CVE-2023-6277
+Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libtiff/tif_dirread.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
+index fe8d6f8..58a4276 100644
+--- a/libtiff/tif_dirread.c
++++ b/libtiff/tif_dirread.c
+@@ -5306,7 +5306,6 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir,
+ {
+ uint64_t space;
+ uint16_t n;
+- filesize = TIFFGetFileSize(tif);
+ if (!(tif->tif_flags & TIFF_BIGTIFF))
+ space = sizeof(TIFFHeaderClassic) + 2 + dircount * 12 + 4;
+ else
+--
+2.43.0
+
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch
new file mode 100644
index 0000000000..9fc8182fef
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch
@@ -0,0 +1,36 @@
+From f500facf7723f1cae725dd288b2daad15e45131c Mon Sep 17 00:00:00 2001
+From: Su_Laus <sulau@freenet.de>
+Date: Mon, 30 Oct 2023 21:21:57 +0100
+Subject: [PATCH 2/3] At image reading, compare data size of some tags / data
+ structures (StripByteCounts, StripOffsets, StripArray, TIFF directory) with
+ file size to prevent provoked out-of-memory attacks.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+See issue #614.
+
+Correct declaration of ‘filesize’ shadows a previous local.
+
+CVE: CVE-2023-6277
+Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libtiff/tif_dirread.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
+index c52d41f..fe8d6f8 100644
+--- a/libtiff/tif_dirread.c
++++ b/libtiff/tif_dirread.c
+@@ -5305,7 +5305,6 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir,
+ if (td->td_compression != COMPRESSION_NONE)
+ {
+ uint64_t space;
+- uint64_t filesize;
+ uint16_t n;
+ filesize = TIFFGetFileSize(tif);
+ if (!(tif->tif_flags & TIFF_BIGTIFF))
+--
+2.43.0
+
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch
new file mode 100644
index 0000000000..d5854a9059
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch
@@ -0,0 +1,162 @@
+From b33baa5d9c6aac8ce49b5180dd48e39697ab7a11 Mon Sep 17 00:00:00 2001
+From: Su_Laus <sulau@freenet.de>
+Date: Fri, 27 Oct 2023 22:11:10 +0200
+Subject: [PATCH 1/3] At image reading, compare data size of some tags / data
+ structures (StripByteCounts, StripOffsets, StripArray, TIFF directory) with
+ file size to prevent provoked out-of-memory attacks.
+
+See issue #614.
+
+CVE: CVE-2023-6277
+Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libtiff/tif_dirread.c | 90 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 90 insertions(+)
+
+diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
+index 2c49dc6..c52d41f 100644
+--- a/libtiff/tif_dirread.c
++++ b/libtiff/tif_dirread.c
+@@ -1308,6 +1308,21 @@ TIFFReadDirEntryArrayWithLimit(TIFF *tif, TIFFDirEntry *direntry,
+ datasize = (*count) * typesize;
+ assert((tmsize_t)datasize > 0);
+
++ /* Before allocating a huge amount of memory for corrupted files, check if
++ * size of requested memory is not greater than file size.
++ */
++ uint64_t filesize = TIFFGetFileSize(tif);
++ if (datasize > filesize)
++ {
++ TIFFWarningExtR(tif, "ReadDirEntryArray",
++ "Requested memory size for tag %d (0x%x) %" PRIu32
++ " is greather than filesize %" PRIu64
++ ". Memory not allocated, tag not read",
++ direntry->tdir_tag, direntry->tdir_tag, datasize,
++ filesize);
++ return (TIFFReadDirEntryErrAlloc);
++ }
++
+ if (isMapped(tif) && datasize > (uint64_t)tif->tif_size)
+ return TIFFReadDirEntryErrIo;
+
+@@ -5266,6 +5281,20 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir,
+ if (!_TIFFFillStrilesInternal(tif, 0))
+ return -1;
+
++ /* Before allocating a huge amount of memory for corrupted files, check if
++ * size of requested memory is not greater than file size. */
++ uint64_t filesize = TIFFGetFileSize(tif);
++ uint64_t allocsize = (uint64_t)td->td_nstrips * sizeof(uint64_t);
++ if (allocsize > filesize)
++ {
++ TIFFWarningExtR(tif, module,
++ "Requested memory size for StripByteCounts of %" PRIu64
++ " is greather than filesize %" PRIu64
++ ". Memory not allocated",
++ allocsize, filesize);
++ return -1;
++ }
++
+ if (td->td_stripbytecount_p)
+ _TIFFfreeExt(tif, td->td_stripbytecount_p);
+ td->td_stripbytecount_p = (uint64_t *)_TIFFCheckMalloc(
+@@ -5807,6 +5836,20 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff,
+ dircount16 = (uint16_t)dircount64;
+ dirsize = 20;
+ }
++ /* Before allocating a huge amount of memory for corrupted files, check
++ * if size of requested memory is not greater than file size. */
++ uint64_t filesize = TIFFGetFileSize(tif);
++ uint64_t allocsize = (uint64_t)dircount16 * dirsize;
++ if (allocsize > filesize)
++ {
++ TIFFWarningExtR(
++ tif, module,
++ "Requested memory size for TIFF directory of %" PRIu64
++ " is greather than filesize %" PRIu64
++ ". Memory not allocated, TIFF directory not read",
++ allocsize, filesize);
++ return 0;
++ }
+ origdir = _TIFFCheckMalloc(tif, dircount16, dirsize,
+ "to read TIFF directory");
+ if (origdir == NULL)
+@@ -5921,6 +5964,20 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff,
+ "directories not supported");
+ return 0;
+ }
++ /* Before allocating a huge amount of memory for corrupted files, check
++ * if size of requested memory is not greater than file size. */
++ uint64_t filesize = TIFFGetFileSize(tif);
++ uint64_t allocsize = (uint64_t)dircount16 * dirsize;
++ if (allocsize > filesize)
++ {
++ TIFFWarningExtR(
++ tif, module,
++ "Requested memory size for TIFF directory of %" PRIu64
++ " is greather than filesize %" PRIu64
++ ". Memory not allocated, TIFF directory not read",
++ allocsize, filesize);
++ return 0;
++ }
+ origdir = _TIFFCheckMalloc(tif, dircount16, dirsize,
+ "to read TIFF directory");
+ if (origdir == NULL)
+@@ -5968,6 +6025,8 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff,
+ }
+ }
+ }
++ /* No check against filesize needed here because "dir" should have same size
++ * than "origdir" checked above. */
+ dir = (TIFFDirEntry *)_TIFFCheckMalloc(
+ tif, dircount16, sizeof(TIFFDirEntry), "to read TIFF directory");
+ if (dir == 0)
+@@ -7164,6 +7223,20 @@ static int TIFFFetchStripThing(TIFF *tif, TIFFDirEntry *dir, uint32_t nstrips,
+ return (0);
+ }
+
++ /* Before allocating a huge amount of memory for corrupted files, check
++ * if size of requested memory is not greater than file size. */
++ uint64_t filesize = TIFFGetFileSize(tif);
++ uint64_t allocsize = (uint64_t)nstrips * sizeof(uint64_t);
++ if (allocsize > filesize)
++ {
++ TIFFWarningExtR(tif, module,
++ "Requested memory size for StripArray of %" PRIu64
++ " is greather than filesize %" PRIu64
++ ". Memory not allocated",
++ allocsize, filesize);
++ _TIFFfreeExt(tif, data);
++ return (0);
++ }
+ resizeddata = (uint64_t *)_TIFFCheckMalloc(
+ tif, nstrips, sizeof(uint64_t), "for strip array");
+ if (resizeddata == 0)
+@@ -7263,6 +7336,23 @@ static void allocChoppedUpStripArrays(TIFF *tif, uint32_t nstrips,
+ }
+ bytecount = last_offset + last_bytecount - offset;
+
++ /* Before allocating a huge amount of memory for corrupted files, check if
++ * size of StripByteCount and StripOffset tags is not greater than
++ * file size.
++ */
++ uint64_t allocsize = (uint64_t)nstrips * sizeof(uint64_t) * 2;
++ uint64_t filesize = TIFFGetFileSize(tif);
++ if (allocsize > filesize)
++ {
++ TIFFWarningExtR(tif, "allocChoppedUpStripArrays",
++ "Requested memory size for StripByteCount and "
++ "StripOffsets %" PRIu64
++ " is greather than filesize %" PRIu64
++ ". Memory not allocated",
++ allocsize, filesize);
++ return;
++ }
++
+ newcounts =
+ (uint64_t *)_TIFFCheckMalloc(tif, nstrips, sizeof(uint64_t),
+ "for chopped \"StripByteCounts\" array");
+--
+2.43.0
+
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb
index caf6f60479..d42ea6a6e5 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb
@@ -4,30 +4,27 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \
provide means to easily access and create TIFF image files."
HOMEPAGE = "http://www.libtiff.org/"
LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3"
CVE_PRODUCT = "libtiff"
SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
- file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \
- file://CVE-2022-34526.patch \
- file://CVE-2022-2953.patch \
+ file://CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch \
+ file://CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch \
+ file://CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch \
+ file://CVE-2023-6228.patch \
+ file://CVE-2023-52355-0001.patch \
+ file://CVE-2023-52355-0002.patch \
+ file://CVE-2023-52356.patch \
"
-SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed"
+SRC_URI[sha256sum] = "88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a"
# exclude betas
UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
-# Tested with check from https://security-tracker.debian.org/tracker/CVE-2015-7313
-# and 4.3.0 doesn't have the issue
-CVE_CHECK_IGNORE += "CVE-2015-7313"
-# These issues only affect libtiff post-4.3.0 but before 4.4.0,
-# caused by 3079627e and fixed by b4e79bfa.
-CVE_CHECK_IGNORE += "CVE-2022-1622 CVE-2022-1623"
-
-# Issue is in jbig which we don't enable
-CVE_CHECK_IGNORE += "CVE-2022-1210"
+CVE_STATUS[CVE-2015-7313] = "fixed-version: Tested with check from https://security-tracker.debian.org/tracker/CVE-2015-7313 and already 4.3.0 doesn't have the issue"
+CVE_STATUS[CVE-2023-3164] = "cpe-incorrect: Issue only affects the tiffcrop tool not compiled by default since 4.6.0"
inherit autotools multilib_header
@@ -41,6 +38,9 @@ PACKAGECONFIG[jbig] = "--enable-jbig,--disable-jbig,jbig,"
PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
+PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp,"
+PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd,"
+PACKAGECONFIG[libdeflate] = "--enable-libdeflate,--disable-libdeflate,libdeflate,"
# Convert single-strip uncompressed images to multiple strips of specified
# size (default: 8192) to reduce memory usage
diff --git a/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch b/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch
deleted file mode 100644
index b2544cb44d..0000000000
--- a/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From 0cafb99b57f43cf6ac2c6208718e49ad2dbe462d Mon Sep 17 00:00:00 2001
-From: Jan Schmidt <thaytan@noraisin.net>
-Date: Sun, 10 Nov 2013 00:49:52 +1100
-Subject: [PATCH] Import revision 1206 from upstream to fix PIE build.
-
-Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm
-in libmpeg2/motion_comp_arm_s.S have addresses in .text, which is bad
-for shared libraries. Some environments demand that .text actually be
-read-only all the time, yet MC_put_o_16_arm etc require that the addresses
-be modified by the dynamic linking mechanism (dlopen, LoadLibrary, etc.)
-Even in those environments which permit the dynamic linker to modify the
-.text segment, the runtime cost of doing the relocation can be noticeable.
-
-This commit rewrites the linkage, discarding the tables of addresses
-in favor of tables of offsets. All transfers are local within each individual
-function, so there can be no interference by processing that occurs
-after assembly, such as link-time re-ordering (even of individual functions.)
-
-Patch by John Reiser <jreiser@bitwagon.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [https://code.videolan.org/videolan/libmpeg2/commit/946bf4b518aacc224f845e73708f99e394744499]
----
- libmpeg2/motion_comp_arm_s.S | 70 +++++++++++++++++-------------------
- 1 file changed, 33 insertions(+), 37 deletions(-)
-
-diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S
-index c921f7c..82143f8 100644
---- a/libmpeg2/motion_comp_arm_s.S
-+++ b/libmpeg2/motion_comp_arm_s.S
-@@ -30,9 +30,13 @@ MC_put_o_16_arm:
- pld [r1]
- stmfd sp!, {r4-r11, lr} @ R14 is also called LR
- and r4, r1, #3
-- adr r5, MC_put_o_16_arm_align_jt
-- add r5, r5, r4, lsl #2
-- ldr pc, [r5]
-+ ldrb r4, [pc, r4]
-+ add pc, pc, r4, lsl #2
-+ .byte (MC_put_o_16_arm_align0 - 0f)>>2
-+ .byte (MC_put_o_16_arm_align1 - 0f)>>2
-+ .byte (MC_put_o_16_arm_align2 - 0f)>>2
-+ .byte (MC_put_o_16_arm_align3 - 0f)>>2
-+0:
-
- MC_put_o_16_arm_align0:
- ldmia r1, {r4-r7}
-@@ -76,11 +80,6 @@ MC_put_o_16_arm_align3:
- 1: PROC(24)
- bne 1b
- ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
--MC_put_o_16_arm_align_jt:
-- .word MC_put_o_16_arm_align0
-- .word MC_put_o_16_arm_align1
-- .word MC_put_o_16_arm_align2
-- .word MC_put_o_16_arm_align3
-
- @ ----------------------------------------------------------------
- .align
-@@ -91,9 +90,14 @@ MC_put_o_8_arm:
- pld [r1]
- stmfd sp!, {r4-r10, lr} @ R14 is also called LR
- and r4, r1, #3
-- adr r5, MC_put_o_8_arm_align_jt
-- add r5, r5, r4, lsl #2
-- ldr pc, [r5]
-+ ldrb r4, [pc, r4]
-+ add pc, pc, r4, lsl #2
-+ .byte (MC_put_o_8_arm_align0 - 0f)>>2
-+ .byte (MC_put_o_8_arm_align1 - 0f)>>2
-+ .byte (MC_put_o_8_arm_align2 - 0f)>>2
-+ .byte (MC_put_o_8_arm_align3 - 0f)>>2
-+0:
-+
- MC_put_o_8_arm_align0:
- ldmia r1, {r4-r5}
- add r1, r1, r2
-@@ -135,12 +139,6 @@ MC_put_o_8_arm_align3:
- bne 1b
- ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
-
--MC_put_o_8_arm_align_jt:
-- .word MC_put_o_8_arm_align0
-- .word MC_put_o_8_arm_align1
-- .word MC_put_o_8_arm_align2
-- .word MC_put_o_8_arm_align3
--
- @ ----------------------------------------------------------------
- .macro AVG_PW rW1, rW2
- mov \rW2, \rW2, lsl #24
-@@ -160,12 +158,17 @@ MC_put_x_16_arm:
- @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
- stmfd sp!, {r4-r11,lr} @ R14 is also called LR
-+ ldr r11, 0f
- and r4, r1, #3
-- adr r5, MC_put_x_16_arm_align_jt
-- ldr r11, [r5]
- mvn r12, r11
-- add r5, r5, r4, lsl #2
-- ldr pc, [r5, #4]
-+ ldrb r4, [pc, r4]
-+ add pc, pc, r4, lsl #2
-+ .byte (MC_put_x_16_arm_align0 - 0f)>>2
-+ .byte (MC_put_x_16_arm_align1 - 0f)>>2
-+ .byte (MC_put_x_16_arm_align2 - 0f)>>2
-+ .byte (MC_put_x_16_arm_align3 - 0f)>>2
-+0:
-+ .word 0x01010101
-
- .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4
- mov \R0, \R0, lsr #(\shift)
-@@ -238,12 +241,6 @@ MC_put_x_16_arm_align3:
- add r0, r0, r2
- bne 1b
- ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
--MC_put_x_16_arm_align_jt:
-- .word 0x01010101
-- .word MC_put_x_16_arm_align0
-- .word MC_put_x_16_arm_align1
-- .word MC_put_x_16_arm_align2
-- .word MC_put_x_16_arm_align3
-
- @ ----------------------------------------------------------------
- .align
-@@ -253,12 +250,17 @@ MC_put_x_8_arm:
- @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
- stmfd sp!, {r4-r11,lr} @ R14 is also called LR
-+ ldr r11, 0f
- and r4, r1, #3
-- adr r5, MC_put_x_8_arm_align_jt
-- ldr r11, [r5]
- mvn r12, r11
-- add r5, r5, r4, lsl #2
-- ldr pc, [r5, #4]
-+ ldrb r4, [pc, r4]
-+ add pc, pc, r4, lsl #2
-+ .byte (MC_put_x_8_arm_align0 - 0f)>>2
-+ .byte (MC_put_x_8_arm_align1 - 0f)>>2
-+ .byte (MC_put_x_8_arm_align2 - 0f)>>2
-+ .byte (MC_put_x_8_arm_align3 - 0f)>>2
-+0:
-+ .word 0x01010101
-
- .macro ADJ_ALIGN_DW shift, R0, R1, R2
- mov \R0, \R0, lsr #(\shift)
-@@ -319,9 +321,3 @@ MC_put_x_8_arm_align3:
- add r0, r0, r2
- bne 1b
- ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
--MC_put_x_8_arm_align_jt:
-- .word 0x01010101
-- .word MC_put_x_8_arm_align0
-- .word MC_put_x_8_arm_align1
-- .word MC_put_x_8_arm_align2
-- .word MC_put_x_8_arm_align3
diff --git a/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch b/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch
deleted file mode 100644
index 5bf68b39ee..0000000000
--- a/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From cbcff58ed670c8edc0be1004384cbe0fd07d8d26 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Jul 2017 18:49:21 -0700
-Subject: [PATCH 1/2] check for available arm optimizations
-
-Taken From
-http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/65_arm-test-with-compiler.patch/
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index acdcb1e..2c0a721 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -59,7 +59,7 @@ elif test x"$GCC" = x"yes"; then
- AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
-
- dnl arch-specific flags
-- arm_conditional=false
-+ build_arm_opt=false
- case "$host" in
- i?86-* | k?-* | x86_64-* | amd64-*)
- AC_DEFINE([ARCH_X86],,[x86 architecture])
-@@ -102,8 +102,12 @@ elif test x"$GCC" = x"yes"; then
- alpha*)
- AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);;
- arm*)
-- arm_conditional=:
-- AC_DEFINE([ARCH_ARM],,[ARM architecture]);;
-+ AC_LANG(C)
-+ AC_COMPILE_IFELSE(
-+ [AC_LANG_SOURCE([[
-+ void foo(void) { __asm__ volatile("pld [r1]"); }]])],
-+ build_arm_opt=true; AC_DEFINE([ARCH_ARM],,[ARM architecture]),
-+ build_arm_opt=false);;
- esac
- elif test x"$CC" = x"tendracc"; then
- dnl TenDRA portability checking compiler
-@@ -123,7 +127,7 @@ else
- esac
- fi
-
--AM_CONDITIONAL(ARCH_ARM, ${arm_conditional})
-+AM_CONDITIONAL(ARCH_ARM, test x$build_arm_opt = xtrue)
-
- dnl Checks for libtool - this must be done after we set cflags
- AC_LIBTOOL_WIN32_DLL
---
-2.13.2
-
diff --git a/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch b/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch
deleted file mode 100644
index 8301692368..0000000000
--- a/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From f9d9dc92d75f8910e3cd5fdcbea72e505cdf3493 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Jul 2017 19:03:36 -0700
-Subject: [PATCH 2/2] Set visibility of global symbols used in ARM specific
- assembly file to internal
-
-Taken from
-http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/60_arm-private-symbols.patch/
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libmpeg2/motion_comp_arm_s.S | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S
-index f6c3d7d..c921f7c 100644
---- a/libmpeg2/motion_comp_arm_s.S
-+++ b/libmpeg2/motion_comp_arm_s.S
-@@ -23,7 +23,8 @@
-
- @ ----------------------------------------------------------------
- .align
-- .global MC_put_o_16_arm
-+ .global MC_put_o_16_arm
-+ .internal MC_put_o_16_arm
- MC_put_o_16_arm:
- @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
-@@ -83,7 +84,8 @@ MC_put_o_16_arm_align_jt:
-
- @ ----------------------------------------------------------------
- .align
-- .global MC_put_o_8_arm
-+ .global MC_put_o_8_arm
-+ .internal MC_put_o_8_arm
- MC_put_o_8_arm:
- @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
-@@ -152,7 +154,8 @@ MC_put_o_8_arm_align_jt:
- .endm
-
- .align
-- .global MC_put_x_16_arm
-+ .global MC_put_x_16_arm
-+ .internal MC_put_x_16_arm
- MC_put_x_16_arm:
- @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
-@@ -244,7 +247,8 @@ MC_put_x_16_arm_align_jt:
-
- @ ----------------------------------------------------------------
- .align
-- .global MC_put_x_8_arm
-+ .global MC_put_x_8_arm
-+ .internal MC_put_x_8_arm
- MC_put_x_8_arm:
- @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
---
-2.13.2
-
diff --git a/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch b/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch
deleted file mode 100644
index 00b667d336..0000000000
--- a/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Rewrite the public symbol check to verify the shared libraries, to check for
-more things, and to avoid duplication; fixes make check on ARM
-
-Taken From
-https://sources.debian.org/src/mpeg2dec/0.5.1-8/debian/patches/61_global-symbol-test.patch/
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- test/globals | 42 +++++++++++++++++++++++++++---------------
- 1 file changed, 27 insertions(+), 15 deletions(-)
-
---- mpeg2dec.orig/test/globals
-+++ mpeg2dec/test/globals
-@@ -1,4 +1,8 @@
- #!/bin/sh
-+# TODO
-+# - fix checking of .a libs; problem is that "nm -g --defined-only" lists
-+# internal symbols; this can be solved by using objdump, but it's probably
-+# good enough to just run the tests on the shared lib
-
- if test x"$srcdir" != x""; then
- builddir="." # running from make check, but it does not define that
-@@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd`
-
- error=0
-
--bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\
-- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'`
--
--if test x"$bad_globals" != x""; then
-- echo BAD GLOBAL SYMBOLS:
-- for s in $bad_globals; do echo $s; done
-+# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...]
-+#
-+# checks public symbols in shared libs:
-+# - allow prefix_anything
-+# - reject _prefixanything
-+# - allow _anything
-+# - reject anything else
-+#
-+# NB: skips missing files
-+check_bad_public_symbols() {
-+ symbols_prefix="$1"
-+ shift
-+ lib_files=`ls "$@" 2>/dev/null`
-+ [ -z "$lib_files" ] && return
-+ bad_globals=`nm -g --defined-only $lib_files |
-+ awk '{if ($3) print $3}' |
-+ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"`
-+ [ -z "$bad_globals" ] && return
- error=1
--fi
--
--bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\
-- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'`
-+ echo BAD GLOBAL SYMBOLS in $lib_files:
-+ echo "$bad_globals"
-+}
-
--if test x"$bad_globals" != x""; then
-- echo BAD GLOBAL SYMBOLS:
-- for s in $bad_globals; do echo $s; done
-- error=1
--fi
-+check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so
-+check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so
-
- exit $error
diff --git a/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch b/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch
deleted file mode 100644
index 5113ad44fe..0000000000
--- a/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Add new method to judge whether <altivec.h> is needed
-
-The original logic will use "typedef vector int t;" to judge
-whether <altivec.h> is needed. altivec.h contains the following
-statement:
-
- #if !defined(__APPLE_ALTIVEC__)
- #define vector __vector
- #define pixel __pixel
- #define bool
- #endif
-
-In gcc-4.3.3, __APPLE_ALTIVEC__ is not defined by compiler, neither
-as vector, pixel, and bool. In order to make "typedef vector int t;"
-pass the compilation, we need to include altivec.h.
-
-However in gcc-4.5.0, __APPLE_ALTIVEC__ is defined by compiler,
-so as vector, pixel, and bool. We could not judge whether
-altivec.h is needed by "typedef vector int t;".
-Here we include another statement "int tmp = __CR6_EQ;", in
-which __CR6_EQ is defined in altivec.h.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
-diff -ruN a/configure.in b/configure.in
---- a/configure.ac 2010-09-14 20:55:42.399687663 +0800
-+++ b/configure.ac 2010-09-14 20:56:43.403204648 +0800
-@@ -79,11 +79,11 @@
- CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
- AC_MSG_CHECKING([if <altivec.h> is needed])
- AC_TRY_COMPILE([],
-- [typedef vector int t;
-+ [typedef vector int t; int tmp = __CR6_EQ;
- vec_ld(0, (unsigned char *)0);],
- [have_altivec=yes; AC_MSG_RESULT(no)],
- [AC_TRY_COMPILE([#include <altivec.h>],
-- [typedef vector int t; vec_ld(0, (unsigned char *)0);],
-+ [typedef vector int t; int tmp = __CR6_EQ; vec_ld(0, (unsigned char *)0);],
- [AC_DEFINE([HAVE_ALTIVEC_H],,
- [Define to 1 if you have the <altivec.h> header.])
- have_altivec=yes; AC_MSG_RESULT(yes)],
diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb
deleted file mode 100644
index fd8b561657..0000000000
--- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams"
-DESCRIPTION = "mpeg2dec is a test program for libmpeg2. It decodes \
-mpeg-1 and mpeg-2 video streams, and also includes a demultiplexer \
-for mpeg-1 and mpeg-2 program streams. The main purpose of mpeg2dec \
-is to have a simple test bed for libmpeg2."
-HOMEPAGE = "https://libmpeg2.sourceforge.io/"
-SECTION = "libs"
-LICENSE = "GPL-2.0-or-later"
-LICENSE_FLAGS = "commercial"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://include/mpeg2.h;beginline=1;endline=22;md5=7766f4fcb58f0f8413c49a746f2ab89b"
-
-SRC_URI = "http://libmpeg2.sourceforge.net/files/libmpeg2-${PV}.tar.gz \
- file://altivec_h_needed.patch \
- file://0001-check-for-available-arm-optimizations.patch \
- file://0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch \
- file://61_global-symbol-test.patch \
- file://0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch \
- "
-
-S = "${WORKDIR}/libmpeg2-${PV}"
-
-SRC_URI[md5sum] = "0f92c7454e58379b4a5a378485bbd8ef"
-SRC_URI[sha256sum] = "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4"
-
-UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--enable-shared --disable-sdl"
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv"
-
-PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev"
-
-FILES:${PN} = "${bindir}/*"
-FILES:libmpeg2 = "${libdir}/libmpeg2.so.*"
-FILES:libmpeg2convert = "${libdir}/libmpeg2convert.so.*"
-FILES:libmpeg2-dev = "${libdir}/libmpeg2.so \
- ${libdir}/libmpeg2.la \
- ${libdir}/libmpeg2arch.la \
- ${libdir}/pkgconfig/libmpeg2.pc \
- ${includedir}/mpeg2dec/mpeg2.h"
-FILES:libmpeg2-staticdev = "${libdir}/libmpeg2.a"
-FILES:libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \
- ${libdir}/libmpeg2convert.la \
- ${libdir}/libmpeg2convertarch.la \
- ${libdir}/pkgconfig/libmpeg2convert.pc \
- ${includedir}/mpeg2dec/mpeg2convert.h"
-FILES:libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a"
diff --git a/meta/recipes-multimedia/mpg123/mpg123_1.30.2.bb b/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb
index f40bff1ff6..f7786e8588 100644
--- a/meta/recipes-multimedia/mpg123/mpg123_1.30.2.bb
+++ b/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb
@@ -10,7 +10,7 @@ LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=e7b9c15fcfb986abb4cc5e8400a24169"
SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
-SRC_URI[sha256sum] = "c7ea863756bb79daed7cba2942ad3b267a410f26d2dfbd9aaf84451ff28a05d7"
+SRC_URI[sha256sum] = "ccdd1d0abc31d73d8b435fc658c79049d0a905b30669b6a42a03ad169dc609e6"
UPSTREAM_CHECK_REGEX = "mpg123-(?P<pver>\d+(\.\d+)+)\.tar"
@@ -35,8 +35,11 @@ PACKAGECONFIG[sdl] = ",,libsdl2"
AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}"
AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
+CACHED_CONFIGUREVARS:libc-musl = "ac_cv_sys_file_offset_bits=no"
+
EXTRA_OECONF = " \
--enable-shared \
+ --enable-largefile \
--with-audio='${AUDIOMODS}' \
${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 6055a9ebad..9fb5c81757 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -2,7 +2,6 @@ SUMMARY = "Sound server for Linux and Unix-like operating systems"
DESCRIPTION = "A general purpose sound server intended to run as a middleware \
between your applications and your hardware devices, either using ALSA or OSS."
HOMEPAGE = "http://www.pulseaudio.org"
-AUTHOR = "Lennart Poettering"
SECTION = "libs/multimedia"
# Most of PulseAudio code is under LGPL-2.1-or-later. There are a few
@@ -143,7 +142,7 @@ do_compile:append () {
do_install:append() {
install -d ${D}${sysconfdir}/default/volatiles
- install -m 0644 ${WORKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/04_pulse
+ install -m 0644 ${UNPACKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/04_pulse
}
USERADD_PACKAGES = "pulseaudio-server"
@@ -188,6 +187,7 @@ FILES:${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala"
FILES:${PN}-bin += "${sysconfdir}/default/volatiles/04_pulse"
FILES:${PN}-pa-info = "${bindir}/pa-info"
FILES:${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*"
+FILES:${PN}-server += "${datadir}/dbus-1/system.d/pulseaudio-system.conf"
#SYSTEMD_PACKAGES = "${PN}-server"
SYSTEMD_SERVICE:${PN}-server = "pulseaudio.service"
@@ -258,7 +258,7 @@ RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaud
# pulseaudio-module-console-kit is built whenever dbus is enabled by PACKAGECONFIG
# but consolekit depends on libx11 and is available only for DISTRO with x11 in DISTRO_FEATURES
-RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}"
+RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit x11', 'consolekit', '', d)}"
RDEPENDS:pulseaudio-misc += "pulseaudio-module-cli-protocol-unix"
FILES:${PN}-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_16.1.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb
index 64002cd1cc..54c79b4097 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_16.1.bb
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb
@@ -6,5 +6,5 @@ SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
file://volatiles.04_pulse \
file://0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch \
"
-SRC_URI[sha256sum] = "8eef32ce91d47979f95fd9a935e738cd7eb7463430dabc72863251751e504ae4"
+SRC_URI[sha256sum] = "053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5"
UPSTREAM_CHECK_REGEX = "pulseaudio-(?P<pver>\d+(\.(?!99)\d+)+)\.tar"
diff --git a/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb b/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb
index 1e6d09ab92..435b56bbb8 100644
--- a/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb
+++ b/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb
@@ -24,3 +24,5 @@ RCONFLICTS:${PN} = "speex (< 1.2rc2)"
RCONFLICTS:${PN}-dbg = "speex-dbg (< 1.2rc2)"
RCONFLICTS:${PN}-dev = "speex-dev (< 1.2rc2)"
RCONFLICTS:${PN}-staticdev = "speex-staticdev (< 1.2rc2)"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-multimedia/webp/libwebp_1.2.4.bb b/meta/recipes-multimedia/webp/libwebp_1.4.0.bb
index 263589846a..d922970479 100644
--- a/meta/recipes-multimedia/webp/libwebp_1.2.4.bb
+++ b/meta/recipes-multimedia/webp/libwebp_1.4.0.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
-SRC_URI[sha256sum] = "7bf5a8a28cc69bcfa8cb214f2c3095703c6b73ac5fba4d5480c205331d9494df"
+SRC_URI[sha256sum] = "61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5"
UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
@@ -53,3 +53,5 @@ PACKAGES =+ "${PN}-gif2webp"
DESCRIPTION:${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
FILES:${PN}-gif2webp = "${bindir}/gif2webp"
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb
index 2ac2b6f1a6..e7d9e75e8d 100644
--- a/meta/recipes-multimedia/x264/x264_git.bb
+++ b/meta/recipes-multimedia/x264/x264_git.bb
@@ -16,7 +16,7 @@ UPSTREAM_CHECK_COMMITS = "1"
SRCREV = "baee400fa9ced6f5481a728138fed6e867b0ff7f"
-PV = "r3039+git${SRCPV}"
+PV = "r3039+git"
S = "${WORKDIR}/git"