diff options
Diffstat (limited to 'meta/recipes-multimedia')
66 files changed, 1591 insertions, 2342 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 deleted file mode 100644 index 30aeef5817..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 2a736a0d2543f206fd2653aaae8a08a4c42eb917 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Opdenacker <michael.opdenacker@bootlin.com> | ||
3 | Date: Tue, 30 Jan 2024 14:24:25 +0100 | ||
4 | Subject: [PATCH] topology: correct version script path | ||
5 | |||
6 | From: Jan Palus <jpalus@fastmail.com> | ||
7 | |||
8 | contrary to libasound, version script for libatopology is a regular | ||
9 | source file. while it's often the case that $(builddir) and $(srcdir) | ||
10 | point to the same directory, they don't always have to. therefore path | ||
11 | needs to point explicitly to $(srcdir) for Versions script in topology | ||
12 | |||
13 | Closes: https://github.com/alsa-project/alsa-lib/pull/383 | ||
14 | Fixes: GH-382 | ||
15 | Fixes: dc7da761f3a2 ("topology: separate Versions linker script") | ||
16 | Signed-off-by: Jan Palus <jpalus@fastmail.com> | ||
17 | Signed-off-by: Jaroslav Kysela <perex@perex.cz> | ||
18 | Upstream-Status: Backport [https://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=2a736a0d2543f206fd2653aaae8a08a4c42eb917] | ||
19 | --- | ||
20 | src/topology/Makefile.am | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/src/topology/Makefile.am b/src/topology/Makefile.am | ||
24 | index 04299588..e0b78373 100644 | ||
25 | --- a/src/topology/Makefile.am | ||
26 | +++ b/src/topology/Makefile.am | ||
27 | @@ -2,7 +2,7 @@ EXTRA_DIST = Versions | ||
28 | COMPATNUM=@LIBTOOL_VERSION_INFO@ | ||
29 | |||
30 | if VERSIONED_SYMBOLS | ||
31 | -VSYMS = -Wl,--version-script=Versions | ||
32 | +VSYMS = -Wl,--version-script=$(srcdir)/Versions | ||
33 | else | ||
34 | VSYMS = | ||
35 | endif | ||
36 | -- | ||
37 | 2.34.1 | ||
38 | |||
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.14.bb index c212b17aa3..41a42f9ecc 100644 --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.14.bb | |||
@@ -9,10 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ | |||
9 | file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \ | 9 | file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \ |
10 | " | 10 | " |
11 | 11 | ||
12 | SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \ | 12 | SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2" |
13 | file://0001-topology-correct-version-script-path.patch \ | 13 | SRC_URI[sha256sum] = "be9c88a0b3604367dd74167a2b754a35e142f670292ae47a2fdef27a2ee97a32" |
14 | " | ||
15 | SRC_URI[sha256sum] = "9f3f2f69b995f9ad37359072fbc69a3a88bfba081fc83e9be30e14662795bb4d" | ||
16 | 14 | ||
17 | inherit autotools pkgconfig | 15 | inherit autotools pkgconfig |
18 | 16 | ||
diff --git a/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam_av.c-Include-missing-string.h.patch b/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam_av.c-Include-missing-string.h.patch deleted file mode 100644 index ff7745d637..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam_av.c-Include-missing-string.h.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From b01b176a665ba65979d74922955f51dc4888a713 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 23 Aug 2022 15:21:16 -0700 | ||
4 | Subject: [PATCH] arcam_av.c: Include missing string.h | ||
5 | |||
6 | bzero() function needs this header to be included | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/alsa-project/alsa-plugins/pull/47] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | arcam-av/arcam_av.c | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/arcam-av/arcam_av.c b/arcam-av/arcam_av.c | ||
15 | index 63f9b4e..29fc537 100644 | ||
16 | --- a/arcam-av/arcam_av.c | ||
17 | +++ b/arcam-av/arcam_av.c | ||
18 | @@ -27,6 +27,7 @@ | ||
19 | #include <signal.h> | ||
20 | #include <stddef.h> | ||
21 | #include <stdio.h> | ||
22 | +#include <string.h> | ||
23 | #include <termios.h> | ||
24 | #include <unistd.h> | ||
25 | |||
diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.2.7.1.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.12.bb index 9500462d5c..7db0c4d677 100644 --- a/meta/recipes-multimedia/alsa/alsa-plugins_1.2.7.1.bb +++ b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.12.bb | |||
@@ -5,6 +5,7 @@ They are used while configuring ALSA in the .asoundrc file." | |||
5 | HOMEPAGE = "http://alsa-project.org" | 5 | HOMEPAGE = "http://alsa-project.org" |
6 | BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" | 6 | BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" |
7 | SECTION = "multimedia" | 7 | SECTION = "multimedia" |
8 | CVE_PRODUCT = "alsa" | ||
8 | 9 | ||
9 | # The primary license of alsa-plugins is LGPL-2.1-only. | 10 | # The primary license of alsa-plugins is LGPL-2.1-only. |
10 | # | 11 | # |
@@ -19,13 +20,11 @@ LICENSE = "LGPL-2.1-only & GPL-2.0-or-later" | |||
19 | LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ | 20 | LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ |
20 | file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \ | 21 | file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \ |
21 | file://m4/attributes.m4;endline=33;md5=bb8c6b2a67ac15156961e242fec33e50 \ | 22 | file://m4/attributes.m4;endline=33;md5=bb8c6b2a67ac15156961e242fec33e50 \ |
22 | file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \ | 23 | file://rate/rate_samplerate.c;endline=35;md5=07fcfc9e83a7159ad14a7196ecdc7d48 \ |
23 | " | 24 | " |
24 | 25 | ||
25 | SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2 \ | 26 | SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2" |
26 | file://0001-arcam_av.c-Include-missing-string.h.patch \ | 27 | SRC_URI[sha256sum] = "7bd8a83d304e8e2d86a25895d8dcb0ef0245a8df32e271959cdbdc6af39b66f2" |
27 | " | ||
28 | SRC_URI[sha256sum] = "8c337814954bb7c167456733a6046142a2931f12eccba3ec2a4ae618a3432511" | ||
29 | 28 | ||
30 | DEPENDS += "alsa-lib" | 29 | DEPENDS += "alsa-lib" |
31 | 30 | ||
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.2.11.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.2.14.bb index 53868041c0..751d9e8a76 100644 --- a/meta/recipes-multimedia/alsa/alsa-tools_1.2.11.bb +++ b/meta/recipes-multimedia/alsa/alsa-tools_1.2.14.bb | |||
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f65 | |||
14 | 14 | ||
15 | SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2" | 15 | SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2" |
16 | 16 | ||
17 | SRC_URI[sha256sum] = "0915c9634a502fd3655ca9c574d259bc9e79983d91d45aeacff6f3c00f8ae3e9" | 17 | SRC_URI[sha256sum] = "faef6fdd39ec79c9a5473dc63aa1b6331bf7664a9d452a0a8198cec7016cbc6f" |
18 | 18 | ||
19 | inherit autotools-brokensep pkgconfig | 19 | inherit autotools-brokensep pkgconfig |
20 | # brokensep as as10k1 (and probably more) fail out of tree | 20 | # brokensep as as10k1 (and probably more) fail out of tree |
diff --git a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.14.bb index ce1a42c9b8..d9ef831937 100644 --- a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb +++ b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.14.bb | |||
@@ -8,7 +8,7 @@ LICENSE = "BSD-3-Clause" | |||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4" |
9 | 9 | ||
10 | SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2" | 10 | SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2" |
11 | SRC_URI[sha256sum] = "387c01cf30e2a1676d7b8f72b2681cf219abca70dd1ec2a9e33add5bf3feae81" | 11 | SRC_URI[sha256sum] = "32e9809f592d92b978aa1032e35293c33b8d0f1ec475f937022c3ee9a3069c21" |
12 | # Something went wrong at upstream tarballing | 12 | # Something went wrong at upstream tarballing |
13 | 13 | ||
14 | inherit allarch | 14 | inherit allarch |
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.2.14.bb index e598fac9f8..3cbb9b464b 100644 --- a/meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.2.14.bb | |||
@@ -24,9 +24,8 @@ PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev | |||
24 | PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | 24 | PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" |
25 | 25 | ||
26 | # alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe | 26 | # alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe |
27 | SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2 \ | 27 | SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2" |
28 | " | 28 | SRC_URI[sha256sum] = "0794c74d33fed943e7c50609c13089e409312b6c403d6ae8984fc429c0960741" |
29 | SRC_URI[sha256sum] = "9ac6ca3a883f151e568dcf979b8d2e5cbecc51b819bb0e6bb8a2e9b34cc428a7" | ||
30 | 29 | ||
31 | # On build machines with python-docutils (not python3-docutils !!) installed | 30 | # On build machines with python-docutils (not python3-docutils !!) installed |
32 | # rst2man (not rst2man.py) is detected and compile fails with | 31 | # rst2man (not rst2man.py) is detected and compile fails with |
@@ -51,6 +50,7 @@ ALSA_UTILS_PKGS = "\ | |||
51 | alsa-utils-speakertest \ | 50 | alsa-utils-speakertest \ |
52 | alsa-utils-aseqnet \ | 51 | alsa-utils-aseqnet \ |
53 | alsa-utils-aseqdump \ | 52 | alsa-utils-aseqdump \ |
53 | alsa-utils-aseqsend \ | ||
54 | alsa-utils-alsactl \ | 54 | alsa-utils-alsactl \ |
55 | alsa-utils-alsaloop \ | 55 | alsa-utils-alsaloop \ |
56 | alsa-utils-alsaucm \ | 56 | alsa-utils-alsaucm \ |
@@ -69,9 +69,10 @@ FILES:alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfe | |||
69 | FILES:alsa-utils-amixer = "${bindir}/amixer" | 69 | FILES:alsa-utils-amixer = "${bindir}/amixer" |
70 | FILES:alsa-utils-alsamixer = "${bindir}/alsamixer" | 70 | FILES:alsa-utils-alsamixer = "${bindir}/alsamixer" |
71 | FILES:alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" | 71 | FILES:alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" |
72 | FILES:alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" | 72 | FILES:alsa-utils-midi = "${bindir}/aplaymidi* ${bindir}/arecordmidi* ${bindir}/amidi" |
73 | FILES:alsa-utils-aconnect = "${bindir}/aconnect" | 73 | FILES:alsa-utils-aconnect = "${bindir}/aconnect" |
74 | FILES:alsa-utils-aseqnet = "${bindir}/aseqnet" | 74 | FILES:alsa-utils-aseqnet = "${bindir}/aseqnet" |
75 | FILES:alsa-utils-aseqsend = "${bindir}/aseqsend" | ||
75 | FILES:alsa-utils-iecset = "${bindir}/iecset" | 76 | FILES:alsa-utils-iecset = "${bindir}/iecset" |
76 | FILES:alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" | 77 | FILES:alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" |
77 | FILES:alsa-utils-aseqdump = "${bindir}/aseqdump" | 78 | FILES:alsa-utils-aseqdump = "${bindir}/aseqdump" |
@@ -118,7 +119,6 @@ do_install() { | |||
118 | rm -rf ${D}/unwanted | 119 | rm -rf ${D}/unwanted |
119 | } | 120 | } |
120 | 121 | ||
121 | |||
122 | PROVIDES = "alsa-utils-alsaconf alsa-utils-scripts" | 122 | PROVIDES = "alsa-utils-alsaconf alsa-utils-scripts" |
123 | 123 | ||
124 | RDEPENDS:${PN}-scripts += "bash" | 124 | RDEPENDS:${PN}-scripts += "bash" |
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/av1_ordering_info.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/av1_ordering_info.patch deleted file mode 100644 index bfc894563c..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/av1_ordering_info.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | From cafb4c554845332eeb33284cf6498049997dc67e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Thompson <sw@jkqxz.net> | ||
3 | Date: Wed, 20 Mar 2024 20:35:28 +0000 | ||
4 | Subject: [PATCH] lavc/cbs_av1: Save more frame ordering information | ||
5 | |||
6 | This is wanted by the Vulkan decoder. | ||
7 | |||
8 | Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | ||
9 | Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/ecdc94b97f809d5f2b88640842fd0541951ad295] | ||
10 | --- | ||
11 | libavcodec/cbs_av1.h | 5 +++++ | ||
12 | libavcodec/cbs_av1_syntax_template.c | 25 +++++++++++++++++++++---- | ||
13 | 2 files changed, 26 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h | ||
16 | index a5402f069d..a027013bc7 100644 | ||
17 | --- a/libavcodec/cbs_av1.h | ||
18 | +++ b/libavcodec/cbs_av1.h | ||
19 | @@ -427,6 +427,8 @@ typedef struct AV1ReferenceFrameState { | ||
20 | int bit_depth; // RefBitDepth | ||
21 | int order_hint; // RefOrderHint | ||
22 | |||
23 | + int saved_order_hints[AV1_TOTAL_REFS_PER_FRAME]; // SavedOrderHints[ref] | ||
24 | + | ||
25 | int8_t loop_filter_ref_deltas[AV1_TOTAL_REFS_PER_FRAME]; | ||
26 | int8_t loop_filter_mode_deltas[2]; | ||
27 | uint8_t feature_enabled[AV1_MAX_SEGMENTS][AV1_SEG_LVL_MAX]; | ||
28 | @@ -464,6 +466,9 @@ typedef struct CodedBitstreamAV1Context { | ||
29 | int tile_rows; | ||
30 | int tile_num; | ||
31 | |||
32 | + int order_hints[AV1_TOTAL_REFS_PER_FRAME]; // OrderHints | ||
33 | + int ref_frame_sign_bias[AV1_TOTAL_REFS_PER_FRAME]; // RefFrameSignBias | ||
34 | + | ||
35 | AV1ReferenceFrameState ref[AV1_NUM_REF_FRAMES]; | ||
36 | |||
37 | // AVOptions | ||
38 | diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c | ||
39 | index 3be1f2d30f..2979c5d98f 100644 | ||
40 | --- a/libavcodec/cbs_av1_syntax_template.c | ||
41 | +++ b/libavcodec/cbs_av1_syntax_template.c | ||
42 | @@ -1414,6 +1414,8 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw, | ||
43 | priv->ref[i].valid = 0; | ||
44 | priv->ref[i].order_hint = 0; | ||
45 | } | ||
46 | + for (i = 0; i < AV1_REFS_PER_FRAME; i++) | ||
47 | + priv->order_hints[i + AV1_REF_FRAME_LAST] = 0; | ||
48 | } | ||
49 | |||
50 | flag(disable_cdf_update); | ||
51 | @@ -1568,11 +1570,20 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw, | ||
52 | else | ||
53 | flag(use_ref_frame_mvs); | ||
54 | |||
55 | - infer(allow_intrabc, 0); | ||
56 | - } | ||
57 | + for (i = 0; i < AV1_REFS_PER_FRAME; i++) { | ||
58 | + int ref_frame = AV1_REF_FRAME_LAST + i; | ||
59 | + int hint = priv->ref[current->ref_frame_idx[i]].order_hint; | ||
60 | + priv->order_hints[ref_frame] = hint; | ||
61 | + if (!seq->enable_order_hint) { | ||
62 | + priv->ref_frame_sign_bias[ref_frame] = 0; | ||
63 | + } else { | ||
64 | + priv->ref_frame_sign_bias[ref_frame] = | ||
65 | + cbs_av1_get_relative_dist(seq, hint, | ||
66 | + current->order_hint) > 0; | ||
67 | + } | ||
68 | + } | ||
69 | |||
70 | - if (!frame_is_intra) { | ||
71 | - // Derive reference frame sign biases. | ||
72 | + infer(allow_intrabc, 0); | ||
73 | } | ||
74 | |||
75 | if (seq->reduced_still_picture_header || current->disable_cdf_update) | ||
76 | @@ -1674,6 +1685,12 @@ update_refs: | ||
77 | .bit_depth = priv->bit_depth, | ||
78 | .order_hint = priv->order_hint, | ||
79 | }; | ||
80 | + | ||
81 | + for (int j = 0; j < AV1_REFS_PER_FRAME; j++) { | ||
82 | + priv->ref[i].saved_order_hints[j + AV1_REF_FRAME_LAST] = | ||
83 | + priv->order_hints[j + AV1_REF_FRAME_LAST]; | ||
84 | + } | ||
85 | + | ||
86 | memcpy(priv->ref[i].loop_filter_ref_deltas, current->loop_filter_ref_deltas, | ||
87 | sizeof(current->loop_filter_ref_deltas)); | ||
88 | memcpy(priv->ref[i].loop_filter_mode_deltas, current->loop_filter_mode_deltas, | ||
89 | -- | ||
90 | 2.25.1 | ||
91 | |||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_av1_stable_API.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_av1_stable_API.patch deleted file mode 100644 index 74db148b3b..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/vulkan_av1_stable_API.patch +++ /dev/null | |||
@@ -1,1382 +0,0 @@ | |||
1 | From ecdc94b97f809d5f2b88640842fd0541951ad295 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lynne <dev@lynne.ee> | ||
3 | Date: Fri, 19 Jan 2024 10:49:02 +1000 | ||
4 | Subject: [PATCH] vulkan_av1: port to the new stable API | ||
5 | |||
6 | Co-Authored-by: Dave Airlie <airlied@redhat.com> | ||
7 | Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | ||
8 | Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/ecdc94b97f809d5f2b88640842fd0541951ad295] | ||
9 | --- | ||
10 | configure | 4 +- | ||
11 | libavcodec/Makefile | 5 +- | ||
12 | libavcodec/vulkan_av1.c | 514 ++++++++++-------- | ||
13 | libavcodec/vulkan_decode.c | 31 +- | ||
14 | libavcodec/vulkan_decode.h | 2 +- | ||
15 | libavcodec/vulkan_video.h | 2 - | ||
16 | .../vulkan_video_codec_av1std_decode_mesa.h | 36 -- | ||
17 | libavcodec/vulkan_video_codec_av1std_mesa.h | 403 -------------- | ||
18 | libavutil/hwcontext_vulkan.c | 2 +- | ||
19 | libavutil/vulkan_functions.h | 2 +- | ||
20 | libavutil/vulkan_loader.h | 2 +- | ||
21 | 11 files changed, 306 insertions(+), 697 deletions(-) | ||
22 | delete mode 100644 libavcodec/vulkan_video_codec_av1std_decode_mesa.h | ||
23 | delete mode 100644 libavcodec/vulkan_video_codec_av1std_mesa.h | ||
24 | |||
25 | diff --git a/configure b/configure | ||
26 | index e853deb51d..9fa639fca6 100755 | ||
27 | --- a/configure | ||
28 | +++ b/configure | ||
29 | @@ -7300,8 +7300,8 @@ enabled vdpau && | ||
30 | "in maintaining it." | ||
31 | |||
32 | if enabled vulkan; then | ||
33 | - check_pkg_config_header_only vulkan "vulkan >= 1.3.255" "vulkan/vulkan.h" "defined VK_VERSION_1_3" || | ||
34 | - check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 255)" | ||
35 | + check_pkg_config_header_only vulkan "vulkan >= 1.3.277" "vulkan/vulkan.h" "defined VK_VERSION_1_3" || | ||
36 | + check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 277)" | ||
37 | fi | ||
38 | |||
39 | if disabled vulkan; then | ||
40 | diff --git a/libavcodec/Makefile b/libavcodec/Makefile | ||
41 | index 7ef2e03ca6..9ce6d445c1 100644 | ||
42 | --- a/libavcodec/Makefile | ||
43 | +++ b/libavcodec/Makefile | ||
44 | @@ -1258,8 +1258,7 @@ SKIPHEADERS += %_tablegen.h \ | ||
45 | aacenc_quantization.h \ | ||
46 | aacenc_quantization_misc.h \ | ||
47 | bitstream_template.h \ | ||
48 | - vulkan_video_codec_av1std.h \ | ||
49 | - $(ARCH)/vpx_arith.h \ | ||
50 | + $(ARCH)/vpx_arith.h \ | ||
51 | |||
52 | SKIPHEADERS-$(CONFIG_AMF) += amfenc.h | ||
53 | SKIPHEADERS-$(CONFIG_D3D11VA) += d3d11va.h dxva2_internal.h | ||
54 | @@ -1280,7 +1279,7 @@ SKIPHEADERS-$(CONFIG_QSVENC) += qsvenc.h | ||
55 | SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h | ||
56 | SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h | ||
57 | SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h | ||
58 | -SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h | ||
59 | +SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h | ||
60 | SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h | ||
61 | SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h | ||
62 | |||
63 | diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c | ||
64 | index 5afd5353cc..c9e398eaec 100644 | ||
65 | --- a/libavcodec/vulkan_av1.c | ||
66 | +++ b/libavcodec/vulkan_av1.c | ||
67 | @@ -36,33 +36,47 @@ const FFVulkanDecodeDescriptor ff_vk_dec_av1_desc = { | ||
68 | typedef struct AV1VulkanDecodePicture { | ||
69 | FFVulkanDecodePicture vp; | ||
70 | |||
71 | - /* Workaround for a spec issue. | ||
72 | - *Can be removed once no longer needed, and threading can be enabled. */ | ||
73 | + /* TODO: investigate if this can be removed to make decoding completely | ||
74 | + * independent. */ | ||
75 | FFVulkanDecodeContext *dec; | ||
76 | |||
77 | - StdVideoAV1MESATile tiles[MAX_TILES]; | ||
78 | - StdVideoAV1MESATileList tile_list; | ||
79 | - const uint32_t *tile_offsets; | ||
80 | + uint32_t tile_sizes[MAX_TILES]; | ||
81 | |||
82 | /* Current picture */ | ||
83 | - VkVideoDecodeAV1DpbSlotInfoMESA vkav1_ref; | ||
84 | - StdVideoAV1MESAFrameHeader av1_frame_header; | ||
85 | - VkVideoDecodeAV1PictureInfoMESA av1_pic_info; | ||
86 | + StdVideoDecodeAV1ReferenceInfo std_ref; | ||
87 | + VkVideoDecodeAV1DpbSlotInfoKHR vkav1_ref; | ||
88 | + uint16_t width_in_sbs_minus1[64]; | ||
89 | + uint16_t height_in_sbs_minus1[64]; | ||
90 | + uint16_t mi_col_starts[64]; | ||
91 | + uint16_t mi_row_starts[64]; | ||
92 | + StdVideoAV1TileInfo tile_info; | ||
93 | + StdVideoAV1Quantization quantization; | ||
94 | + StdVideoAV1Segmentation segmentation; | ||
95 | + StdVideoAV1LoopFilter loop_filter; | ||
96 | + StdVideoAV1CDEF cdef; | ||
97 | + StdVideoAV1LoopRestoration loop_restoration; | ||
98 | + StdVideoAV1GlobalMotion global_motion; | ||
99 | + StdVideoAV1FilmGrain film_grain; | ||
100 | + StdVideoDecodeAV1PictureInfo std_pic_info; | ||
101 | + VkVideoDecodeAV1PictureInfoKHR av1_pic_info; | ||
102 | |||
103 | /* Picture refs */ | ||
104 | const AV1Frame *ref_src [AV1_NUM_REF_FRAMES]; | ||
105 | - VkVideoDecodeAV1DpbSlotInfoMESA vkav1_refs[AV1_NUM_REF_FRAMES]; | ||
106 | + StdVideoDecodeAV1ReferenceInfo std_refs [AV1_NUM_REF_FRAMES]; | ||
107 | + VkVideoDecodeAV1DpbSlotInfoKHR vkav1_refs[AV1_NUM_REF_FRAMES]; | ||
108 | |||
109 | uint8_t frame_id_set; | ||
110 | uint8_t frame_id; | ||
111 | + uint8_t ref_frame_sign_bias_mask; | ||
112 | } AV1VulkanDecodePicture; | ||
113 | |||
114 | static int vk_av1_fill_pict(AVCodecContext *avctx, const AV1Frame **ref_src, | ||
115 | VkVideoReferenceSlotInfoKHR *ref_slot, /* Main structure */ | ||
116 | VkVideoPictureResourceInfoKHR *ref, /* Goes in ^ */ | ||
117 | - VkVideoDecodeAV1DpbSlotInfoMESA *vkav1_ref, /* Goes in ^ */ | ||
118 | + StdVideoDecodeAV1ReferenceInfo *vkav1_std_ref, | ||
119 | + VkVideoDecodeAV1DpbSlotInfoKHR *vkav1_ref, /* Goes in ^ */ | ||
120 | const AV1Frame *pic, int is_current, int has_grain, | ||
121 | - int dpb_slot_index) | ||
122 | + int *saved_order_hints) | ||
123 | { | ||
124 | FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data; | ||
125 | AV1VulkanDecodePicture *hp = pic->hwaccel_picture_private; | ||
126 | @@ -73,31 +87,42 @@ static int vk_av1_fill_pict(AVCodecContext *avctx, const AV1Frame **ref_src, | ||
127 | if (err < 0) | ||
128 | return err; | ||
129 | |||
130 | - *vkav1_ref = (VkVideoDecodeAV1DpbSlotInfoMESA) { | ||
131 | - .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_MESA, | ||
132 | - .frameIdx = hp->frame_id, | ||
133 | + *vkav1_std_ref = (StdVideoDecodeAV1ReferenceInfo) { | ||
134 | + .flags = (StdVideoDecodeAV1ReferenceInfoFlags) { | ||
135 | + .disable_frame_end_update_cdf = pic->raw_frame_header->disable_frame_end_update_cdf, | ||
136 | + .segmentation_enabled = pic->raw_frame_header->segmentation_enabled, | ||
137 | + }, | ||
138 | + .frame_type = pic->raw_frame_header->frame_type, | ||
139 | + .OrderHint = pic->raw_frame_header->order_hint, | ||
140 | + .RefFrameSignBias = hp->ref_frame_sign_bias_mask, | ||
141 | }; | ||
142 | |||
143 | - for (unsigned i = 0; i < 7; i++) { | ||
144 | - const int idx = pic->raw_frame_header->ref_frame_idx[i]; | ||
145 | - vkav1_ref->ref_order_hint[i] = pic->raw_frame_header->ref_order_hint[idx]; | ||
146 | - } | ||
147 | + if (saved_order_hints) | ||
148 | + for (int i = 0; i < AV1_TOTAL_REFS_PER_FRAME; i++) | ||
149 | + vkav1_std_ref->SavedOrderHints[i] = saved_order_hints[i]; | ||
150 | + | ||
151 | + *vkav1_ref = (VkVideoDecodeAV1DpbSlotInfoKHR) { | ||
152 | + .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR, | ||
153 | + .pStdReferenceInfo = vkav1_std_ref, | ||
154 | + }; | ||
155 | |||
156 | - vkav1_ref->disable_frame_end_update_cdf = pic->raw_frame_header->disable_frame_end_update_cdf; | ||
157 | + vkav1_std_ref->flags.disable_frame_end_update_cdf = pic->raw_frame_header->disable_frame_end_update_cdf; | ||
158 | + vkav1_std_ref->flags.segmentation_enabled = pic->raw_frame_header->segmentation_enabled; | ||
159 | + vkav1_std_ref->frame_type = pic->raw_frame_header->frame_type; | ||
160 | |||
161 | *ref = (VkVideoPictureResourceInfoKHR) { | ||
162 | .sType = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR, | ||
163 | .codedOffset = (VkOffset2D){ 0, 0 }, | ||
164 | .codedExtent = (VkExtent2D){ pic->f->width, pic->f->height }, | ||
165 | .baseArrayLayer = ((has_grain || dec->dedicated_dpb) && dec->layered_dpb) ? | ||
166 | - dpb_slot_index : 0, | ||
167 | + hp->frame_id : 0, | ||
168 | .imageViewBinding = vkpic->img_view_ref, | ||
169 | }; | ||
170 | |||
171 | *ref_slot = (VkVideoReferenceSlotInfoKHR) { | ||
172 | .sType = VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR, | ||
173 | .pNext = vkav1_ref, | ||
174 | - .slotIndex = dpb_slot_index, | ||
175 | + .slotIndex = hp->frame_id, | ||
176 | .pPictureResource = ref, | ||
177 | }; | ||
178 | |||
179 | @@ -115,15 +140,40 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf) | ||
180 | |||
181 | const AV1RawSequenceHeader *seq = s->raw_seq; | ||
182 | |||
183 | - StdVideoAV1MESASequenceHeader av1_sequence_header; | ||
184 | - VkVideoDecodeAV1SessionParametersAddInfoMESA av1_params_info; | ||
185 | - VkVideoDecodeAV1SessionParametersCreateInfoMESA av1_params; | ||
186 | + StdVideoAV1SequenceHeader av1_sequence_header; | ||
187 | + StdVideoAV1TimingInfo av1_timing_info; | ||
188 | + StdVideoAV1ColorConfig av1_color_config; | ||
189 | + VkVideoDecodeAV1SessionParametersCreateInfoKHR av1_params; | ||
190 | VkVideoSessionParametersCreateInfoKHR session_params_create; | ||
191 | |||
192 | int err; | ||
193 | |||
194 | - av1_sequence_header = (StdVideoAV1MESASequenceHeader) { | ||
195 | - .flags = (StdVideoAV1MESASequenceHeaderFlags) { | ||
196 | + av1_timing_info = (StdVideoAV1TimingInfo) { | ||
197 | + .flags = (StdVideoAV1TimingInfoFlags) { | ||
198 | + .equal_picture_interval = seq->timing_info.equal_picture_interval, | ||
199 | + }, | ||
200 | + .num_units_in_display_tick = seq->timing_info.num_units_in_display_tick, | ||
201 | + .time_scale = seq->timing_info.time_scale, | ||
202 | + .num_ticks_per_picture_minus_1 = seq->timing_info.num_ticks_per_picture_minus_1, | ||
203 | + }; | ||
204 | + | ||
205 | + av1_color_config = (StdVideoAV1ColorConfig) { | ||
206 | + .flags = (StdVideoAV1ColorConfigFlags) { | ||
207 | + .mono_chrome = seq->color_config.mono_chrome, | ||
208 | + .color_range = seq->color_config.color_range, | ||
209 | + .separate_uv_delta_q = seq->color_config.separate_uv_delta_q, | ||
210 | + }, | ||
211 | + .BitDepth = seq->color_config.twelve_bit ? 12 : | ||
212 | + seq->color_config.high_bitdepth ? 10 : 8, | ||
213 | + .subsampling_x = seq->color_config.subsampling_x, | ||
214 | + .subsampling_y = seq->color_config.subsampling_y, | ||
215 | + .color_primaries = seq->color_config.color_primaries, | ||
216 | + .transfer_characteristics = seq->color_config.transfer_characteristics, | ||
217 | + .matrix_coefficients = seq->color_config.matrix_coefficients, | ||
218 | + }; | ||
219 | + | ||
220 | + av1_sequence_header = (StdVideoAV1SequenceHeader) { | ||
221 | + .flags = (StdVideoAV1SequenceHeaderFlags) { | ||
222 | .still_picture = seq->still_picture, | ||
223 | .reduced_still_picture_header = seq->reduced_still_picture_header, | ||
224 | .use_128x128_superblock = seq->use_128x128_superblock, | ||
225 | @@ -152,34 +202,15 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf) | ||
226 | .delta_frame_id_length_minus_2 = seq->delta_frame_id_length_minus_2, | ||
227 | .additional_frame_id_length_minus_1 = seq->additional_frame_id_length_minus_1, | ||
228 | .order_hint_bits_minus_1 = seq->order_hint_bits_minus_1, | ||
229 | - .timing_info = (StdVideoAV1MESATimingInfo) { | ||
230 | - .flags = (StdVideoAV1MESATimingInfoFlags) { | ||
231 | - .equal_picture_interval = seq->timing_info.equal_picture_interval, | ||
232 | - }, | ||
233 | - .num_units_in_display_tick = seq->timing_info.num_units_in_display_tick, | ||
234 | - .time_scale = seq->timing_info.time_scale, | ||
235 | - .num_ticks_per_picture_minus_1 = seq->timing_info.num_ticks_per_picture_minus_1, | ||
236 | - }, | ||
237 | - .color_config = (StdVideoAV1MESAColorConfig) { | ||
238 | - .flags = (StdVideoAV1MESAColorConfigFlags) { | ||
239 | - .mono_chrome = seq->color_config.mono_chrome, | ||
240 | - .color_range = seq->color_config.color_range, | ||
241 | - .separate_uv_delta_q = seq->color_config.separate_uv_delta_q, | ||
242 | - }, | ||
243 | - .bit_depth = seq->color_config.twelve_bit ? 12 : | ||
244 | - seq->color_config.high_bitdepth ? 10 : 8, | ||
245 | - .subsampling_x = seq->color_config.subsampling_x, | ||
246 | - .subsampling_y = seq->color_config.subsampling_y, | ||
247 | - }, | ||
248 | + .seq_force_integer_mv = seq->seq_force_integer_mv, | ||
249 | + .seq_force_screen_content_tools = seq->seq_force_screen_content_tools, | ||
250 | + .pTimingInfo = &av1_timing_info, | ||
251 | + .pColorConfig = &av1_color_config, | ||
252 | }; | ||
253 | |||
254 | - av1_params_info = (VkVideoDecodeAV1SessionParametersAddInfoMESA) { | ||
255 | - .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_ADD_INFO_MESA, | ||
256 | - .sequence_header = &av1_sequence_header, | ||
257 | - }; | ||
258 | - av1_params = (VkVideoDecodeAV1SessionParametersCreateInfoMESA) { | ||
259 | - .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA, | ||
260 | - .pParametersAddInfo = &av1_params_info, | ||
261 | + av1_params = (VkVideoDecodeAV1SessionParametersCreateInfoKHR) { | ||
262 | + .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR, | ||
263 | + .pStdSequenceHeader = &av1_sequence_header, | ||
264 | }; | ||
265 | session_params_create = (VkVideoSessionParametersCreateInfoKHR) { | ||
266 | .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, | ||
267 | @@ -211,8 +242,14 @@ static int vk_av1_start_frame(AVCodecContext *avctx, | ||
268 | |||
269 | const AV1RawFrameHeader *frame_header = s->raw_frame_header; | ||
270 | const AV1RawFilmGrainParams *film_grain = &s->cur_frame.film_grain; | ||
271 | + CodedBitstreamAV1Context *cbs_ctx = (CodedBitstreamAV1Context *)(s->cbc->priv_data); | ||
272 | + | ||
273 | const int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && | ||
274 | film_grain->apply_grain; | ||
275 | + StdVideoAV1FrameRestorationType remap_lr_type[4] = { STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE, | ||
276 | + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE, | ||
277 | + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER, | ||
278 | + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ }; | ||
279 | |||
280 | if (!dec->session_params) { | ||
281 | err = vk_av1_create_params(avctx, &dec->session_params); | ||
282 | @@ -233,15 +270,31 @@ static int vk_av1_start_frame(AVCodecContext *avctx, | ||
283 | dec->frame_id_alloc_mask |= (1 << slot_idx); | ||
284 | } | ||
285 | |||
286 | - /* Fill in references */ | ||
287 | - for (int i = 0; i < AV1_NUM_REF_FRAMES; i++) { | ||
288 | - const AV1Frame *ref_frame = &s->ref[i]; | ||
289 | - if (s->ref[i].f->pict_type == AV_PICTURE_TYPE_NONE) | ||
290 | + ap->ref_frame_sign_bias_mask = 0x0; | ||
291 | + for (int i = 0; i < STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME; i++) | ||
292 | + ap->ref_frame_sign_bias_mask |= cbs_ctx->ref_frame_sign_bias[i] << i; | ||
293 | + | ||
294 | + for (int i = 0; i < STD_VIDEO_AV1_REFS_PER_FRAME; i++) { | ||
295 | + const int idx = pic->raw_frame_header->ref_frame_idx[i]; | ||
296 | + const AV1Frame *ref_frame = &s->ref[idx]; | ||
297 | + AV1VulkanDecodePicture *hp = ref_frame->hwaccel_picture_private; | ||
298 | + int found = 0; | ||
299 | + | ||
300 | + if (ref_frame->f->pict_type == AV_PICTURE_TYPE_NONE) | ||
301 | + continue; | ||
302 | + | ||
303 | + for (int j = 0; j < ref_count; j++) { | ||
304 | + if (vp->ref_slots[j].slotIndex == hp->frame_id) { | ||
305 | + found = 1; | ||
306 | + break; | ||
307 | + } | ||
308 | + } | ||
309 | + if (found) | ||
310 | continue; | ||
311 | |||
312 | - err = vk_av1_fill_pict(avctx, &ap->ref_src[i], &vp->ref_slots[i], | ||
313 | - &vp->refs[i], &ap->vkav1_refs[i], | ||
314 | - ref_frame, 0, 0, i); | ||
315 | + err = vk_av1_fill_pict(avctx, &ap->ref_src[ref_count], &vp->ref_slots[ref_count], | ||
316 | + &vp->refs[ref_count], &ap->std_refs[ref_count], &ap->vkav1_refs[ref_count], | ||
317 | + ref_frame, 0, 0, cbs_ctx->ref[idx].saved_order_hints); | ||
318 | if (err < 0) | ||
319 | return err; | ||
320 | |||
321 | @@ -249,20 +302,32 @@ static int vk_av1_start_frame(AVCodecContext *avctx, | ||
322 | } | ||
323 | |||
324 | err = vk_av1_fill_pict(avctx, NULL, &vp->ref_slot, &vp->ref, | ||
325 | + &ap->std_ref, | ||
326 | &ap->vkav1_ref, | ||
327 | - pic, 1, apply_grain, 8); | ||
328 | + pic, 1, apply_grain, NULL); | ||
329 | if (err < 0) | ||
330 | return err; | ||
331 | |||
332 | - ap->tile_list.nb_tiles = 0; | ||
333 | - ap->tile_list.tile_list = ap->tiles; | ||
334 | - | ||
335 | - ap->av1_pic_info = (VkVideoDecodeAV1PictureInfoMESA) { | ||
336 | - .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_MESA, | ||
337 | - .frame_header = &ap->av1_frame_header, | ||
338 | - .tile_list = &ap->tile_list, | ||
339 | + ap->av1_pic_info = (VkVideoDecodeAV1PictureInfoKHR) { | ||
340 | + .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR, | ||
341 | + .pStdPictureInfo = &ap->std_pic_info, | ||
342 | + .frameHeaderOffset = 0, | ||
343 | + .tileCount = 0, | ||
344 | + .pTileOffsets = NULL, | ||
345 | + .pTileSizes = ap->tile_sizes, | ||
346 | }; | ||
347 | |||
348 | + for (int i = 0; i < STD_VIDEO_AV1_REFS_PER_FRAME; i++) { | ||
349 | + const int idx = pic->raw_frame_header->ref_frame_idx[i]; | ||
350 | + const AV1Frame *ref_frame = &s->ref[idx]; | ||
351 | + AV1VulkanDecodePicture *hp = ref_frame->hwaccel_picture_private; | ||
352 | + | ||
353 | + if (ref_frame->f->pict_type == AV_PICTURE_TYPE_NONE) | ||
354 | + ap->av1_pic_info.referenceNameSlotIndices[i] = -1; | ||
355 | + else | ||
356 | + ap->av1_pic_info.referenceNameSlotIndices[i] = hp->frame_id; | ||
357 | + } | ||
358 | + | ||
359 | vp->decode_info = (VkVideoDecodeInfoKHR) { | ||
360 | .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR, | ||
361 | .pNext = &ap->av1_pic_info, | ||
362 | @@ -279,9 +344,87 @@ static int vk_av1_start_frame(AVCodecContext *avctx, | ||
363 | }, | ||
364 | }; | ||
365 | |||
366 | + ap->tile_info = (StdVideoAV1TileInfo) { | ||
367 | + .flags = (StdVideoAV1TileInfoFlags) { | ||
368 | + .uniform_tile_spacing_flag = frame_header->uniform_tile_spacing_flag, | ||
369 | + }, | ||
370 | + .TileCols = frame_header->tile_cols, | ||
371 | + .TileRows = frame_header->tile_rows, | ||
372 | + .context_update_tile_id = frame_header->context_update_tile_id, | ||
373 | + .tile_size_bytes_minus_1 = frame_header->tile_size_bytes_minus1, | ||
374 | + .pWidthInSbsMinus1 = ap->width_in_sbs_minus1, | ||
375 | + .pHeightInSbsMinus1 = ap->height_in_sbs_minus1, | ||
376 | + .pMiColStarts = ap->mi_col_starts, | ||
377 | + .pMiRowStarts = ap->mi_row_starts, | ||
378 | + }; | ||
379 | + | ||
380 | + ap->quantization = (StdVideoAV1Quantization) { | ||
381 | + .flags.using_qmatrix = frame_header->using_qmatrix, | ||
382 | + .flags.diff_uv_delta = frame_header->diff_uv_delta, | ||
383 | + .base_q_idx = frame_header->base_q_idx, | ||
384 | + .DeltaQYDc = frame_header->delta_q_y_dc, | ||
385 | + .DeltaQUDc = frame_header->delta_q_u_dc, | ||
386 | + .DeltaQUAc = frame_header->delta_q_u_ac, | ||
387 | + .DeltaQVDc = frame_header->delta_q_v_dc, | ||
388 | + .DeltaQVAc = frame_header->delta_q_v_ac, | ||
389 | + .qm_y = frame_header->qm_y, | ||
390 | + .qm_u = frame_header->qm_u, | ||
391 | + .qm_v = frame_header->qm_v, | ||
392 | + }; | ||
393 | + | ||
394 | + ap->loop_filter = (StdVideoAV1LoopFilter) { | ||
395 | + .flags = (StdVideoAV1LoopFilterFlags) { | ||
396 | + .loop_filter_delta_enabled = frame_header->loop_filter_delta_enabled, | ||
397 | + .loop_filter_delta_update = frame_header->loop_filter_delta_update, | ||
398 | + }, | ||
399 | + .loop_filter_sharpness = frame_header->loop_filter_sharpness, | ||
400 | + }; | ||
401 | + | ||
402 | + for (int i = 0; i < STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS; i++) | ||
403 | + ap->loop_filter.loop_filter_level[i] = frame_header->loop_filter_level[i]; | ||
404 | + for (int i = 0; i < STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS; i++) | ||
405 | + ap->loop_filter.loop_filter_mode_deltas[i] = frame_header->loop_filter_mode_deltas[i]; | ||
406 | + | ||
407 | + ap->cdef = (StdVideoAV1CDEF) { | ||
408 | + .cdef_damping_minus_3 = frame_header->cdef_damping_minus_3, | ||
409 | + .cdef_bits = frame_header->cdef_bits, | ||
410 | + }; | ||
411 | + | ||
412 | + ap->loop_restoration = (StdVideoAV1LoopRestoration) { | ||
413 | + .FrameRestorationType[0] = remap_lr_type[frame_header->lr_type[0]], | ||
414 | + .FrameRestorationType[1] = remap_lr_type[frame_header->lr_type[1]], | ||
415 | + .FrameRestorationType[2] = remap_lr_type[frame_header->lr_type[2]], | ||
416 | + .LoopRestorationSize[0] = 1 + frame_header->lr_unit_shift, | ||
417 | + .LoopRestorationSize[1] = 1 + frame_header->lr_unit_shift - frame_header->lr_uv_shift, | ||
418 | + .LoopRestorationSize[2] = 1 + frame_header->lr_unit_shift - frame_header->lr_uv_shift, | ||
419 | + }; | ||
420 | + | ||
421 | + ap->film_grain = (StdVideoAV1FilmGrain) { | ||
422 | + .flags = (StdVideoAV1FilmGrainFlags) { | ||
423 | + .chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma, | ||
424 | + .overlap_flag = film_grain->overlap_flag, | ||
425 | + .clip_to_restricted_range = film_grain->clip_to_restricted_range, | ||
426 | + }, | ||
427 | + .grain_scaling_minus_8 = film_grain->grain_scaling_minus_8, | ||
428 | + .ar_coeff_lag = film_grain->ar_coeff_lag, | ||
429 | + .ar_coeff_shift_minus_6 = film_grain->ar_coeff_shift_minus_6, | ||
430 | + .grain_scale_shift = film_grain->grain_scale_shift, | ||
431 | + .grain_seed = film_grain->grain_seed, | ||
432 | + .film_grain_params_ref_idx = film_grain->film_grain_params_ref_idx, | ||
433 | + .num_y_points = film_grain->num_y_points, | ||
434 | + .num_cb_points = film_grain->num_cb_points, | ||
435 | + .num_cr_points = film_grain->num_cr_points, | ||
436 | + .cb_mult = film_grain->cb_mult, | ||
437 | + .cb_luma_mult = film_grain->cb_luma_mult, | ||
438 | + .cb_offset = film_grain->cb_offset, | ||
439 | + .cr_mult = film_grain->cr_mult, | ||
440 | + .cr_luma_mult = film_grain->cr_luma_mult, | ||
441 | + .cr_offset = film_grain->cr_offset, | ||
442 | + }; | ||
443 | + | ||
444 | /* Setup frame header */ | ||
445 | - ap->av1_frame_header = (StdVideoAV1MESAFrameHeader) { | ||
446 | - .flags = (StdVideoAV1MESAFrameHeaderFlags) { | ||
447 | + ap->std_pic_info = (StdVideoDecodeAV1PictureInfo) { | ||
448 | + .flags = (StdVideoDecodeAV1PictureInfoFlags) { | ||
449 | .error_resilient_mode = frame_header->error_resilient_mode, | ||
450 | .disable_cdf_update = frame_header->disable_cdf_update, | ||
451 | .use_superres = frame_header->use_superres, | ||
452 | @@ -302,174 +445,92 @@ static int vk_av1_start_frame(AVCodecContext *avctx, | ||
453 | .reference_select = frame_header->reference_select, | ||
454 | .skip_mode_present = frame_header->skip_mode_present, | ||
455 | .delta_q_present = frame_header->delta_q_present, | ||
456 | + .delta_lf_present = frame_header->delta_lf_present, | ||
457 | + .delta_lf_multi = frame_header->delta_lf_multi, | ||
458 | + .segmentation_enabled = frame_header->segmentation_enabled, | ||
459 | + .segmentation_update_map = frame_header->segmentation_update_map, | ||
460 | + .segmentation_temporal_update = frame_header->segmentation_temporal_update, | ||
461 | + .segmentation_update_data = frame_header->segmentation_update_data, | ||
462 | + .UsesLr = frame_header->lr_type[0] || frame_header->lr_type[1] || frame_header->lr_type[2], | ||
463 | + .apply_grain = apply_grain, | ||
464 | }, | ||
465 | - .frame_to_show_map_idx = frame_header->frame_to_show_map_idx, | ||
466 | - .frame_presentation_time = frame_header->frame_presentation_time, | ||
467 | - .display_frame_id = frame_header->display_frame_id, | ||
468 | .frame_type = frame_header->frame_type, | ||
469 | .current_frame_id = frame_header->current_frame_id, | ||
470 | - .order_hint = frame_header->order_hint, | ||
471 | + .OrderHint = frame_header->order_hint, | ||
472 | .primary_ref_frame = frame_header->primary_ref_frame, | ||
473 | - .frame_width_minus_1 = frame_header->frame_width_minus_1, | ||
474 | - .frame_height_minus_1 = frame_header->frame_height_minus_1, | ||
475 | - .coded_denom = frame_header->coded_denom, | ||
476 | - .render_width_minus_1 = frame_header->render_width_minus_1, | ||
477 | - .render_height_minus_1 = frame_header->render_height_minus_1, | ||
478 | .refresh_frame_flags = frame_header->refresh_frame_flags, | ||
479 | .interpolation_filter = frame_header->interpolation_filter, | ||
480 | - .tx_mode = frame_header->tx_mode, | ||
481 | - .tiling = (StdVideoAV1MESATileInfo) { | ||
482 | - .flags = (StdVideoAV1MESATileInfoFlags) { | ||
483 | - .uniform_tile_spacing_flag = frame_header->uniform_tile_spacing_flag, | ||
484 | - }, | ||
485 | - .tile_cols = frame_header->tile_cols, | ||
486 | - .tile_rows = frame_header->tile_rows, | ||
487 | - .context_update_tile_id = frame_header->context_update_tile_id, | ||
488 | - .tile_size_bytes_minus1 = frame_header->tile_size_bytes_minus1, | ||
489 | - }, | ||
490 | - .quantization = (StdVideoAV1MESAQuantization) { | ||
491 | - .flags.using_qmatrix = frame_header->using_qmatrix, | ||
492 | - .base_q_idx = frame_header->base_q_idx, | ||
493 | - .delta_q_y_dc = frame_header->delta_q_y_dc, | ||
494 | - .diff_uv_delta = frame_header->diff_uv_delta, | ||
495 | - .delta_q_u_dc = frame_header->delta_q_u_dc, | ||
496 | - .delta_q_u_ac = frame_header->delta_q_u_ac, | ||
497 | - .delta_q_v_dc = frame_header->delta_q_v_dc, | ||
498 | - .delta_q_v_ac = frame_header->delta_q_v_ac, | ||
499 | - .qm_y = frame_header->qm_y, | ||
500 | - .qm_u = frame_header->qm_u, | ||
501 | - .qm_v = frame_header->qm_v, | ||
502 | - }, | ||
503 | - .delta_q = (StdVideoAV1MESADeltaQ) { | ||
504 | - .flags = (StdVideoAV1MESADeltaQFlags) { | ||
505 | - .delta_lf_present = frame_header->delta_lf_present, | ||
506 | - .delta_lf_multi = frame_header->delta_lf_multi, | ||
507 | - }, | ||
508 | - .delta_q_res = frame_header->delta_q_res, | ||
509 | - .delta_lf_res = frame_header->delta_lf_res, | ||
510 | - }, | ||
511 | - .loop_filter = (StdVideoAV1MESALoopFilter) { | ||
512 | - .flags = (StdVideoAV1MESALoopFilterFlags) { | ||
513 | - .delta_enabled = frame_header->loop_filter_delta_enabled, | ||
514 | - .delta_update = frame_header->loop_filter_delta_update, | ||
515 | - }, | ||
516 | - .level = { | ||
517 | - frame_header->loop_filter_level[0], frame_header->loop_filter_level[1], | ||
518 | - frame_header->loop_filter_level[2], frame_header->loop_filter_level[3], | ||
519 | - }, | ||
520 | - .sharpness = frame_header->loop_filter_sharpness, | ||
521 | - .mode_deltas = { | ||
522 | - frame_header->loop_filter_mode_deltas[0], frame_header->loop_filter_mode_deltas[1], | ||
523 | - }, | ||
524 | - }, | ||
525 | - .cdef = (StdVideoAV1MESACDEF) { | ||
526 | - .damping_minus_3 = frame_header->cdef_damping_minus_3, | ||
527 | - .bits = frame_header->cdef_bits, | ||
528 | - }, | ||
529 | - .lr = (StdVideoAV1MESALoopRestoration) { | ||
530 | - .lr_unit_shift = frame_header->lr_unit_shift, | ||
531 | - .lr_uv_shift = frame_header->lr_uv_shift, | ||
532 | - .lr_type = { frame_header->lr_type[0], frame_header->lr_type[1], frame_header->lr_type[2] }, | ||
533 | - }, | ||
534 | - .segmentation = (StdVideoAV1MESASegmentation) { | ||
535 | - .flags = (StdVideoAV1MESASegmentationFlags) { | ||
536 | - .enabled = frame_header->segmentation_enabled, | ||
537 | - .update_map = frame_header->segmentation_update_map, | ||
538 | - .temporal_update = frame_header->segmentation_temporal_update, | ||
539 | - .update_data = frame_header->segmentation_update_data, | ||
540 | - }, | ||
541 | - }, | ||
542 | - .film_grain = (StdVideoAV1MESAFilmGrainParameters) { | ||
543 | - .flags = (StdVideoAV1MESAFilmGrainFlags) { | ||
544 | - .apply_grain = apply_grain, | ||
545 | - .chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma, | ||
546 | - .overlap_flag = film_grain->overlap_flag, | ||
547 | - .clip_to_restricted_range = film_grain->clip_to_restricted_range, | ||
548 | - }, | ||
549 | - .grain_scaling_minus_8 = film_grain->grain_scaling_minus_8, | ||
550 | - .ar_coeff_lag = film_grain->ar_coeff_lag, | ||
551 | - .ar_coeff_shift_minus_6 = film_grain->ar_coeff_shift_minus_6, | ||
552 | - .grain_scale_shift = film_grain->grain_scale_shift, | ||
553 | - .grain_seed = film_grain->grain_seed, | ||
554 | - .num_y_points = film_grain->num_y_points, | ||
555 | - .num_cb_points = film_grain->num_cb_points, | ||
556 | - .num_cr_points = film_grain->num_cr_points, | ||
557 | - .cb_mult = film_grain->cb_mult, | ||
558 | - .cb_luma_mult = film_grain->cb_luma_mult, | ||
559 | - .cb_offset = film_grain->cb_offset, | ||
560 | - .cr_mult = film_grain->cr_mult, | ||
561 | - .cr_luma_mult = film_grain->cr_luma_mult, | ||
562 | - .cr_offset = film_grain->cr_offset, | ||
563 | - }, | ||
564 | + .TxMode = frame_header->tx_mode, | ||
565 | + .delta_q_res = frame_header->delta_q_res, | ||
566 | + .delta_lf_res = frame_header->delta_lf_res, | ||
567 | + .SkipModeFrame[0] = s->cur_frame.skip_mode_frame_idx[0], | ||
568 | + .SkipModeFrame[1] = s->cur_frame.skip_mode_frame_idx[1], | ||
569 | + .coded_denom = frame_header->coded_denom, | ||
570 | + .pTileInfo = &ap->tile_info, | ||
571 | + .pQuantization = &ap->quantization, | ||
572 | + .pSegmentation = &ap->segmentation, | ||
573 | + .pLoopFilter = &ap->loop_filter, | ||
574 | + .pCDEF = &ap->cdef, | ||
575 | + .pLoopRestoration = &ap->loop_restoration, | ||
576 | + .pGlobalMotion = &ap->global_motion, | ||
577 | + .pFilmGrain = apply_grain ? &ap->film_grain : NULL, | ||
578 | }; | ||
579 | |||
580 | for (int i = 0; i < 64; i++) { | ||
581 | - ap->av1_frame_header.tiling.width_in_sbs_minus_1[i] = frame_header->width_in_sbs_minus_1[i]; | ||
582 | - ap->av1_frame_header.tiling.height_in_sbs_minus_1[i] = frame_header->height_in_sbs_minus_1[i]; | ||
583 | - ap->av1_frame_header.tiling.tile_start_col_sb[i] = frame_header->tile_start_col_sb[i]; | ||
584 | - ap->av1_frame_header.tiling.tile_start_row_sb[i] = frame_header->tile_start_row_sb[i]; | ||
585 | + ap->width_in_sbs_minus1[i] = frame_header->width_in_sbs_minus_1[i]; | ||
586 | + ap->height_in_sbs_minus1[i] = frame_header->height_in_sbs_minus_1[i]; | ||
587 | + ap->mi_col_starts[i] = frame_header->tile_start_col_sb[i]; | ||
588 | + ap->mi_row_starts[i] = frame_header->tile_start_row_sb[i]; | ||
589 | } | ||
590 | |||
591 | - for (int i = 0; i < 8; i++) { | ||
592 | - ap->av1_frame_header.segmentation.feature_enabled_bits[i] = 0; | ||
593 | - for (int j = 0; j < 8; j++) { | ||
594 | - ap->av1_frame_header.segmentation.feature_enabled_bits[i] |= (frame_header->feature_enabled[i][j] << j); | ||
595 | - ap->av1_frame_header.segmentation.feature_data[i][j] = frame_header->feature_value[i][j]; | ||
596 | + for (int i = 0; i < STD_VIDEO_AV1_MAX_SEGMENTS; i++) { | ||
597 | + ap->segmentation.FeatureEnabled[i] = 0x0; | ||
598 | + for (int j = 0; j < STD_VIDEO_AV1_SEG_LVL_MAX; j++) { | ||
599 | + ap->segmentation.FeatureEnabled[i] |= (frame_header->feature_enabled[i][j] << j); | ||
600 | + ap->segmentation.FeatureData[i][j] = frame_header->feature_value[i][j]; | ||
601 | } | ||
602 | - | ||
603 | - ap->av1_frame_header.loop_filter.ref_deltas[i] = frame_header->loop_filter_ref_deltas[i]; | ||
604 | - | ||
605 | - ap->av1_frame_header.cdef.y_pri_strength[i] = frame_header->cdef_y_pri_strength[i]; | ||
606 | - ap->av1_frame_header.cdef.y_sec_strength[i] = frame_header->cdef_y_sec_strength[i]; | ||
607 | - ap->av1_frame_header.cdef.uv_pri_strength[i] = frame_header->cdef_uv_pri_strength[i]; | ||
608 | - ap->av1_frame_header.cdef.uv_sec_strength[i] = frame_header->cdef_uv_sec_strength[i]; | ||
609 | - | ||
610 | - ap->av1_frame_header.ref_order_hint[i] = frame_header->ref_order_hint[i]; | ||
611 | - ap->av1_frame_header.global_motion[i] = (StdVideoAV1MESAGlobalMotion) { | ||
612 | - .flags = (StdVideoAV1MESAGlobalMotionFlags) { | ||
613 | - .gm_invalid = s->cur_frame.gm_invalid[i], | ||
614 | - }, | ||
615 | - .gm_type = s->cur_frame.gm_type[i], | ||
616 | - .gm_params = { | ||
617 | - s->cur_frame.gm_params[i][0], s->cur_frame.gm_params[i][1], | ||
618 | - s->cur_frame.gm_params[i][2], s->cur_frame.gm_params[i][3], | ||
619 | - s->cur_frame.gm_params[i][4], s->cur_frame.gm_params[i][5], | ||
620 | - }, | ||
621 | - }; | ||
622 | } | ||
623 | |||
624 | - for (int i = 0; i < 7; i++) { | ||
625 | - ap->av1_frame_header.ref_frame_idx[i] = frame_header->ref_frame_idx[i]; | ||
626 | - ap->av1_frame_header.delta_frame_id_minus1[i] = frame_header->delta_frame_id_minus1[i]; | ||
627 | + for (int i = 0; i < STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME; i++) | ||
628 | + ap->loop_filter.loop_filter_ref_deltas[i] = frame_header->loop_filter_ref_deltas[i]; | ||
629 | + | ||
630 | + for (int i = 0; i < STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS; i++) { | ||
631 | + ap->cdef.cdef_y_pri_strength[i] = frame_header->cdef_y_pri_strength[i]; | ||
632 | + ap->cdef.cdef_y_sec_strength[i] = frame_header->cdef_y_sec_strength[i]; | ||
633 | + ap->cdef.cdef_uv_pri_strength[i] = frame_header->cdef_uv_pri_strength[i]; | ||
634 | + ap->cdef.cdef_uv_sec_strength[i] = frame_header->cdef_uv_sec_strength[i]; | ||
635 | } | ||
636 | |||
637 | - ap->av1_pic_info.skip_mode_frame_idx[0] = s->cur_frame.skip_mode_frame_idx[0]; | ||
638 | - ap->av1_pic_info.skip_mode_frame_idx[1] = s->cur_frame.skip_mode_frame_idx[1]; | ||
639 | + for (int i = 0; i < STD_VIDEO_AV1_NUM_REF_FRAMES; i++) { | ||
640 | + ap->std_pic_info.OrderHints[i] = frame_header->ref_order_hint[i]; | ||
641 | + ap->global_motion.GmType[i] = s->cur_frame.gm_type[i]; | ||
642 | + for (int j = 0; j < STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS; j++) { | ||
643 | + ap->global_motion.gm_params[i][j] = s->cur_frame.gm_params[i][j]; | ||
644 | + } | ||
645 | + } | ||
646 | |||
647 | if (apply_grain) { | ||
648 | - for (int i = 0; i < 14; i++) { | ||
649 | - ap->av1_frame_header.film_grain.point_y_value[i] = film_grain->point_y_value[i]; | ||
650 | - ap->av1_frame_header.film_grain.point_y_scaling[i] = film_grain->point_y_scaling[i]; | ||
651 | + for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_Y_POINTS; i++) { | ||
652 | + ap->film_grain.point_y_value[i] = film_grain->point_y_value[i]; | ||
653 | + ap->film_grain.point_y_scaling[i] = film_grain->point_y_scaling[i]; | ||
654 | } | ||
655 | |||
656 | - for (int i = 0; i < 10; i++) { | ||
657 | - ap->av1_frame_header.film_grain.point_cb_value[i] = film_grain->point_cb_value[i]; | ||
658 | - ap->av1_frame_header.film_grain.point_cb_scaling[i] = film_grain->point_cb_scaling[i]; | ||
659 | - ap->av1_frame_header.film_grain.point_cr_value[i] = film_grain->point_cr_value[i]; | ||
660 | - ap->av1_frame_header.film_grain.point_cr_scaling[i] = film_grain->point_cr_scaling[i]; | ||
661 | + for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_CB_POINTS; i++) { | ||
662 | + ap->film_grain.point_cb_value[i] = film_grain->point_cb_value[i]; | ||
663 | + ap->film_grain.point_cb_scaling[i] = film_grain->point_cb_scaling[i]; | ||
664 | + ap->film_grain.point_cr_value[i] = film_grain->point_cr_value[i]; | ||
665 | + ap->film_grain.point_cr_scaling[i] = film_grain->point_cr_scaling[i]; | ||
666 | } | ||
667 | |||
668 | - for (int i = 0; i < 24; i++) { | ||
669 | - ap->av1_frame_header.film_grain.ar_coeffs_y_plus_128[i] = film_grain->ar_coeffs_y_plus_128[i]; | ||
670 | - ap->av1_frame_header.film_grain.ar_coeffs_cb_plus_128[i] = film_grain->ar_coeffs_cb_plus_128[i]; | ||
671 | - ap->av1_frame_header.film_grain.ar_coeffs_cr_plus_128[i] = film_grain->ar_coeffs_cr_plus_128[i]; | ||
672 | - } | ||
673 | + for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_POS_LUMA; i++) | ||
674 | + ap->film_grain.ar_coeffs_y_plus_128[i] = film_grain->ar_coeffs_y_plus_128[i]; | ||
675 | |||
676 | - ap->av1_frame_header.film_grain.ar_coeffs_cb_plus_128[24] = film_grain->ar_coeffs_cb_plus_128[24]; | ||
677 | - ap->av1_frame_header.film_grain.ar_coeffs_cr_plus_128[24] = film_grain->ar_coeffs_cr_plus_128[24]; | ||
678 | + for (int i = 0; i < STD_VIDEO_AV1_MAX_NUM_POS_CHROMA; i++) { | ||
679 | + ap->film_grain.ar_coeffs_cb_plus_128[i] = film_grain->ar_coeffs_cb_plus_128[i]; | ||
680 | + ap->film_grain.ar_coeffs_cr_plus_128[i] = film_grain->ar_coeffs_cr_plus_128[i]; | ||
681 | + } | ||
682 | } | ||
683 | |||
684 | - /* Workaround for a spec issue. */ | ||
685 | ap->dec = dec; | ||
686 | |||
687 | return 0; | ||
688 | @@ -484,25 +545,20 @@ static int vk_av1_decode_slice(AVCodecContext *avctx, | ||
689 | AV1VulkanDecodePicture *ap = s->cur_frame.hwaccel_picture_private; | ||
690 | FFVulkanDecodePicture *vp = &ap->vp; | ||
691 | |||
692 | + /* Too many tiles, exceeding all defined levels in the AV1 spec */ | ||
693 | + if (ap->av1_pic_info.tileCount > MAX_TILES) | ||
694 | + return AVERROR(ENOSYS); | ||
695 | + | ||
696 | for (int i = s->tg_start; i <= s->tg_end; i++) { | ||
697 | - ap->tiles[ap->tile_list.nb_tiles] = (StdVideoAV1MESATile) { | ||
698 | - .size = s->tile_group_info[i].tile_size, | ||
699 | - .offset = s->tile_group_info[i].tile_offset, | ||
700 | - .row = s->tile_group_info[i].tile_row, | ||
701 | - .column = s->tile_group_info[i].tile_column, | ||
702 | - .tg_start = s->tg_start, | ||
703 | - .tg_end = s->tg_end, | ||
704 | - }; | ||
705 | + ap->tile_sizes[ap->av1_pic_info.tileCount] = s->tile_group_info[i].tile_size; | ||
706 | |||
707 | err = ff_vk_decode_add_slice(avctx, vp, | ||
708 | data + s->tile_group_info[i].tile_offset, | ||
709 | s->tile_group_info[i].tile_size, 0, | ||
710 | - &ap->tile_list.nb_tiles, | ||
711 | - &ap->tile_offsets); | ||
712 | + &ap->av1_pic_info.tileCount, | ||
713 | + &ap->av1_pic_info.pTileOffsets); | ||
714 | if (err < 0) | ||
715 | return err; | ||
716 | - | ||
717 | - ap->tiles[ap->tile_list.nb_tiles - 1].offset = ap->tile_offsets[ap->tile_list.nb_tiles - 1]; | ||
718 | } | ||
719 | |||
720 | return 0; | ||
721 | @@ -518,7 +574,7 @@ static int vk_av1_end_frame(AVCodecContext *avctx) | ||
722 | FFVulkanDecodePicture *rvp[AV1_NUM_REF_FRAMES] = { 0 }; | ||
723 | AVFrame *rav[AV1_NUM_REF_FRAMES] = { 0 }; | ||
724 | |||
725 | - if (!ap->tile_list.nb_tiles) | ||
726 | + if (!ap->av1_pic_info.tileCount) | ||
727 | return 0; | ||
728 | |||
729 | if (!dec->session_params) { | ||
730 | @@ -536,7 +592,7 @@ static int vk_av1_end_frame(AVCodecContext *avctx) | ||
731 | } | ||
732 | |||
733 | av_log(avctx, AV_LOG_VERBOSE, "Decoding frame, %"SIZE_SPECIFIER" bytes, %i tiles\n", | ||
734 | - vp->slices_size, ap->tile_list.nb_tiles); | ||
735 | + vp->slices_size, ap->av1_pic_info.tileCount); | ||
736 | |||
737 | return ff_vk_decode_frame(avctx, pic->f, vp, rav, rvp); | ||
738 | } | ||
739 | @@ -580,8 +636,6 @@ const FFHWAccel ff_av1_vulkan_hwaccel = { | ||
740 | * flexibility, this index cannot be present anywhere. | ||
741 | * The current implementation tracks the index for the driver and submits it | ||
742 | * as necessary information. Due to needing to modify the decoding context, | ||
743 | - * which is not thread-safe, on frame free, threading is disabled. | ||
744 | - * In the future, once this is fixed in the spec, the workarounds may be removed | ||
745 | - * and threading enabled. */ | ||
746 | + * which is not thread-safe, on frame free, threading is disabled. */ | ||
747 | .caps_internal = HWACCEL_CAP_ASYNC_SAFE, | ||
748 | }; | ||
749 | diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c | ||
750 | index 91929d165f..4561f26b62 100644 | ||
751 | --- a/libavcodec/vulkan_decode.c | ||
752 | +++ b/libavcodec/vulkan_decode.c | ||
753 | @@ -61,7 +61,7 @@ static const VkVideoProfileInfoKHR *get_video_profile(FFVulkanDecodeShared *ctx, | ||
754 | VkStructureType profile_struct_type = | ||
755 | codec_id == AV_CODEC_ID_H264 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR : | ||
756 | codec_id == AV_CODEC_ID_HEVC ? VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR : | ||
757 | - codec_id == AV_CODEC_ID_AV1 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_MESA : | ||
758 | + codec_id == AV_CODEC_ID_AV1 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR : | ||
759 | 0; | ||
760 | |||
761 | profile_list = ff_vk_find_struct(ctx->s.hwfc->create_pnext, | ||
762 | @@ -674,7 +674,7 @@ static VkResult vulkan_setup_profile(AVCodecContext *avctx, | ||
763 | const struct FFVkCodecMap *vk_codec, | ||
764 | VkVideoDecodeH264CapabilitiesKHR *h264_caps, | ||
765 | VkVideoDecodeH265CapabilitiesKHR *h265_caps, | ||
766 | - VkVideoDecodeAV1CapabilitiesMESA *av1_caps, | ||
767 | + VkVideoDecodeAV1CapabilitiesKHR *av1_caps, | ||
768 | VkVideoCapabilitiesKHR *caps, | ||
769 | VkVideoDecodeCapabilitiesKHR *dec_caps, | ||
770 | int cur_profile) | ||
771 | @@ -685,7 +685,7 @@ static VkResult vulkan_setup_profile(AVCodecContext *avctx, | ||
772 | |||
773 | VkVideoDecodeH264ProfileInfoKHR *h264_profile = &prof->h264_profile; | ||
774 | VkVideoDecodeH265ProfileInfoKHR *h265_profile = &prof->h265_profile; | ||
775 | - VkVideoDecodeAV1ProfileInfoMESA *av1_profile = &prof->av1_profile; | ||
776 | + VkVideoDecodeAV1ProfileInfoKHR *av1_profile = &prof->av1_profile; | ||
777 | |||
778 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->sw_pix_fmt); | ||
779 | if (!desc) | ||
780 | @@ -713,8 +713,9 @@ static VkResult vulkan_setup_profile(AVCodecContext *avctx, | ||
781 | } else if (avctx->codec_id == AV_CODEC_ID_AV1) { | ||
782 | dec_caps->pNext = av1_caps; | ||
783 | usage->pNext = av1_profile; | ||
784 | - av1_profile->sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_MESA; | ||
785 | - av1_profile->stdProfileIdc = cur_profile; | ||
786 | + av1_profile->sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR; | ||
787 | + av1_profile->stdProfile = cur_profile; | ||
788 | + av1_profile->filmGrainSupport = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN); | ||
789 | } | ||
790 | |||
791 | usage->sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR; | ||
792 | @@ -769,8 +770,8 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_ | ||
793 | VkVideoDecodeH265CapabilitiesKHR h265_caps = { | ||
794 | .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR, | ||
795 | }; | ||
796 | - VkVideoDecodeAV1CapabilitiesMESA av1_caps = { | ||
797 | - .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_MESA, | ||
798 | + VkVideoDecodeAV1CapabilitiesKHR av1_caps = { | ||
799 | + .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR, | ||
800 | }; | ||
801 | |||
802 | VkPhysicalDeviceVideoFormatInfoKHR fmt_info = { | ||
803 | @@ -789,7 +790,7 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_ | ||
804 | cur_profile = avctx->profile; | ||
805 | base_profile = avctx->codec_id == AV_CODEC_ID_H264 ? AV_PROFILE_H264_CONSTRAINED_BASELINE : | ||
806 | avctx->codec_id == AV_CODEC_ID_H265 ? AV_PROFILE_HEVC_MAIN : | ||
807 | - avctx->codec_id == AV_CODEC_ID_AV1 ? STD_VIDEO_AV1_MESA_PROFILE_MAIN : | ||
808 | + avctx->codec_id == AV_CODEC_ID_AV1 ? STD_VIDEO_AV1_PROFILE_MAIN : | ||
809 | 0; | ||
810 | |||
811 | ret = vulkan_setup_profile(avctx, prof, hwctx, vk, vk_codec, | ||
812 | @@ -837,7 +838,7 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_ | ||
813 | |||
814 | max_level = avctx->codec_id == AV_CODEC_ID_H264 ? ff_vk_h264_level_to_av(h264_caps.maxLevelIdc) : | ||
815 | avctx->codec_id == AV_CODEC_ID_H265 ? ff_vk_h265_level_to_av(h265_caps.maxLevelIdc) : | ||
816 | - avctx->codec_id == AV_CODEC_ID_AV1 ? av1_caps.maxLevelIdc : | ||
817 | + avctx->codec_id == AV_CODEC_ID_AV1 ? av1_caps.maxLevel : | ||
818 | 0; | ||
819 | |||
820 | av_log(avctx, AV_LOG_VERBOSE, "Decoder capabilities for %s profile \"%s\":\n", | ||
821 | @@ -908,17 +909,11 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_ | ||
822 | "VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR set " | ||
823 | "but VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR is unset!\n"); | ||
824 | return AVERROR_EXTERNAL; | ||
825 | - } else if (!(dec_caps->flags & VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR) && | ||
826 | - avctx->codec_id == AV_CODEC_ID_AV1) { | ||
827 | - av_log(avctx, AV_LOG_ERROR, "Cannot initialize Vulkan decoding session, buggy driver: " | ||
828 | - "codec is AV1, but VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR isn't set!\n"); | ||
829 | - return AVERROR_EXTERNAL; | ||
830 | } | ||
831 | |||
832 | /* TODO: make dedicated_dpb tunable */ | ||
833 | dec->dedicated_dpb = !(dec_caps->flags & VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR); | ||
834 | dec->layered_dpb = !(caps->flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR); | ||
835 | - dec->external_fg = av1_caps.flags & VK_VIDEO_DECODE_AV1_CAPABILITY_EXTERNAL_FILM_GRAIN_MESA; | ||
836 | |||
837 | if (dec->dedicated_dpb) { | ||
838 | fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR; | ||
839 | @@ -1126,8 +1121,10 @@ int ff_vk_decode_init(AVCodecContext *avctx) | ||
840 | VkVideoDecodeH265SessionParametersCreateInfoKHR h265_params = { | ||
841 | .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR, | ||
842 | }; | ||
843 | - VkVideoDecodeAV1SessionParametersCreateInfoMESA av1_params = { | ||
844 | - .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA, | ||
845 | + StdVideoAV1SequenceHeader av1_empty_seq = { 0 }; | ||
846 | + VkVideoDecodeAV1SessionParametersCreateInfoKHR av1_params = { | ||
847 | + .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR, | ||
848 | + .pStdSequenceHeader = &av1_empty_seq, | ||
849 | }; | ||
850 | VkVideoSessionParametersCreateInfoKHR session_params_create = { | ||
851 | .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, | ||
852 | diff --git a/libavcodec/vulkan_decode.h b/libavcodec/vulkan_decode.h | ||
853 | index a43e328d73..7ba8b239cb 100644 | ||
854 | --- a/libavcodec/vulkan_decode.h | ||
855 | +++ b/libavcodec/vulkan_decode.h | ||
856 | @@ -37,7 +37,7 @@ typedef struct FFVulkanDecodeDescriptor { | ||
857 | typedef struct FFVulkanDecodeProfileData { | ||
858 | VkVideoDecodeH264ProfileInfoKHR h264_profile; | ||
859 | VkVideoDecodeH265ProfileInfoKHR h265_profile; | ||
860 | - VkVideoDecodeAV1ProfileInfoMESA av1_profile; | ||
861 | + VkVideoDecodeAV1ProfileInfoKHR av1_profile; | ||
862 | VkVideoDecodeUsageInfoKHR usage; | ||
863 | VkVideoProfileInfoKHR profile; | ||
864 | VkVideoProfileListInfoKHR profile_list; | ||
865 | diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h | ||
866 | index bb69e920bb..01a1de7d9d 100644 | ||
867 | --- a/libavcodec/vulkan_video.h | ||
868 | +++ b/libavcodec/vulkan_video.h | ||
869 | @@ -22,8 +22,6 @@ | ||
870 | #include "vulkan.h" | ||
871 | |||
872 | #include <vk_video/vulkan_video_codecs_common.h> | ||
873 | -#include "vulkan_video_codec_av1std.h" | ||
874 | -#include "vulkan_video_codec_av1std_decode.h" | ||
875 | |||
876 | #define CODEC_VER_MAJ(ver) (ver >> 22) | ||
877 | #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1)) | ||
878 | diff --git a/libavcodec/vulkan_video_codec_av1std_decode.h b/libavcodec/vulkan_video_codec_av1std_decode.h | ||
879 | deleted file mode 100644 | ||
880 | index e2f37b4e6e..0000000000 | ||
881 | --- a/libavcodec/vulkan_video_codec_av1std_decode.h | ||
882 | +++ /dev/null | ||
883 | @@ -1,36 +0,0 @@ | ||
884 | -/* Copyright 2023 Lynne | ||
885 | - * Copyright 2023 Dave Airlie | ||
886 | - * | ||
887 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
888 | - * you may not use this file except in compliance with the License. | ||
889 | - * You may obtain a copy of the License at | ||
890 | - * | ||
891 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
892 | - * | ||
893 | - * Unless required by applicable law or agreed to in writing, software | ||
894 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
895 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
896 | - * See the License for the specific language governing permissions and | ||
897 | - * limitations under the License. | ||
898 | - */ | ||
899 | - | ||
900 | -#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ | ||
901 | -#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1 | ||
902 | - | ||
903 | -/* | ||
904 | -** This header is NOT YET generated from the Khronos Vulkan XML API Registry. | ||
905 | -** | ||
906 | -*/ | ||
907 | - | ||
908 | -#ifdef __cplusplus | ||
909 | -extern "C" { | ||
910 | -#endif | ||
911 | -#define vulkan_video_codec_av1std_decode 1 | ||
912 | - | ||
913 | - | ||
914 | - | ||
915 | -#ifdef __cplusplus | ||
916 | -} | ||
917 | -#endif | ||
918 | - | ||
919 | -#endif | ||
920 | diff --git a/libavcodec/vulkan_video_codec_av1std.h b/libavcodec/vulkan_video_codec_av1std.h | ||
921 | deleted file mode 100644 | ||
922 | index c91589eee2..0000000000 | ||
923 | --- a/libavcodec/vulkan_video_codec_av1std.h | ||
924 | +++ /dev/null | ||
925 | @@ -1,403 +0,0 @@ | ||
926 | -/* Copyright 2023 Lynne | ||
927 | - * Copyright 2023 Dave Airlie | ||
928 | - * | ||
929 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
930 | - * you may not use this file except in compliance with the License. | ||
931 | - * You may obtain a copy of the License at | ||
932 | - * | ||
933 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
934 | - * | ||
935 | - * Unless required by applicable law or agreed to in writing, software | ||
936 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
937 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
938 | - * See the License for the specific language governing permissions and | ||
939 | - * limitations under the License. | ||
940 | - */ | ||
941 | - | ||
942 | -#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_ | ||
943 | -#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1 | ||
944 | - | ||
945 | -/* | ||
946 | -** This header is NOT YET generated from the Khronos Vulkan XML API Registry. | ||
947 | -** | ||
948 | -*/ | ||
949 | - | ||
950 | -#ifdef __cplusplus | ||
951 | -extern "C" { | ||
952 | -#endif | ||
953 | -#define vulkan_video_codec_av1std 1 | ||
954 | - | ||
955 | -#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ | ||
956 | - ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) | ||
957 | -#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 VK_MAKE_VIDEO_STD_VERSION(0, 1, 0) | ||
958 | -#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_0_1_0 | ||
959 | -#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode" | ||
960 | - | ||
961 | -typedef enum StdVideoAV1MESAProfile { | ||
962 | - STD_VIDEO_AV1_MESA_PROFILE_MAIN = 0, | ||
963 | - STD_VIDEO_AV1_MESA_PROFILE_HIGH = 1, | ||
964 | - STD_VIDEO_AV1_MESA_PROFILE_PROFESSIONAL = 2, | ||
965 | -} StdVideoAV1MESAProfile; | ||
966 | - | ||
967 | -typedef enum StdVideoAV1MESALevel { | ||
968 | - STD_VIDEO_AV1_MESA_LEVEL_2_0 = 0, | ||
969 | - STD_VIDEO_AV1_MESA_LEVEL_2_1 = 1, | ||
970 | - STD_VIDEO_AV1_MESA_LEVEL_2_2 = 2, | ||
971 | - STD_VIDEO_AV1_MESA_LEVEL_2_3 = 3, | ||
972 | - STD_VIDEO_AV1_MESA_LEVEL_3_0 = 4, | ||
973 | - STD_VIDEO_AV1_MESA_LEVEL_3_1 = 5, | ||
974 | - STD_VIDEO_AV1_MESA_LEVEL_3_2 = 6, | ||
975 | - STD_VIDEO_AV1_MESA_LEVEL_3_3 = 7, | ||
976 | - STD_VIDEO_AV1_MESA_LEVEL_4_0 = 8, | ||
977 | - STD_VIDEO_AV1_MESA_LEVEL_4_1 = 9, | ||
978 | - STD_VIDEO_AV1_MESA_LEVEL_4_2 = 10, | ||
979 | - STD_VIDEO_AV1_MESA_LEVEL_4_3 = 11, | ||
980 | - STD_VIDEO_AV1_MESA_LEVEL_5_0 = 12, | ||
981 | - STD_VIDEO_AV1_MESA_LEVEL_5_1 = 13, | ||
982 | - STD_VIDEO_AV1_MESA_LEVEL_5_2 = 14, | ||
983 | - STD_VIDEO_AV1_MESA_LEVEL_5_3 = 15, | ||
984 | - STD_VIDEO_AV1_MESA_LEVEL_6_0 = 16, | ||
985 | - STD_VIDEO_AV1_MESA_LEVEL_6_1 = 17, | ||
986 | - STD_VIDEO_AV1_MESA_LEVEL_6_2 = 18, | ||
987 | - STD_VIDEO_AV1_MESA_LEVEL_6_3 = 19, | ||
988 | - STD_VIDEO_AV1_MESA_LEVEL_7_0 = 20, | ||
989 | - STD_VIDEO_AV1_MESA_LEVEL_7_1 = 21, | ||
990 | - STD_VIDEO_AV1_MESA_LEVEL_7_2 = 22, | ||
991 | - STD_VIDEO_AV1_MESA_LEVEL_7_3 = 23, | ||
992 | - STD_VIDEO_AV1_MESA_LEVEL_MAX = 31, | ||
993 | -} StdVideoAV1MESALevel; | ||
994 | - | ||
995 | -typedef struct StdVideoAV1MESAFilmGrainFlags { | ||
996 | - uint8_t apply_grain; | ||
997 | - uint8_t chroma_scaling_from_luma; | ||
998 | - uint8_t overlap_flag; | ||
999 | - uint8_t clip_to_restricted_range; | ||
1000 | -} StdVideoAV1MESAFilmGrainFlags; | ||
1001 | - | ||
1002 | -typedef struct StdVideoAV1MESAFilmGrainParameters { | ||
1003 | - StdVideoAV1MESAFilmGrainFlags flags; | ||
1004 | - uint32_t grain_scaling_minus_8; | ||
1005 | - uint32_t ar_coeff_lag; | ||
1006 | - uint32_t ar_coeff_shift_minus_6; | ||
1007 | - uint32_t grain_scale_shift; | ||
1008 | - | ||
1009 | - uint16_t grain_seed; | ||
1010 | - uint8_t num_y_points; | ||
1011 | - uint8_t point_y_value[14]; | ||
1012 | - uint8_t point_y_scaling[14]; | ||
1013 | - | ||
1014 | - uint8_t num_cb_points; | ||
1015 | - uint8_t point_cb_value[10]; | ||
1016 | - uint8_t point_cb_scaling[10]; | ||
1017 | - | ||
1018 | - uint8_t num_cr_points; | ||
1019 | - uint8_t point_cr_value[10]; | ||
1020 | - uint8_t point_cr_scaling[10]; | ||
1021 | - | ||
1022 | - int8_t ar_coeffs_y_plus_128[24]; | ||
1023 | - int8_t ar_coeffs_cb_plus_128[25]; | ||
1024 | - int8_t ar_coeffs_cr_plus_128[25]; | ||
1025 | - uint8_t cb_mult; | ||
1026 | - uint8_t cb_luma_mult; | ||
1027 | - uint16_t cb_offset; | ||
1028 | - uint8_t cr_mult; | ||
1029 | - uint8_t cr_luma_mult; | ||
1030 | - uint16_t cr_offset; | ||
1031 | -} StdVideoAV1MESAFilmGrainParameters; | ||
1032 | - | ||
1033 | -typedef struct StdVideoAV1MESAGlobalMotionFlags { | ||
1034 | - uint8_t gm_invalid; | ||
1035 | -} StdVideoAV1MESAGlobalMotionFlags; | ||
1036 | - | ||
1037 | -typedef struct StdVideoAV1MESAGlobalMotion { | ||
1038 | - StdVideoAV1MESAGlobalMotionFlags flags; | ||
1039 | - uint8_t gm_type; | ||
1040 | - uint32_t gm_params[6]; | ||
1041 | -} StdVideoAV1MESAGlobalMotion; | ||
1042 | - | ||
1043 | -typedef struct StdVideoAV1MESALoopRestoration { | ||
1044 | - uint8_t lr_type[3]; | ||
1045 | - uint8_t lr_unit_shift; | ||
1046 | - uint8_t lr_uv_shift; | ||
1047 | -} StdVideoAV1MESALoopRestoration; | ||
1048 | - | ||
1049 | -typedef struct StdVideoAV1MESATileInfoFlags { | ||
1050 | - uint8_t uniform_tile_spacing_flag; | ||
1051 | -} StdVideoAV1MESATileInfoFlags; | ||
1052 | - | ||
1053 | -typedef struct StdVideoAV1MESATileInfo { | ||
1054 | - StdVideoAV1MESATileInfoFlags flags; | ||
1055 | - uint8_t tile_cols; | ||
1056 | - uint8_t tile_rows; | ||
1057 | - uint8_t tile_start_col_sb[64]; | ||
1058 | - uint8_t tile_start_row_sb[64]; | ||
1059 | - uint8_t width_in_sbs_minus_1[64]; | ||
1060 | - uint8_t height_in_sbs_minus_1[64]; | ||
1061 | - uint16_t context_update_tile_id; | ||
1062 | - uint8_t tile_size_bytes_minus1; | ||
1063 | -} StdVideoAV1MESATileInfo; | ||
1064 | - | ||
1065 | -typedef struct StdVideoAV1MESAQuantizationFlags { | ||
1066 | - uint8_t using_qmatrix; | ||
1067 | -} StdVideoAV1MESAQuantizationFlags; | ||
1068 | - | ||
1069 | -typedef struct StdVideoAV1MESAQuantization { | ||
1070 | - StdVideoAV1MESAQuantizationFlags flags; | ||
1071 | - uint8_t base_q_idx; | ||
1072 | - int8_t delta_q_y_dc; | ||
1073 | - uint8_t diff_uv_delta; | ||
1074 | - int8_t delta_q_u_dc; | ||
1075 | - int8_t delta_q_u_ac; | ||
1076 | - int8_t delta_q_v_dc; | ||
1077 | - int8_t delta_q_v_ac; | ||
1078 | - uint8_t qm_y; | ||
1079 | - uint8_t qm_u; | ||
1080 | - uint8_t qm_v; | ||
1081 | -} StdVideoAV1MESAQuantization; | ||
1082 | - | ||
1083 | -typedef struct StdVideoAV1MESACDEF { | ||
1084 | - uint8_t damping_minus_3; | ||
1085 | - uint8_t bits; | ||
1086 | - uint8_t y_pri_strength[8]; | ||
1087 | - uint8_t y_sec_strength[8]; | ||
1088 | - uint8_t uv_pri_strength[8]; | ||
1089 | - uint8_t uv_sec_strength[8]; | ||
1090 | -} StdVideoAV1MESACDEF; | ||
1091 | - | ||
1092 | -typedef struct StdVideoAV1MESADeltaQFlags { | ||
1093 | - uint8_t delta_lf_present; | ||
1094 | - uint8_t delta_lf_multi; | ||
1095 | -} StdVideoAV1MESADeltaQFlags; | ||
1096 | - | ||
1097 | -typedef struct StdVideoAV1MESADeltaQ { | ||
1098 | - StdVideoAV1MESADeltaQFlags flags; | ||
1099 | - uint8_t delta_q_res; | ||
1100 | - uint8_t delta_lf_res; | ||
1101 | -} StdVideoAV1MESADeltaQ; | ||
1102 | - | ||
1103 | -typedef struct StdVideoAV1MESASegmentationFlags { | ||
1104 | - uint8_t enabled; | ||
1105 | - uint8_t update_map; | ||
1106 | - uint8_t temporal_update; | ||
1107 | - uint8_t update_data; | ||
1108 | -} StdVideoAV1MESASegmentationFlags; | ||
1109 | - | ||
1110 | -typedef struct StdVideoAV1MESASegmentation { | ||
1111 | - StdVideoAV1MESASegmentationFlags flags; | ||
1112 | - uint8_t feature_enabled_bits[8]; | ||
1113 | - int16_t feature_data[8][8]; | ||
1114 | -} StdVideoAV1MESASegmentation; | ||
1115 | - | ||
1116 | -typedef struct StdVideoAV1MESALoopFilterFlags { | ||
1117 | - uint8_t delta_enabled; | ||
1118 | - uint8_t delta_update; | ||
1119 | -} StdVideoAV1MESALoopFilterFlags; | ||
1120 | - | ||
1121 | -typedef struct StdVideoAV1MESALoopFilter { | ||
1122 | - StdVideoAV1MESALoopFilterFlags flags; | ||
1123 | - uint8_t level[4]; | ||
1124 | - uint8_t sharpness; | ||
1125 | - int8_t ref_deltas[8]; | ||
1126 | - int8_t mode_deltas[2]; | ||
1127 | -} StdVideoAV1MESALoopFilter; | ||
1128 | - | ||
1129 | -typedef struct StdVideoAV1MESAFrameHeaderFlags { | ||
1130 | - uint8_t error_resilient_mode; | ||
1131 | - uint8_t disable_cdf_update; | ||
1132 | - uint8_t use_superres; | ||
1133 | - uint8_t render_and_frame_size_different; | ||
1134 | - uint8_t allow_screen_content_tools; | ||
1135 | - uint8_t is_filter_switchable; | ||
1136 | - uint8_t force_integer_mv; | ||
1137 | - uint8_t frame_size_override_flag; | ||
1138 | - uint8_t buffer_removal_time_present_flag; | ||
1139 | - uint8_t allow_intrabc; | ||
1140 | - uint8_t frame_refs_short_signaling; | ||
1141 | - uint8_t allow_high_precision_mv; | ||
1142 | - uint8_t is_motion_mode_switchable; | ||
1143 | - uint8_t use_ref_frame_mvs; | ||
1144 | - uint8_t disable_frame_end_update_cdf; | ||
1145 | - uint8_t allow_warped_motion; | ||
1146 | - uint8_t reduced_tx_set; | ||
1147 | - uint8_t reference_select; | ||
1148 | - uint8_t skip_mode_present; | ||
1149 | - uint8_t delta_q_present; | ||
1150 | - uint8_t UsesLr; | ||
1151 | -} StdVideoAV1MESAFrameHeaderFlags; | ||
1152 | - | ||
1153 | -typedef struct StdVideoAV1MESAFrameHeader { | ||
1154 | - StdVideoAV1MESAFrameHeaderFlags flags; | ||
1155 | - | ||
1156 | - uint32_t frame_presentation_time; | ||
1157 | - uint32_t display_frame_id; | ||
1158 | - uint32_t current_frame_id; | ||
1159 | - uint8_t frame_to_show_map_idx; | ||
1160 | - uint8_t frame_type; | ||
1161 | - uint8_t order_hint; | ||
1162 | - uint8_t primary_ref_frame; | ||
1163 | - uint16_t frame_width_minus_1; | ||
1164 | - uint16_t frame_height_minus_1; | ||
1165 | - uint16_t render_width_minus_1; | ||
1166 | - uint16_t render_height_minus_1; | ||
1167 | - uint8_t coded_denom; | ||
1168 | - | ||
1169 | - uint8_t refresh_frame_flags; | ||
1170 | - uint8_t ref_order_hint[8]; | ||
1171 | - int8_t ref_frame_idx[7]; | ||
1172 | - uint32_t delta_frame_id_minus1[7]; | ||
1173 | - | ||
1174 | - uint8_t interpolation_filter; | ||
1175 | - uint8_t tx_mode; | ||
1176 | - | ||
1177 | - StdVideoAV1MESATileInfo tiling; | ||
1178 | - StdVideoAV1MESAQuantization quantization; | ||
1179 | - StdVideoAV1MESASegmentation segmentation; | ||
1180 | - StdVideoAV1MESADeltaQ delta_q; | ||
1181 | - StdVideoAV1MESALoopFilter loop_filter; | ||
1182 | - StdVideoAV1MESACDEF cdef; | ||
1183 | - StdVideoAV1MESALoopRestoration lr; | ||
1184 | - StdVideoAV1MESAGlobalMotion global_motion[8]; // One per ref frame | ||
1185 | - StdVideoAV1MESAFilmGrainParameters film_grain; | ||
1186 | -} StdVideoAV1MESAFrameHeader; | ||
1187 | - | ||
1188 | -typedef struct StdVideoAV1MESAScreenCoding { | ||
1189 | - uint8_t seq_force_screen_content_tools; | ||
1190 | -} StdVideoAV1MESAScreenCoding; | ||
1191 | - | ||
1192 | -typedef struct StdVideoAV1MESATimingInfoFlags { | ||
1193 | - uint8_t equal_picture_interval; | ||
1194 | -} StdVideoAV1MESATimingInfoFlags; | ||
1195 | - | ||
1196 | -typedef struct StdVideoAV1MESATimingInfo { | ||
1197 | - StdVideoAV1MESATimingInfoFlags flags; | ||
1198 | - uint32_t num_units_in_display_tick; | ||
1199 | - uint32_t time_scale; | ||
1200 | - uint32_t num_ticks_per_picture_minus_1; | ||
1201 | -} StdVideoAV1MESATimingInfo; | ||
1202 | - | ||
1203 | -typedef struct StdVideoAV1MESAColorConfigFlags { | ||
1204 | - uint8_t mono_chrome; | ||
1205 | - uint8_t color_range; | ||
1206 | - uint8_t separate_uv_delta_q; | ||
1207 | -} StdVideoAV1MESAColorConfigFlags; | ||
1208 | - | ||
1209 | -typedef struct StdVideoAV1MESAColorConfig { | ||
1210 | - StdVideoAV1MESAColorConfigFlags flags; | ||
1211 | - uint8_t bit_depth; | ||
1212 | - uint8_t subsampling_x; | ||
1213 | - uint8_t subsampling_y; | ||
1214 | -} StdVideoAV1MESAColorConfig; | ||
1215 | - | ||
1216 | -typedef struct StdVideoAV1MESASequenceHeaderFlags { | ||
1217 | - uint8_t still_picture; | ||
1218 | - uint8_t reduced_still_picture_header; | ||
1219 | - uint8_t use_128x128_superblock; | ||
1220 | - uint8_t enable_filter_intra; | ||
1221 | - uint8_t enable_intra_edge_filter; | ||
1222 | - uint8_t enable_interintra_compound; | ||
1223 | - uint8_t enable_masked_compound; | ||
1224 | - uint8_t enable_warped_motion; | ||
1225 | - uint8_t enable_dual_filter; | ||
1226 | - uint8_t enable_order_hint; | ||
1227 | - uint8_t enable_jnt_comp; | ||
1228 | - uint8_t enable_ref_frame_mvs; | ||
1229 | - uint8_t frame_id_numbers_present_flag; | ||
1230 | - uint8_t enable_superres; | ||
1231 | - uint8_t enable_cdef; | ||
1232 | - uint8_t enable_restoration; | ||
1233 | - uint8_t film_grain_params_present; | ||
1234 | - uint8_t timing_info_present_flag; | ||
1235 | - uint8_t initial_display_delay_present_flag; | ||
1236 | -} StdVideoAV1MESASequenceHeaderFlags; | ||
1237 | - | ||
1238 | -typedef struct StdVideoAV1MESASequenceHeader { | ||
1239 | - StdVideoAV1MESASequenceHeaderFlags flags; | ||
1240 | - | ||
1241 | - StdVideoAV1MESAProfile seq_profile; | ||
1242 | - uint8_t frame_width_bits_minus_1; | ||
1243 | - uint8_t frame_height_bits_minus_1; | ||
1244 | - uint16_t max_frame_width_minus_1; | ||
1245 | - uint16_t max_frame_height_minus_1; | ||
1246 | - uint8_t delta_frame_id_length_minus_2; | ||
1247 | - uint8_t additional_frame_id_length_minus_1; | ||
1248 | - uint8_t order_hint_bits_minus_1; | ||
1249 | - uint8_t seq_choose_integer_mv; | ||
1250 | - uint8_t seq_force_integer_mv; | ||
1251 | - | ||
1252 | - StdVideoAV1MESATimingInfo timing_info; | ||
1253 | - StdVideoAV1MESAColorConfig color_config; | ||
1254 | -} StdVideoAV1MESASequenceHeader; | ||
1255 | - | ||
1256 | -typedef struct StdVideoAV1MESATile { | ||
1257 | - uint16_t tg_start; | ||
1258 | - uint16_t tg_end; | ||
1259 | - uint16_t row; | ||
1260 | - uint16_t column; | ||
1261 | - uint32_t size; | ||
1262 | - uint32_t offset; | ||
1263 | -} StdVideoAV1MESATile; | ||
1264 | - | ||
1265 | -typedef struct StdVideoAV1MESATileList { | ||
1266 | - StdVideoAV1MESATile *tile_list; | ||
1267 | - uint32_t nb_tiles; | ||
1268 | -} StdVideoAV1MESATileList; | ||
1269 | - | ||
1270 | -typedef struct VkVideoDecodeAV1PictureInfoMESA { | ||
1271 | - VkStructureType sType; | ||
1272 | - const void *pNext; | ||
1273 | - StdVideoAV1MESAFrameHeader *frame_header; | ||
1274 | - StdVideoAV1MESATileList *tile_list; | ||
1275 | - uint8_t skip_mode_frame_idx[2]; | ||
1276 | -} VkVideoDecodeAV1PictureInfoMESA; | ||
1277 | - | ||
1278 | -typedef struct VkVideoDecodeAV1DpbSlotInfoMESA { | ||
1279 | - VkStructureType sType; | ||
1280 | - const void *pNext; | ||
1281 | - uint8_t frameIdx; | ||
1282 | - uint8_t ref_order_hint[7]; | ||
1283 | - uint8_t disable_frame_end_update_cdf; | ||
1284 | -} VkVideoDecodeAV1DpbSlotInfoMESA; | ||
1285 | - | ||
1286 | -typedef struct VkVideoDecodeAV1SessionParametersAddInfoMESA { | ||
1287 | - VkStructureType sType; | ||
1288 | - const void *pNext; | ||
1289 | - StdVideoAV1MESASequenceHeader *sequence_header; | ||
1290 | -} VkVideoDecodeAV1SessionParametersAddInfoMESA; | ||
1291 | - | ||
1292 | -typedef struct VkVideoDecodeAV1SessionParametersCreateInfoMESA { | ||
1293 | - VkStructureType sType; | ||
1294 | - const void *pNext; | ||
1295 | - const VkVideoDecodeAV1SessionParametersAddInfoMESA *pParametersAddInfo; | ||
1296 | -} VkVideoDecodeAV1SessionParametersCreateInfoMESA; | ||
1297 | - | ||
1298 | -typedef struct VkVideoDecodeAV1ProfileInfoMESA { | ||
1299 | - VkStructureType sType; | ||
1300 | - const void *pNext; | ||
1301 | - StdVideoAV1MESAProfile stdProfileIdc; | ||
1302 | -} VkVideoDecodeAV1ProfileInfoMESA; | ||
1303 | - | ||
1304 | -typedef enum VkVideoDecodeAV1CapabilityFlagBitsMESA { | ||
1305 | - VK_VIDEO_DECODE_AV1_CAPABILITY_EXTERNAL_FILM_GRAIN_MESA = 0x00000001, | ||
1306 | - VK_VIDEO_DECODE_AV1_CAPABILITY_FLAG_BITS_MAX_ENUM_MESA = 0x7FFFFFFF | ||
1307 | -} VkVideoDecodeAV1CapabilityFlagBitsMESA; | ||
1308 | -typedef VkFlags VkVideoDecodeAV1CapabilityFlagsMESA; | ||
1309 | - | ||
1310 | -typedef struct VkVideoDecodeAV1CapabilitiesMESA { | ||
1311 | - VkStructureType sType; | ||
1312 | - const void *pNext; | ||
1313 | - VkVideoDecodeAV1CapabilityFlagsMESA flags; | ||
1314 | - StdVideoAV1MESALevel maxLevelIdc; | ||
1315 | -} VkVideoDecodeAV1CapabilitiesMESA; | ||
1316 | - | ||
1317 | -#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_MESA 1000509000 | ||
1318 | -#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA 1000509001 | ||
1319 | -#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_ADD_INFO_MESA 1000509002 | ||
1320 | -#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_MESA 1000509003 | ||
1321 | -#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_MESA 1000509004 | ||
1322 | -#define VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_MESA 1000509005 | ||
1323 | - | ||
1324 | -#ifdef __cplusplus | ||
1325 | -} | ||
1326 | -#endif | ||
1327 | - | ||
1328 | -#endif | ||
1329 | diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c | ||
1330 | index 91b9f96ccf..6e3b96b73a 100644 | ||
1331 | --- a/libavutil/hwcontext_vulkan.c | ||
1332 | +++ b/libavutil/hwcontext_vulkan.c | ||
1333 | @@ -446,7 +446,7 @@ static const VulkanOptExtension optional_device_exts[] = { | ||
1334 | { VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_QUEUE }, | ||
1335 | { VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H264 }, | ||
1336 | { VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H265 }, | ||
1337 | - { "VK_MESA_video_decode_av1", FF_VK_EXT_VIDEO_DECODE_AV1 }, | ||
1338 | + { VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_AV1 }, | ||
1339 | }; | ||
1340 | |||
1341 | static VkBool32 VKAPI_CALL vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity, | ||
1342 | diff --git a/libavutil/vulkan_functions.h b/libavutil/vulkan_functions.h | ||
1343 | index 65021b04b1..6b379acf93 100644 | ||
1344 | --- a/libavutil/vulkan_functions.h | ||
1345 | +++ b/libavutil/vulkan_functions.h | ||
1346 | @@ -43,7 +43,7 @@ typedef enum FFVulkanExtensions { | ||
1347 | FF_VK_EXT_VIDEO_DECODE_QUEUE = 1ULL << 11, /* VK_KHR_video_decode_queue */ | ||
1348 | FF_VK_EXT_VIDEO_DECODE_H264 = 1ULL << 12, /* VK_EXT_video_decode_h264 */ | ||
1349 | FF_VK_EXT_VIDEO_DECODE_H265 = 1ULL << 13, /* VK_EXT_video_decode_h265 */ | ||
1350 | - FF_VK_EXT_VIDEO_DECODE_AV1 = 1ULL << 14, /* VK_MESA_video_decode_av1 */ | ||
1351 | + FF_VK_EXT_VIDEO_DECODE_AV1 = 1ULL << 14, /* VK_KHR_video_decode_av1 */ | ||
1352 | FF_VK_EXT_ATOMIC_FLOAT = 1ULL << 15, /* VK_EXT_shader_atomic_float */ | ||
1353 | FF_VK_EXT_COOP_MATRIX = 1ULL << 16, /* VK_KHR_cooperative_matrix */ | ||
1354 | |||
1355 | diff --git a/libavutil/vulkan_loader.h b/libavutil/vulkan_loader.h | ||
1356 | index f9e739e1e3..73cf03935d 100644 | ||
1357 | --- a/libavutil/vulkan_loader.h | ||
1358 | +++ b/libavutil/vulkan_loader.h | ||
1359 | @@ -58,7 +58,7 @@ static inline uint64_t ff_vk_extensions_to_mask(const char * const *extensions, | ||
1360 | { VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_QUEUE }, | ||
1361 | { VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H264 }, | ||
1362 | { VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_H265 }, | ||
1363 | - { "VK_MESA_video_decode_av1", FF_VK_EXT_VIDEO_DECODE_AV1 }, | ||
1364 | + { VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_AV1 }, | ||
1365 | }; | ||
1366 | |||
1367 | FFVulkanExtensions mask = 0x0; | ||
1368 | diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c | ||
1369 | --- ffmpeg-6.1.1.orig/libavcodec/vulkan_video.c | ||
1370 | +++ ffmpeg-6.1.1/libavcodec/vulkan_video.c | ||
1371 | @@ -37,7 +37,7 @@ const FFVkCodecMap ff_vk_codec_map[AV_CO | ||
1372 | 0, | ||
1373 | 0, | ||
1374 | FF_VK_EXT_VIDEO_DECODE_AV1, | ||
1375 | - 0x01000000 /* TODO fix this */ | ||
1376 | + VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR | ||
1377 | }, | ||
1378 | }; | ||
1379 | |||
1380 | -- | ||
1381 | 2.25.1 | ||
1382 | |||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.1.bb index c0bce2db7a..4314ab9f31 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.1.bb | |||
@@ -22,13 +22,9 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
22 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ | 22 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ |
23 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" | 23 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" |
24 | 24 | ||
25 | SRC_URI = " \ | 25 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz" |
26 | https://www.ffmpeg.org/releases/${BP}.tar.xz \ | ||
27 | file://av1_ordering_info.patch \ | ||
28 | file://vulkan_av1_stable_API.patch \ | ||
29 | " | ||
30 | 26 | ||
31 | SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968" | 27 | SRC_URI[sha256sum] = "733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1" |
32 | 28 | ||
33 | # https://nvd.nist.gov/vuln/detail/CVE-2023-39018 | 29 | # https://nvd.nist.gov/vuln/detail/CVE-2023-39018 |
34 | # https://github.com/bramp/ffmpeg-cli-wrapper/issues/291 | 30 | # https://github.com/bramp/ffmpeg-cli-wrapper/issues/291 |
@@ -46,7 +42,8 @@ ARM_INSTRUCTION_SET:armv6 = "arm" | |||
46 | # libpostproc was previously packaged from a separate recipe | 42 | # libpostproc was previously packaged from a separate recipe |
47 | PROVIDES = "libav libpostproc" | 43 | PROVIDES = "libav libpostproc" |
48 | 44 | ||
49 | DEPENDS = "nasm-native" | 45 | DEPENDS:append:x86 = " nasm-native" |
46 | DEPENDS:append:x86-64 = " nasm-native" | ||
50 | 47 | ||
51 | inherit autotools pkgconfig | 48 | inherit autotools pkgconfig |
52 | 49 | ||
@@ -128,6 +125,8 @@ EXTRA_OECONF = " \ | |||
128 | " | 125 | " |
129 | 126 | ||
130 | EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" | 127 | EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" |
128 | # --enable-pic is used and x86 assembly is not PIC on x86 | ||
129 | EXTRA_OECONF:append:x86 = " --disable-asm" | ||
131 | 130 | ||
132 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" | 131 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" |
133 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" | 132 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" |
@@ -141,10 +140,6 @@ EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic" | |||
141 | EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" | 140 | EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" |
142 | EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" | 141 | EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" |
143 | 142 | ||
144 | # gold crashes on x86, another solution is to --disable-asm but thats more hacky | ||
145 | # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 | ||
146 | |||
147 | LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" | ||
148 | LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}" | 143 | LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}" |
149 | 144 | ||
150 | EXTRA_OEMAKE = "V=1" | 145 | EXTRA_OEMAKE = "V=1" |
@@ -168,7 +163,8 @@ PACKAGES =+ "libavcodec \ | |||
168 | libavutil \ | 163 | libavutil \ |
169 | libpostproc \ | 164 | libpostproc \ |
170 | libswresample \ | 165 | libswresample \ |
171 | libswscale" | 166 | libswscale \ |
167 | ${PN}-examples" | ||
172 | 168 | ||
173 | FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" | 169 | FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" |
174 | FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" | 170 | FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" |
@@ -178,13 +174,6 @@ FILES:libavutil = "${libdir}/libavutil${SOLIBS}" | |||
178 | FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" | 174 | FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" |
179 | FILES:libswresample = "${libdir}/libswresample${SOLIBS}" | 175 | FILES:libswresample = "${libdir}/libswresample${SOLIBS}" |
180 | FILES:libswscale = "${libdir}/libswscale${SOLIBS}" | 176 | FILES:libswscale = "${libdir}/libswscale${SOLIBS}" |
177 | FILES:${PN}-examples = "${datadir}/${BPN}/examples" | ||
181 | 178 | ||
182 | # ffmpeg disables PIC on some platforms (e.g. x86-32) | 179 | CVE_PRODUCT = "ffmpeg libswresample libavcodec" |
183 | INSANE_SKIP:${MLPREFIX}libavcodec = "textrel" | ||
184 | INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" | ||
185 | INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" | ||
186 | INSANE_SKIP:${MLPREFIX}libavformat = "textrel" | ||
187 | INSANE_SKIP:${MLPREFIX}libavutil = "textrel" | ||
188 | INSANE_SKIP:${MLPREFIX}libswscale = "textrel" | ||
189 | INSANE_SKIP:${MLPREFIX}libswresample = "textrel" | ||
190 | INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" | ||
diff --git a/meta/recipes-multimedia/flac/flac/0001-API-documentation-replace-modules.html-by-topics.htm.patch b/meta/recipes-multimedia/flac/flac/0001-API-documentation-replace-modules.html-by-topics.htm.patch new file mode 100644 index 0000000000..0e6be8c8d2 --- /dev/null +++ b/meta/recipes-multimedia/flac/flac/0001-API-documentation-replace-modules.html-by-topics.htm.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 6ad5b6a9ce81383ef75e6f7b88f54d3c29294e63 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Opdenacker <michael.opdenacker@rootcommit.com> | ||
3 | Date: Sat, 15 Mar 2025 11:50:08 +0100 | ||
4 | Subject: [PATCH] API documentation: replace modules.html by topics.html | ||
5 | |||
6 | This fixes the issue reported on | ||
7 | https://lists.xiph.org/pipermail/flac-dev/2025-February/006696.html | ||
8 | |||
9 | Newer Doxygen versions call what was previously api/modules.html | ||
10 | api/topics.html instead. | ||
11 | |||
12 | Signed-off-by: Michael Opdenacker <michael.opdenacker@rootcommit.com> | ||
13 | Suggested-by: Christian Weisgerber <naddy@mips.inka.de> | ||
14 | Upstream-Status: Submitted [https://github.com/xiph/flac/pull/824] | ||
15 | --- | ||
16 | configure.ac | 2 +- | ||
17 | include/FLAC/all.h | 2 +- | ||
18 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/configure.ac b/configure.ac | ||
21 | index 8eb82320..74295eec 100644 | ||
22 | --- a/configure.ac | ||
23 | +++ b/configure.ac | ||
24 | @@ -296,7 +296,7 @@ if test "x$enable_doxygen_docs" != xfalse ; then | ||
25 | fi | ||
26 | AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN") | ||
27 | |||
28 | -if test ! -n "$DOXYGEN" && test -f "$srcdir/doc/FLAC.tag" && test -f "$srcdir/doc/api/modules.html" ; then | ||
29 | +if test ! -n "$DOXYGEN" && test -f "$srcdir/doc/FLAC.tag" && test -f "$srcdir/doc/api/topics.html" ; then | ||
30 | HAS_PREBUILT_DOXYGEN=yes | ||
31 | fi | ||
32 | AM_CONDITIONAL(FLaC__HAS_PREBUILT_DOXYGEN, test "x$HAS_PREBUILT_DOXYGEN" = xyes) | ||
33 | diff --git a/include/FLAC/all.h b/include/FLAC/all.h | ||
34 | index f29aa010..0be26fd7 100644 | ||
35 | --- a/include/FLAC/all.h | ||
36 | +++ b/include/FLAC/all.h | ||
37 | @@ -102,7 +102,7 @@ | ||
38 | * \section getting_started Getting Started | ||
39 | * | ||
40 | * A good starting point for learning the API is to browse through | ||
41 | - * the <A HREF="modules.html">modules</A>. Modules are logical | ||
42 | + * the <A HREF="topics.html">modules</A>. Modules are logical | ||
43 | * groupings of related functions or classes, which correspond roughly | ||
44 | * to header files or sections of header files. Each module includes a | ||
45 | * detailed description of the general usage of its functions or | ||
diff --git a/meta/recipes-multimedia/flac/flac_1.4.3.bb b/meta/recipes-multimedia/flac/flac_1.5.0.bb index d4e463cda5..d6df801aec 100644 --- a/meta/recipes-multimedia/flac/flac_1.4.3.bb +++ b/meta/recipes-multimedia/flac/flac_1.5.0.bb | |||
@@ -3,17 +3,20 @@ DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compr | |||
3 | HOMEPAGE = "https://xiph.org/flac/" | 3 | HOMEPAGE = "https://xiph.org/flac/" |
4 | BUGTRACKER = "https://github.com/xiph/flac/issues" | 4 | BUGTRACKER = "https://github.com/xiph/flac/issues" |
5 | SECTION = "libs" | 5 | SECTION = "libs" |
6 | LICENSE = "GFDL-1.2 & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-3-Clause" | 6 | LICENSE = "GFDL-1.3 & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-3-Clause" |
7 | LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \ | 7 | LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=802e79e394e372d01e863e3f4058cf40 \ |
8 | file://src/Makefile.am;beginline=1;endline=17;md5=b1dab2704be7f01bfbd9b7f6d5f000a9 \ | 8 | file://src/Makefile.am;beginline=1;endline=17;md5=9c882153132df8f3a1cb1a8ca1f2350f \ |
9 | file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 9 | file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
10 | file://src/flac/main.c;beginline=1;endline=18;md5=23099119c034d894bd1bf7ef5bd22101 \ | 10 | file://src/flac/main.c;beginline=1;endline=18;md5=1e826b5083ba1e028852fe7ceec6a8ad \ |
11 | file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \ | 11 | file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \ |
12 | file://COPYING.Xiph;md5=0c90e41ab2fa7e69ca9391330d870221 \ | 12 | file://COPYING.Xiph;md5=78a131b2ea50675d245d280ccc34f8b6 \ |
13 | file://include/FLAC/all.h;beginline=65;endline=70;md5=39aaf5e03c7364363884c8b8ddda8eea" | 13 | file://include/FLAC/all.h;beginline=65;endline=70;md5=39aaf5e03c7364363884c8b8ddda8eea \ |
14 | " | ||
14 | 15 | ||
15 | SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz" | 16 | SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \ |
16 | SRC_URI[sha256sum] = "6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70" | 17 | file://0001-API-documentation-replace-modules.html-by-topics.htm.patch" |
18 | |||
19 | SRC_URI[sha256sum] = "f2c1c76592a82ffff8413ba3c4a1299b6c7ab06c734dee03fd88630485c2b920" | ||
17 | 20 | ||
18 | CVE_PRODUCT = "libflac flac" | 21 | CVE_PRODUCT = "libflac flac" |
19 | 22 | ||
@@ -21,7 +24,6 @@ inherit autotools gettext | |||
21 | 24 | ||
22 | EXTRA_OECONF = "--disable-oggtest \ | 25 | EXTRA_OECONF = "--disable-oggtest \ |
23 | --without-libiconv-prefix \ | 26 | --without-libiconv-prefix \ |
24 | ac_cv_prog_NASM="" \ | ||
25 | " | 27 | " |
26 | 28 | ||
27 | PACKAGECONFIG ??= " \ | 29 | PACKAGECONFIG ??= " \ |
@@ -34,3 +36,10 @@ PACKAGES += "libflac libflac++" | |||
34 | FILES:${PN} = "${bindir}/*" | 36 | FILES:${PN} = "${bindir}/*" |
35 | FILES:libflac = "${libdir}/libFLAC.so.*" | 37 | FILES:libflac = "${libdir}/libFLAC.so.*" |
36 | FILES:libflac++ = "${libdir}/libFLAC++.so.*" | 38 | FILES:libflac++ = "${libdir}/libFLAC++.so.*" |
39 | |||
40 | do_install:append() { | ||
41 | # make the links in documentation relative to avoid buildpaths reproducibility problem | ||
42 | sed -i "s#${S}/include#${includedir}#g" ${D}${docdir}/flac/FLAC.tag ${D}${docdir}/flac/api/*.html | ||
43 | # there is also one root path without trailing slash | ||
44 | sed -i "s#${S}#/#g" ${D}${docdir}/flac/api/*.html | ||
45 | } | ||
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 8520567f17..aeb296aa96 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 @@ | |||
1 | From c20894a5e6f52aa9fe3437e733a228b1a0eb6428 Mon Sep 17 00:00:00 2001 | 1 | From 9ed608c901955b0906aac102d5d7ab06accee60e Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sun, 9 Sep 2018 17:38:10 -0700 | 3 | Date: Sun, 9 Sep 2018 17:38:10 -0700 |
4 | Subject: [PATCH] connect has a different signature on musl | 4 | Subject: [PATCH] connect has a different signature on musl |
@@ -8,7 +8,7 @@ API has a different signature, this patch fixes this so it can compile | |||
8 | on musl, the functionality should remain same as it is immediately | 8 | on musl, the functionality should remain same as it is immediately |
9 | typcasted to struct sockaddr_in* type inside the function before use | 9 | typcasted to struct sockaddr_in* type inside the function before use |
10 | 10 | ||
11 | Upstream-Status: Pending | 11 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8767] |
12 | 12 | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
14 | --- | 14 | --- |
diff --git a/meta/recipes-multimedia/gstreamer/gst-devtools_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gst-devtools_1.26.3.bb index 9df802afe9..f107af110b 100644 --- a/meta/recipes-multimedia/gstreamer/gst-devtools_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gst-devtools_1.26.3.bb | |||
@@ -12,7 +12,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV} | |||
12 | file://0001-connect-has-a-different-signature-on-musl.patch \ | 12 | file://0001-connect-has-a-different-signature-on-musl.patch \ |
13 | " | 13 | " |
14 | 14 | ||
15 | SRC_URI[sha256sum] = "b91114a2fd958f42acf441186e87e2bec93538ef35a9f8248111197360ffb237" | 15 | SRC_URI[sha256sum] = "4fde19c3c144834f8cb05c2ca3f14b3a50d395bad203d17f98a6e70c1672f2ba" |
16 | 16 | ||
17 | DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base" | 17 | DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base" |
18 | RRECOMMENDS:${PN} = "git" | 18 | RRECOMMENDS:${PN} = "git" |
@@ -37,6 +37,7 @@ EXTRA_OEMESON += " \ | |||
37 | -Ddoc=disabled \ | 37 | -Ddoc=disabled \ |
38 | -Ddebug_viewer=disabled \ | 38 | -Ddebug_viewer=disabled \ |
39 | -Dtests=disabled \ | 39 | -Dtests=disabled \ |
40 | -Ddots_viewer=disabled \ | ||
40 | -Dvalidate=enabled \ | 41 | -Dvalidate=enabled \ |
41 | ${@gettext_oemeson(d)} \ | 42 | ${@gettext_oemeson(d)} \ |
42 | " | 43 | " |
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch index ab93c13244..828c87dc9a 100644 --- a/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch +++ b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch | |||
@@ -13,25 +13,25 @@ https://bugzilla.gnome.org/show_bug.cgi?id=777827 | |||
13 | playback/player/gtk/meson.build | 1 + | 13 | playback/player/gtk/meson.build | 1 + |
14 | 2 files changed, 2 insertions(+) | 14 | 2 files changed, 2 insertions(+) |
15 | 15 | ||
16 | diff --git a/playback/player/gst-play/meson.build b/playback/player/gst-play/meson.build | 16 | Index: gst-examples/playback/player/gst-play/meson.build |
17 | index 8ec021d..977cc5c 100644 | 17 | =================================================================== |
18 | --- a/playback/player/gst-play/meson.build | 18 | --- gst-examples.orig/playback/player/gst-play/meson.build |
19 | +++ b/playback/player/gst-play/meson.build | 19 | +++ gst-examples/playback/player/gst-play/meson.build |
20 | @@ -2,5 +2,6 @@ executable('gst-play', | 20 | @@ -2,5 +2,6 @@ executable('gst-play', |
21 | ['gst-play.c', | 21 | ['gst-play.c', |
22 | 'gst-play-kb.c', | 22 | 'gst-play-kb.c', |
23 | 'gst-play-kb.h'], | 23 | 'gst-play-kb.h'], |
24 | + install: true, | 24 | + install: true, |
25 | dependencies : [gst_dep, gstplayer_dep, m_dep]) | 25 | dependencies : [gst_dep, dependency('gstreamer-play-1.0'), m_dep]) |
26 | 26 | ||
27 | diff --git a/playback/player/gtk/meson.build b/playback/player/gtk/meson.build | 27 | Index: gst-examples/playback/player/gtk/meson.build |
28 | index f7a7419..6281130 100644 | 28 | =================================================================== |
29 | --- a/playback/player/gtk/meson.build | 29 | --- gst-examples.orig/playback/player/gtk/meson.build |
30 | +++ b/playback/player/gtk/meson.build | 30 | +++ gst-examples/playback/player/gtk/meson.build |
31 | @@ -13,5 +13,6 @@ if gtk_dep.found() | 31 | @@ -20,5 +20,6 @@ if gtk_dep.found() |
32 | gtk_play_resources, | ||
33 | 'gtk-video-renderer.h', | 32 | 'gtk-video-renderer.h', |
34 | 'gtk-video-renderer.c'], | 33 | 'gtk-video-renderer.c'], |
35 | + install: true, | 34 | c_args : extra_c_args, |
36 | dependencies : [glib_dep, gobject_dep, gmodule_dep, gst_dep, gsttag_dep, gstplayer_dep, gtk_dep, x11_dep]) | 35 | + install: true, |
36 | dependencies : [gst_dep, gsttag_dep, gstplay_dep, gtk_dep, x11_dep]) | ||
37 | endif | 37 | endif |
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb b/meta/recipes-multimedia/gstreamer/gst-examples_1.26.3.bb index 70b72fd7fb..8835b7d97b 100644 --- a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb +++ b/meta/recipes-multimedia/gstreamer/gst-examples_1.26.3.bb | |||
@@ -5,20 +5,20 @@ BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues" | |||
5 | LICENSE = "LGPL-2.0-or-later" | 5 | LICENSE = "LGPL-2.0-or-later" |
6 | LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9" | 6 | LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9" |
7 | 7 | ||
8 | DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 libsoup-2.4 json-glib glib-2.0-native" | 8 | DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 json-glib glib-2.0-native" |
9 | 9 | ||
10 | SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=https;branch=1.18 \ | 10 | SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gstreamer.git;protocol=https;branch=1.26;tag=${PV} \ |
11 | file://0001-Make-player-examples-installable.patch \ | 11 | file://0001-Make-player-examples-installable.patch \ |
12 | file://gst-player.desktop \ | 12 | file://gst-player.desktop \ |
13 | " | 13 | " |
14 | 14 | ||
15 | SRCREV = "70e4fcf4fc8ae19641aa990de5f37d758cdfcea4" | 15 | SRCREV = "87bc0c6e949e3dcc440658f78ef52aa8088cb62f" |
16 | 16 | ||
17 | S = "${WORKDIR}/git" | 17 | S = "${UNPACKDIR}/${BP}/subprojects/gst-examples" |
18 | 18 | ||
19 | inherit meson pkgconfig features_check | 19 | inherit meson pkgconfig features_check |
20 | 20 | ||
21 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)" | 21 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)" |
22 | 22 | ||
23 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | 23 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |
24 | 24 | ||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.26.3.bb index d468f2983c..4125fdf31f 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.26.3.bb | |||
@@ -12,9 +12,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \ | |||
12 | " | 12 | " |
13 | 13 | ||
14 | SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz" | 14 | SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz" |
15 | SRC_URI[sha256sum] = "d9c5b152468a45c1fa8351410422090a7192707ad74d2e1a4367f5254e188d91" | 15 | SRC_URI[sha256sum] = "3ada7e50a3b9b8ba3e405b14c4021e25fbb10379f77d2ce490aa16523ed2724d" |
16 | 16 | ||
17 | S = "${WORKDIR}/gst-libav-${PV}" | 17 | S = "${UNPACKDIR}/gst-libav-${PV}" |
18 | 18 | ||
19 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg" | 19 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg" |
20 | 20 | ||
@@ -22,6 +22,7 @@ inherit meson pkgconfig upstream-version-is-even | |||
22 | 22 | ||
23 | EXTRA_OEMESON += " \ | 23 | EXTRA_OEMESON += " \ |
24 | -Dtests=disabled \ | 24 | -Dtests=disabled \ |
25 | -Ddoc=disabled \ | ||
25 | " | 26 | " |
26 | 27 | ||
27 | FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" | 28 | FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" |
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb index 6cc11e1928..dcb5c0e6b5 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb | |||
@@ -7,8 +7,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
7 | inherit packagegroup | 7 | inherit packagegroup |
8 | 8 | ||
9 | COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}" | 9 | COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}" |
10 | DEPENDS_UGLY="${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}" | 10 | DEPENDS_UGLY = "${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}" |
11 | DEPENDS_BAD="${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}" | 11 | DEPENDS_BAD = "${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}" |
12 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}" | 12 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}" |
13 | 13 | ||
14 | PACKAGES = "\ | 14 | PACKAGES = "\ |
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 13a481485a..4dd9febbf6 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 @@ | |||
1 | From bb7f964d51de6b888b3b7a6d0c3d260fcad24008 Mon Sep 17 00:00:00 2001 | 1 | From 9456674cea4a933d5fbc24230d307fe0f52588f3 Mon Sep 17 00:00:00 2001 |
2 | From: Andre McCurdy <armccurdy@gmail.com> | 2 | From: Andre McCurdy <armccurdy@gmail.com> |
3 | Date: Tue, 26 Jan 2016 15:16:01 -0800 | 3 | Date: Tue, 26 Jan 2016 15:16:01 -0800 |
4 | Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os | 4 | 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 298337cb0a..e6ae7f4bfe 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 @@ | |||
1 | From 25efc5b2d22aed4527470ef93970664b210bf8c5 Mon Sep 17 00:00:00 2001 | 1 | From dd2b92fb70fed2799809c423fea79221a3e17108 Mon Sep 17 00:00:00 2001 |
2 | From: Andre McCurdy <armccurdy@gmail.com> | 2 | From: Andre McCurdy <armccurdy@gmail.com> |
3 | Date: Wed, 3 Feb 2016 18:05:41 -0800 | 3 | Date: Wed, 3 Feb 2016 18:05:41 -0800 |
4 | Subject: [PATCH] avoid including <sys/poll.h> directly | 4 | Subject: [PATCH] avoid including <sys/poll.h> directly |
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 965053348f..d49cf5bd89 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 @@ | |||
1 | From 39fbcdfc5383bdae95293a3109c847f64d193b54 Mon Sep 17 00:00:00 2001 | 1 | From 11a08e3f3135b649b68714c77670c37559f3a33c Mon Sep 17 00:00:00 2001 |
2 | From: Andrey Zhizhikin <andrey.z@gmail.com> | 2 | From: Andrey Zhizhikin <andrey.z@gmail.com> |
3 | Date: Mon, 27 Jan 2020 10:22:35 +0000 | 3 | Date: Mon, 27 Jan 2020 10:22:35 +0000 |
4 | Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build | 4 | Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build |
@@ -17,16 +17,16 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | |||
17 | 1 file changed, 3 insertions(+) | 17 | 1 file changed, 3 insertions(+) |
18 | 18 | ||
19 | diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build | 19 | diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build |
20 | index 1d337f1..f47939a 100644 | 20 | index 64e913e..42a0958 100644 |
21 | --- a/gst-libs/gst/opencv/meson.build | 21 | --- a/gst-libs/gst/opencv/meson.build |
22 | +++ b/gst-libs/gst/opencv/meson.build | 22 | +++ b/gst-libs/gst/opencv/meson.build |
23 | @@ -52,6 +52,9 @@ if opencv_found | 23 | @@ -61,6 +61,9 @@ gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"'] |
24 | # /usr/include/opencv4/opencv2/flann/logger.h:83:36: error: format string is not a string literal [-Werror,-Wformat-nonliteral] | 24 | # /usr/include/opencv4/opencv2/flann/logger.h:83:36: error: format string is not a string literal [-Werror,-Wformat-nonliteral] |
25 | gstopencv_cargs += cxx.get_supported_arguments(['-Wno-missing-include-dirs', '-Wno-format-nonliteral']) | 25 | gstopencv_cargs += cxx.get_supported_arguments(['-Wno-missing-include-dirs', '-Wno-format-nonliteral']) |
26 | 26 | ||
27 | + pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() | 27 | +pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() |
28 | + opencv_prefix = pkgconf_sysroot + opencv_prefix | 28 | +opencv_prefix = pkgconf_sysroot + opencv_prefix |
29 | + | 29 | + |
30 | # Check the data dir used by opencv for its xml data files | 30 | # Check the data dir used by opencv for its xml data files |
31 | # Use prefix from pkg-config to be compatible with cross-compilation | 31 | # Use prefix from pkg-config to be compatible with cross-compilation |
32 | r = run_command('test', '-d', opencv_prefix + '/share/opencv', check: false) | 32 | fsmod = import('fs') |
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.26.3.bb index dbd504e87d..12992057e7 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.26.3.bb | |||
@@ -10,9 +10,9 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad | |||
10 | file://0002-avoid-including-sys-poll.h-directly.patch \ | 10 | file://0002-avoid-including-sys-poll.h-directly.patch \ |
11 | file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \ | 11 | file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \ |
12 | " | 12 | " |
13 | SRC_URI[sha256sum] = "e90f26c7dc9c76f4aa599b758cfd6d8c10d6a0b9cb265ba2c3c9bdf3888558f8" | 13 | SRC_URI[sha256sum] = "95c48dacaf14276f4e595f4cbca94b3cfebfc22285e765e2aa56d0a7275d7561" |
14 | 14 | ||
15 | S = "${WORKDIR}/gst-plugins-bad-${PV}" | 15 | S = "${UNPACKDIR}/gst-plugins-bad-${PV}" |
16 | 16 | ||
17 | LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later" | 17 | LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later" |
18 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | 18 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
@@ -28,10 +28,11 @@ PACKAGECONFIG ??= " \ | |||
28 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ | 28 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ |
29 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ | 29 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ |
30 | bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \ | 30 | bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \ |
31 | sndfile ttml uvch264 webp \ | 31 | sndfile ttml uvch264 webp analytics \ |
32 | ${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \ | 32 | ${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \ |
33 | " | 33 | " |
34 | 34 | ||
35 | PACKAGECONFIG[analytics] = "-Danalyticsoverlay=enabled,-Danalyticsoverlay=disabled," | ||
35 | PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom" | 36 | PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom" |
36 | PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass" | 37 | PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass" |
37 | PACKAGECONFIG[avtp] = "-Davtp=enabled,-Davtp=disabled,libavtp" | 38 | PACKAGECONFIG[avtp] = "-Davtp=enabled,-Davtp=disabled,libavtp" |
@@ -46,6 +47,7 @@ PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl" | |||
46 | PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac" | 47 | PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac" |
47 | PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2" | 48 | PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2" |
48 | PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" | 49 | PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" |
50 | PACKAGECONFIG[gtk3] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk3+" | ||
49 | PACKAGECONFIG[hls] = "-Dhls=enabled,-Dhls=disabled," | 51 | PACKAGECONFIG[hls] = "-Dhls=enabled,-Dhls=disabled," |
50 | # Pick atleast one crypto backend below when enabling hls | 52 | # Pick atleast one crypto backend below when enabling hls |
51 | PACKAGECONFIG[nettle] = "-Dhls-crypto=nettle,,nettle" | 53 | PACKAGECONFIG[nettle] = "-Dhls-crypto=nettle,,nettle" |
@@ -151,6 +153,16 @@ EXTRA_OEMESON += " \ | |||
151 | -Dwinscreencap=disabled \ | 153 | -Dwinscreencap=disabled \ |
152 | -Dwpe=disabled \ | 154 | -Dwpe=disabled \ |
153 | -Dzxing=disabled \ | 155 | -Dzxing=disabled \ |
156 | -Dlcevcdecoder=disabled \ | ||
157 | -Dlcevcencoder=disabled \ | ||
158 | -Dtensordecoders=disabled \ | ||
159 | -Dnvcomp=disabled \ | ||
160 | -Dnvdswrapper=disabled \ | ||
161 | -Dsvtjpegxs=disabled \ | ||
162 | -Dwebview2=disabled \ | ||
163 | -Daja=disabled \ | ||
164 | -Dcuda-nvmm=disabled \ | ||
165 | -Dd3d12=disabled \ | ||
154 | " | 166 | " |
155 | 167 | ||
156 | export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" | 168 | export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" |
@@ -158,6 +170,8 @@ export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" | |||
158 | ARM_INSTRUCTION_SET:armv4 = "arm" | 170 | ARM_INSTRUCTION_SET:armv4 = "arm" |
159 | ARM_INSTRUCTION_SET:armv5 = "arm" | 171 | ARM_INSTRUCTION_SET:armv5 = "arm" |
160 | 172 | ||
173 | CVE_PRODUCT = "gst-plugins-bad" | ||
174 | |||
161 | FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs" | 175 | FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs" |
162 | FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" | 176 | FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" |
163 | FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles" | 177 | FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles" |
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 38d0fbf6bf..7373bd3e26 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,4 +1,4 @@ | |||
1 | From 5a4d65e13a326103ac02f156c01b6fcbb0269902 Mon Sep 17 00:00:00 2001 | 1 | From bd1436f0027bb09cdcf90386910a497422d9a871 Mon Sep 17 00:00:00 2001 |
2 | From: zhouming <b42586@freescale.com> | 2 | From: zhouming <b42586@freescale.com> |
3 | Date: Wed, 14 May 2014 10:16:20 +0800 | 3 | Date: Wed, 14 May 2014 10:16:20 +0800 |
4 | Subject: [PATCH] ENGR00312515: get caps from src pad when query caps | 4 | Subject: [PATCH] ENGR00312515: get caps from src pad when query caps |
@@ -16,7 +16,7 @@ Signed-off-by: zhouming <b42586@freescale.com> | |||
16 | diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c | 16 | diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c |
17 | old mode 100644 | 17 | old mode 100644 |
18 | new mode 100755 | 18 | new mode 100755 |
19 | index ef0ff90..53f05c8 | 19 | index 975fe83..df82840 |
20 | --- a/gst-libs/gst/tag/gsttagdemux.c | 20 | --- a/gst-libs/gst/tag/gsttagdemux.c |
21 | +++ b/gst-libs/gst/tag/gsttagdemux.c | 21 | +++ b/gst-libs/gst/tag/gsttagdemux.c |
22 | @@ -1796,6 +1796,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) | 22 | @@ -1796,6 +1796,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) |
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 4090b77c8d..fc9ad474d9 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,4 +1,4 @@ | |||
1 | From 21b8339077f52ec9220e0d3d1f3872e23c7c2e88 Mon Sep 17 00:00:00 2001 | 1 | From 1cc876662b7707eb5a2f668654f7921b5642e108 Mon Sep 17 00:00:00 2001 |
2 | From: Mingke Wang <mingke.wang@freescale.com> | 2 | From: Mingke Wang <mingke.wang@freescale.com> |
3 | Date: Thu, 19 Mar 2015 14:17:10 +0800 | 3 | Date: Thu, 19 Mar 2015 14:17:10 +0800 |
4 | Subject: [PATCH] ssaparse: enhance SSA text lines parsing. | 4 | Subject: [PATCH] ssaparse: enhance SSA text lines parsing. |
@@ -17,10 +17,10 @@ Signed-off-by: Mingke Wang <mingke.wang@freescale.com> | |||
17 | diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c | 17 | diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c |
18 | old mode 100644 | 18 | old mode 100644 |
19 | new mode 100755 | 19 | new mode 100755 |
20 | index 42fbb42..2dab51c | 20 | index c162a54..bd8afd9 |
21 | --- a/gst/subparse/gstssaparse.c | 21 | --- a/gst/subparse/gstssaparse.c |
22 | +++ b/gst/subparse/gstssaparse.c | 22 | +++ b/gst/subparse/gstssaparse.c |
23 | @@ -270,6 +270,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) | 23 | @@ -304,6 +304,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) |
24 | * gst_ssa_parse_push_line: | 24 | * gst_ssa_parse_push_line: |
25 | * @parse: caller element | 25 | * @parse: caller element |
26 | * @txt: text to push | 26 | * @txt: text to push |
@@ -28,7 +28,7 @@ index 42fbb42..2dab51c | |||
28 | * @start: timestamp for the buffer | 28 | * @start: timestamp for the buffer |
29 | * @duration: duration for the buffer | 29 | * @duration: duration for the buffer |
30 | * | 30 | * |
31 | @@ -279,27 +280,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) | 31 | @@ -313,27 +314,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) |
32 | * Returns: result of the push of the created buffer | 32 | * Returns: result of the push of the created buffer |
33 | */ | 33 | */ |
34 | static GstFlowReturn | 34 | static GstFlowReturn |
@@ -173,7 +173,7 @@ index 42fbb42..2dab51c | |||
173 | GST_LOG_OBJECT (parse, "Text : %s", t); | 173 | GST_LOG_OBJECT (parse, "Text : %s", t); |
174 | 174 | ||
175 | if (gst_ssa_parse_remove_override_codes (parse, t)) { | 175 | if (gst_ssa_parse_remove_override_codes (parse, t)) { |
176 | @@ -317,13 +424,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, | 176 | @@ -351,13 +458,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, |
177 | gst_buffer_fill (buf, 0, escaped, len + 1); | 177 | gst_buffer_fill (buf, 0, escaped, len + 1); |
178 | gst_buffer_set_size (buf, len); | 178 | gst_buffer_set_size (buf, len); |
179 | g_free (escaped); | 179 | g_free (escaped); |
@@ -200,7 +200,7 @@ index 42fbb42..2dab51c | |||
200 | 200 | ||
201 | ret = gst_pad_push (parse->srcpad, buf); | 201 | ret = gst_pad_push (parse->srcpad, buf); |
202 | 202 | ||
203 | @@ -343,6 +459,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) | 203 | @@ -377,6 +493,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) |
204 | GstClockTime ts; | 204 | GstClockTime ts; |
205 | gchar *txt; | 205 | gchar *txt; |
206 | GstMapInfo map; | 206 | GstMapInfo map; |
@@ -208,7 +208,7 @@ index 42fbb42..2dab51c | |||
208 | 208 | ||
209 | if (G_UNLIKELY (!parse->framed)) | 209 | if (G_UNLIKELY (!parse->framed)) |
210 | goto not_framed; | 210 | goto not_framed; |
211 | @@ -360,13 +477,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) | 211 | @@ -394,13 +511,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) |
212 | /* make double-sure it's 0-terminated and all */ | 212 | /* make double-sure it's 0-terminated and all */ |
213 | gst_buffer_map (buf, &map, GST_MAP_READ); | 213 | gst_buffer_map (buf, &map, GST_MAP_READ); |
214 | txt = g_strndup ((gchar *) map.data, map.size); | 214 | txt = g_strndup ((gchar *) map.data, map.size); |
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 ab46ecee5d..06b5bc41ed 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,4 +1,4 @@ | |||
1 | From 246e6f5ed75696b2e9d9a9ee8cd59252724e1334 Mon Sep 17 00:00:00 2001 | 1 | From c0c6944eca0c497477aa9f2cec2c83c4ea7a70e5 Mon Sep 17 00:00:00 2001 |
2 | From: Carlos Rafael Giani <crg7475@mailbox.org> | 2 | From: Carlos Rafael Giani <crg7475@mailbox.org> |
3 | Date: Tue, 21 May 2019 14:01:11 +0200 | 3 | Date: Tue, 21 May 2019 14:01:11 +0200 |
4 | Subject: [PATCH] viv-fb: Make sure config.h is included | 4 | Subject: [PATCH] viv-fb: Make sure config.h is included |
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.26.3.bb index 8a967cf6eb..74eb1360f6 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.26.3.bb | |||
@@ -11,9 +11,9 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-ba | |||
11 | file://0003-viv-fb-Make-sure-config.h-is-included.patch \ | 11 | file://0003-viv-fb-Make-sure-config.h-is-included.patch \ |
12 | file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ | 12 | file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ |
13 | " | 13 | " |
14 | SRC_URI[sha256sum] = "f1094397eaa7932f06e57ebbb075aa33aa2c76e4b75630a16b02c8d4af46832e" | 14 | SRC_URI[sha256sum] = "4ef9f9ef09025308ce220e2dd22a89e4c992d8ca71b968e3c70af0634ec27933" |
15 | 15 | ||
16 | S = "${WORKDIR}/gst-plugins-base-${PV}" | 16 | S = "${UNPACKDIR}/gst-plugins-base-${PV}" |
17 | 17 | ||
18 | DEPENDS += "iso-codes util-linux zlib" | 18 | DEPENDS += "iso-codes util-linux zlib" |
19 | 19 | ||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.3.bb index 41a93e85a4..601a7961c7 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26.3.bb | |||
@@ -6,9 +6,9 @@ BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues | |||
6 | 6 | ||
7 | SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz" | 7 | SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz" |
8 | 8 | ||
9 | SRC_URI[sha256sum] = "150f914e61dc05600b68b88ca103c7cc227130158e389ea9ea159f4050a2ebb0" | 9 | SRC_URI[sha256sum] = "fe4ec9670edfe6bb1e5f27169ae145b5ac2dd218ac98bd8251c8fba41ad33c53" |
10 | 10 | ||
11 | S = "${WORKDIR}/gst-plugins-good-${PV}" | 11 | S = "${UNPACKDIR}/gst-plugins-good-${PV}" |
12 | 12 | ||
13 | LICENSE = "LGPL-2.1-or-later" | 13 | LICENSE = "LGPL-2.1-or-later" |
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ |
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.26.3.bb index 533de0234f..cc3da89556 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.26.3.bb | |||
@@ -15,9 +15,9 @@ SRC_URI = " \ | |||
15 | https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ | 15 | https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ |
16 | " | 16 | " |
17 | 17 | ||
18 | SRC_URI[sha256sum] = "4c951341c4c648630b6fe1234ec113d81dd2d248529bf2b5478e0ad077c80ed3" | 18 | SRC_URI[sha256sum] = "417f5ee895f734ac0341b3719c175fff16b4c8eae8806e29e170b3bcb3d9dba5" |
19 | 19 | ||
20 | S = "${WORKDIR}/gst-plugins-ugly-${PV}" | 20 | S = "${UNPACKDIR}/gst-plugins-ugly-${PV}" |
21 | 21 | ||
22 | DEPENDS += "gstreamer1.0-plugins-base" | 22 | DEPENDS += "gstreamer1.0-plugins-base" |
23 | 23 | ||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.26.3.bb index 5fbf860741..1f80063a0b 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.26.3.bb | |||
@@ -8,14 +8,14 @@ LICENSE = "LGPL-2.1-or-later" | |||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740" |
9 | 9 | ||
10 | SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" | 10 | SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" |
11 | SRC_URI[sha256sum] = "ecdb3e2ba94ea2c82b93a8c715d5a7e04f9726a8838c0a6b17694928fd1e8595" | 11 | SRC_URI[sha256sum] = "9343b9a7c45f472498c24ddb6fea9aba5f1a24395ddbc0b79da6e485e42d1b12" |
12 | 12 | ||
13 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" | 13 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject gstreamer1.0-plugins-bad" |
14 | RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" | 14 | RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" |
15 | 15 | ||
16 | PNREAL = "gst-python" | 16 | PNREAL = "gst-python" |
17 | 17 | ||
18 | S = "${WORKDIR}/${PNREAL}-${PV}" | 18 | S = "${UNPACKDIR}/${PNREAL}-${PV}" |
19 | 19 | ||
20 | EXTRA_OEMESON += "\ | 20 | EXTRA_OEMESON += "\ |
21 | -Dtests=disabled \ | 21 | -Dtests=disabled \ |
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.26.3.bb index f63d61b2c9..7ee7a1f07f 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.26.3.bb | |||
@@ -10,9 +10,9 @@ PNREAL = "gst-rtsp-server" | |||
10 | 10 | ||
11 | SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" | 11 | SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" |
12 | 12 | ||
13 | SRC_URI[sha256sum] = "62628ecca78b8f5b51c59a4d602c65e9205ffc50c3c83cd61fab1f6348b63565" | 13 | SRC_URI[sha256sum] = "415e8a53a9844789770dd4f116ac2e3a4a33de42673c57acc25c5ba0f4406fc5" |
14 | 14 | ||
15 | S = "${WORKDIR}/${PNREAL}-${PV}" | 15 | S = "${UNPACKDIR}/${PNREAL}-${PV}" |
16 | 16 | ||
17 | inherit meson pkgconfig upstream-version-is-even gobject-introspection | 17 | inherit meson pkgconfig upstream-version-is-even gobject-introspection |
18 | 18 | ||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.3.bb index 8ddfe15de9..98eba8bcdb 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.3.bb | |||
@@ -11,9 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" | |||
11 | 11 | ||
12 | SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz" | 12 | SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz" |
13 | 13 | ||
14 | SRC_URI[sha256sum] = "845f2efe0dca8dab234dde8fb091da2cd06a9d2a683422b56dcb688954f9070e" | 14 | SRC_URI[sha256sum] = "2d643fbd1420297da5a4d6945d11f0a5b4f82feea54ea6aec9368d42995d8b03" |
15 | 15 | ||
16 | S = "${WORKDIR}/${REALPN}-${PV}" | 16 | S = "${UNPACKDIR}/${REALPN}-${PV}" |
17 | DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" | 17 | DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" |
18 | 18 | ||
19 | inherit meson pkgconfig features_check upstream-version-is-even | 19 | inherit meson pkgconfig features_check upstream-version-is-even |
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 a190370c16..5db93c5be1 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,4 +1,4 @@ | |||
1 | From 381f50a27766c425af36a7203061716497e6603f Mon Sep 17 00:00:00 2001 | 1 | From cb49c5433f343aa9ae6c0656d2e835365330922b Mon Sep 17 00:00:00 2001 |
2 | From: Jose Quaresma <quaresma.jose@gmail.com> | 2 | From: Jose Quaresma <quaresma.jose@gmail.com> |
3 | Date: Sun, 11 Apr 2021 19:48:13 +0100 | 3 | Date: Sun, 11 Apr 2021 19:48:13 +0100 |
4 | Subject: [PATCH] tests: respect the idententaion used in meson | 4 | Subject: [PATCH] tests: respect the idententaion used in meson |
@@ -11,10 +11,10 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | |||
11 | 1 file changed, 5 insertions(+), 5 deletions(-) | 11 | 1 file changed, 5 insertions(+), 5 deletions(-) |
12 | 12 | ||
13 | diff --git a/tests/check/meson.build b/tests/check/meson.build | 13 | diff --git a/tests/check/meson.build b/tests/check/meson.build |
14 | index 6540279..e9501fe 100644 | 14 | index e8419fc..4cc4618 100644 |
15 | --- a/tests/check/meson.build | 15 | --- a/tests/check/meson.build |
16 | +++ b/tests/check/meson.build | 16 | +++ b/tests/check/meson.build |
17 | @@ -146,11 +146,11 @@ foreach t : core_tests | 17 | @@ -149,11 +149,11 @@ foreach t : core_tests |
18 | 18 | ||
19 | if not skip_test | 19 | if not skip_test |
20 | exe = executable(test_name, fname, | 20 | exe = executable(test_name, fname, |
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 a990940cc6..ba8e410669 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,4 +1,4 @@ | |||
1 | From 31dea17a1d5de0003719a875a1089df43a50219a Mon Sep 17 00:00:00 2001 | 1 | From bfb530d2f0761f28c2645e2c45de5147b0528e4d Mon Sep 17 00:00:00 2001 |
2 | From: Jose Quaresma <quaresma.jose@gmail.com> | 2 | From: Jose Quaresma <quaresma.jose@gmail.com> |
3 | Date: Sun, 11 Apr 2021 19:48:13 +0100 | 3 | Date: Sun, 11 Apr 2021 19:48:13 +0100 |
4 | Subject: [PATCH] tests: add support for install the tests | 4 | Subject: [PATCH] tests: add support for install the tests |
@@ -19,10 +19,10 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | |||
19 | create mode 100644 tests/check/template.test.in | 19 | create mode 100644 tests/check/template.test.in |
20 | 20 | ||
21 | diff --git a/meson.build b/meson.build | 21 | diff --git a/meson.build b/meson.build |
22 | index efcf189..c97d9a8 100644 | 22 | index ba50005..09c7212 100644 |
23 | --- a/meson.build | 23 | --- a/meson.build |
24 | +++ b/meson.build | 24 | +++ b/meson.build |
25 | @@ -624,6 +624,10 @@ if bashcomp_dep.found() | 25 | @@ -664,6 +664,10 @@ if bashcomp_dep.found() |
26 | endif | 26 | endif |
27 | endif | 27 | endif |
28 | 28 | ||
@@ -34,7 +34,7 @@ index efcf189..c97d9a8 100644 | |||
34 | 34 | ||
35 | pkgconfig = import('pkgconfig') | 35 | pkgconfig = import('pkgconfig') |
36 | diff --git a/meson_options.txt b/meson_options.txt | 36 | diff --git a/meson_options.txt b/meson_options.txt |
37 | index 340fb58..5b87f68 100644 | 37 | index 39255cf..78af552 100644 |
38 | --- a/meson_options.txt | 38 | --- a/meson_options.txt |
39 | +++ b/meson_options.txt | 39 | +++ b/meson_options.txt |
40 | @@ -16,6 +16,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso | 40 | @@ -16,6 +16,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso |
@@ -46,10 +46,10 @@ index 340fb58..5b87f68 100644 | |||
46 | # Feature options | 46 | # Feature options |
47 | option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') | 47 | option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') |
48 | diff --git a/tests/check/meson.build b/tests/check/meson.build | 48 | diff --git a/tests/check/meson.build b/tests/check/meson.build |
49 | index e9501fe..08f8fd8 100644 | 49 | index 4cc4618..f290e2e 100644 |
50 | --- a/tests/check/meson.build | 50 | --- a/tests/check/meson.build |
51 | +++ b/tests/check/meson.build | 51 | +++ b/tests/check/meson.build |
52 | @@ -125,10 +125,16 @@ test_defines = [ | 52 | @@ -128,10 +128,16 @@ test_defines = [ |
53 | '-UG_DISABLE_ASSERT', | 53 | '-UG_DISABLE_ASSERT', |
54 | '-UG_DISABLE_CAST_CHECKS', | 54 | '-UG_DISABLE_CAST_CHECKS', |
55 | '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', | 55 | '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', |
@@ -67,7 +67,7 @@ index e9501fe..08f8fd8 100644 | |||
67 | # sanity checking | 67 | # sanity checking |
68 | if get_option('check').disabled() | 68 | if get_option('check').disabled() |
69 | if get_option('tests').enabled() | 69 | if get_option('tests').enabled() |
70 | @@ -151,6 +157,8 @@ foreach t : core_tests | 70 | @@ -154,6 +160,8 @@ foreach t : core_tests |
71 | include_directories : [configinc], | 71 | include_directories : [configinc], |
72 | link_with : link_with_libs, | 72 | link_with : link_with_libs, |
73 | dependencies : gst_deps + test_deps, | 73 | dependencies : gst_deps + test_deps, |
@@ -76,7 +76,7 @@ index e9501fe..08f8fd8 100644 | |||
76 | ) | 76 | ) |
77 | 77 | ||
78 | env = environment() | 78 | env = environment() |
79 | @@ -162,6 +170,18 @@ foreach t : core_tests | 79 | @@ -165,6 +173,18 @@ foreach t : core_tests |
80 | env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') | 80 | env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') |
81 | env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') | 81 | env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') |
82 | 82 | ||
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 27623bf96b..79e494a22a 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,4 +1,4 @@ | |||
1 | From 453865e8938c5f50f14409b67246bbbd801fa44d Mon Sep 17 00:00:00 2001 | 1 | From d24110809da4588354ad3df4ae99556e8c62838a Mon Sep 17 00:00:00 2001 |
2 | From: Jose Quaresma <quaresma.jose@gmail.com> | 2 | From: Jose Quaresma <quaresma.jose@gmail.com> |
3 | Date: Sat, 24 Apr 2021 10:34:47 +0100 | 3 | Date: Sat, 24 Apr 2021 10:34:47 +0100 |
4 | Subject: [PATCH] tests: use a dictionaries for environment | 4 | Subject: [PATCH] tests: use a dictionaries for environment |
@@ -14,10 +14,10 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | |||
14 | 1 file changed, 13 insertions(+), 8 deletions(-) | 14 | 1 file changed, 13 insertions(+), 8 deletions(-) |
15 | 15 | ||
16 | diff --git a/tests/check/meson.build b/tests/check/meson.build | 16 | diff --git a/tests/check/meson.build b/tests/check/meson.build |
17 | index 08f8fd8..330abaa 100644 | 17 | index f290e2e..a3ffcb6 100644 |
18 | --- a/tests/check/meson.build | 18 | --- a/tests/check/meson.build |
19 | +++ b/tests/check/meson.build | 19 | +++ b/tests/check/meson.build |
20 | @@ -161,14 +161,19 @@ foreach t : core_tests | 20 | @@ -164,14 +164,19 @@ foreach t : core_tests |
21 | install: installed_tests_enabled, | 21 | install: installed_tests_enabled, |
22 | ) | 22 | ) |
23 | 23 | ||
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 97b056072d..4b1aad2616 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,4 +1,4 @@ | |||
1 | From 506ff13a044439a170f770b6663a64c942ae0a05 Mon Sep 17 00:00:00 2001 | 1 | From 3b9ae399b57cfb6e332fac6a90997a3abd33c819 Mon Sep 17 00:00:00 2001 |
2 | From: Jose Quaresma <quaresma.jose@gmail.com> | 2 | From: Jose Quaresma <quaresma.jose@gmail.com> |
3 | Date: Sun, 2 May 2021 01:58:01 +0100 | 3 | Date: Sun, 2 May 2021 01:58:01 +0100 |
4 | Subject: [PATCH] tests: add helper script to run the installed_tests | 4 | Subject: [PATCH] tests: add helper script to run the installed_tests |
@@ -18,10 +18,10 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | |||
18 | create mode 100755 tests/check/template.sh.in | 18 | create mode 100755 tests/check/template.sh.in |
19 | 19 | ||
20 | diff --git a/tests/check/meson.build b/tests/check/meson.build | 20 | diff --git a/tests/check/meson.build b/tests/check/meson.build |
21 | index 330abaa..5d383b1 100644 | 21 | index a3ffcb6..b907dcf 100644 |
22 | --- a/tests/check/meson.build | 22 | --- a/tests/check/meson.build |
23 | +++ b/tests/check/meson.build | 23 | +++ b/tests/check/meson.build |
24 | @@ -185,6 +185,23 @@ foreach t : core_tests | 24 | @@ -188,6 +188,23 @@ foreach t : core_tests |
25 | install_dir: installed_tests_metadir, | 25 | install_dir: installed_tests_metadir, |
26 | configuration: test_conf | 26 | configuration: test_conf |
27 | ) | 27 | ) |
@@ -47,7 +47,7 @@ index 330abaa..5d383b1 100644 | |||
47 | test(test_name, exe, env: env, timeout : 3 * 60) | 47 | test(test_name, exe, env: env, timeout : 3 * 60) |
48 | diff --git a/tests/check/template.sh.in b/tests/check/template.sh.in | 48 | diff --git a/tests/check/template.sh.in b/tests/check/template.sh.in |
49 | new file mode 100755 | 49 | new file mode 100755 |
50 | index 0000000..cf7d31b | 50 | index 0000000..f1318fa |
51 | --- /dev/null | 51 | --- /dev/null |
52 | +++ b/tests/check/template.sh.in | 52 | +++ b/tests/check/template.sh.in |
53 | @@ -0,0 +1,9 @@ | 53 | @@ -0,0 +1,9 @@ |
@@ -59,7 +59,7 @@ index 0000000..cf7d31b | |||
59 | +GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@" | 59 | +GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@" |
60 | +GST_REGISTRY=@GST_REGISTRY@ | 60 | +GST_REGISTRY=@GST_REGISTRY@ |
61 | +GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@" | 61 | +GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@" |
62 | +exec @TEST@ | 62 | +exec @TEST@ "$@" |
63 | diff --git a/tests/check/template.test.in b/tests/check/template.test.in | 63 | diff --git a/tests/check/template.test.in b/tests/check/template.test.in |
64 | index f701627..b74ef6a 100644 | 64 | index f701627..b74ef6a 100644 |
65 | --- a/tests/check/template.test.in | 65 | --- a/tests/check/template.test.in |
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest index ab2df80dcc..44dc350eb3 100755 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest | |||
@@ -16,6 +16,11 @@ GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_functioning" | |||
16 | GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_infinite_seek_50_src_live" | 16 | GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_infinite_seek_50_src_live" |
17 | 17 | ||
18 | # Known unreliable tests as per subprojects/gst-devtools/validate/launcher/testsuites/check.py: | 18 | # Known unreliable tests as per subprojects/gst-devtools/validate/launcher/testsuites/check.py: |
19 | GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE:parser_pull_short_read" | 19 | GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,parser_pull_short_read" |
20 | 20 | ||
21 | gnome-desktop-testing-runner gstreamer | 21 | # These tests are fragile |
22 | # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14884 | ||
23 | # https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3524 | ||
24 | GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,parser_convert_duration,parser_pull_frame_growth,parser_reverse_playback" | ||
25 | |||
26 | gnome-desktop-testing-runner --parallel=4 gstreamer "$@" | ||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.24.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.26.3.bb index cd04ade602..9de76944fb 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.24.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.26.3.bb | |||
@@ -13,7 +13,7 @@ inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection p | |||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \ | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \ |
14 | file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" | 14 | file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" |
15 | 15 | ||
16 | S = "${WORKDIR}/gstreamer-${PV}" | 16 | S = "${UNPACKDIR}/gstreamer-${PV}" |
17 | 17 | ||
18 | SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ | 18 | SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ |
19 | file://run-ptest \ | 19 | file://run-ptest \ |
@@ -22,7 +22,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x | |||
22 | file://0003-tests-use-a-dictionaries-for-environment.patch \ | 22 | file://0003-tests-use-a-dictionaries-for-environment.patch \ |
23 | file://0004-tests-add-helper-script-to-run-the-installed_tests.patch \ | 23 | file://0004-tests-add-helper-script-to-run-the-installed_tests.patch \ |
24 | " | 24 | " |
25 | SRC_URI[sha256sum] = "1225ef4a329fae1cadc5ec727dab249ad567e8072879493561ceb91ed34aa414" | 25 | SRC_URI[sha256sum] = "dc661603221293dccc740862425eb54fbbed60fb29d08c801d440a6a3ff82680" |
26 | 26 | ||
27 | PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ | 27 | PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ |
28 | check \ | 28 | check \ |
diff --git a/meta/recipes-multimedia/lame/lame_3.100.bb b/meta/recipes-multimedia/lame/lame_3.100.bb index 5b42795f4e..efaf3b9817 100644 --- a/meta/recipes-multimedia/lame/lame_3.100.bb +++ b/meta/recipes-multimedia/lame/lame_3.100.bb | |||
@@ -14,10 +14,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \ | |||
14 | file://no-gtk1.patch \ | 14 | file://no-gtk1.patch \ |
15 | " | 15 | " |
16 | 16 | ||
17 | SRC_URI[md5sum] = "83e260acbe4389b54fe08e0bdbf7cddb" | ||
18 | SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e" | 17 | SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e" |
19 | 18 | ||
20 | inherit autotools pkgconfig | 19 | inherit autotools pkgconfig sourceforge-releases |
21 | 20 | ||
22 | PACKAGES += "libmp3lame libmp3lame-dev" | 21 | PACKAGES += "libmp3lame libmp3lame-dev" |
23 | FILES:${PN} = "${bindir}/lame" | 22 | FILES:${PN} = "${bindir}/lame" |
diff --git a/meta/recipes-multimedia/libogg/libogg_1.3.5.bb b/meta/recipes-multimedia/libogg/libogg_1.3.5.bb index b4f02e404c..402d700aa1 100644 --- a/meta/recipes-multimedia/libogg/libogg_1.3.5.bb +++ b/meta/recipes-multimedia/libogg/libogg_1.3.5.bb | |||
@@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \ | |||
11 | 11 | ||
12 | SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz" | 12 | SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz" |
13 | 13 | ||
14 | SRC_URI[md5sum] = "3178c98341559657a15b185bf5d700a5" | ||
15 | SRC_URI[sha256sum] = "c4d91be36fc8e54deae7575241e03f4211eb102afb3fc0775fbbc1b740016705" | 14 | SRC_URI[sha256sum] = "c4d91be36fc8e54deae7575241e03f4211eb102afb3fc0775fbbc1b740016705" |
16 | 15 | ||
17 | inherit autotools pkgconfig | 16 | inherit autotools pkgconfig |
diff --git a/meta/recipes-multimedia/libpng/files/run-ptest b/meta/recipes-multimedia/libpng/files/run-ptest new file mode 100644 index 0000000000..85051a59f5 --- /dev/null +++ b/meta/recipes-multimedia/libpng/files/run-ptest | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eux | ||
4 | |||
5 | cd src | ||
6 | |||
7 | make check-TESTS | ||
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.43.bb b/meta/recipes-multimedia/libpng/libpng_1.6.43.bb deleted file mode 100644 index f1febd0a02..0000000000 --- a/meta/recipes-multimedia/libpng/libpng_1.6.43.bb +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | SUMMARY = "PNG image format decoding library" | ||
2 | DESCRIPTION = "An open source project to develop and maintain the reference \ | ||
3 | library for use in applications that read, create, and manipulate PNG \ | ||
4 | (Portable Network Graphics) raster image files. " | ||
5 | HOMEPAGE = "http://www.libpng.org/" | ||
6 | SECTION = "libs" | ||
7 | LICENSE = "Libpng" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0fdbfbe10fc294a6fca24dc76134222a" | ||
9 | DEPENDS = "zlib" | ||
10 | |||
11 | LIBV = "16" | ||
12 | |||
13 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz" | ||
14 | SRC_URI[sha256sum] = "6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c" | ||
15 | |||
16 | MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/" | ||
17 | |||
18 | UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html" | ||
19 | |||
20 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" | ||
21 | |||
22 | inherit autotools binconfig-disabled pkgconfig | ||
23 | |||
24 | # Work around missing symbols | ||
25 | ARMNEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" | ||
26 | ARMNEON:aarch64 = "--enable-hardware-optimizations=on" | ||
27 | EXTRA_OECONF += "${ARMNEON}" | ||
28 | |||
29 | PACKAGES =+ "${PN}-tools" | ||
30 | |||
31 | FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" | ||
32 | |||
33 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.48.bb b/meta/recipes-multimedia/libpng/libpng_1.6.48.bb new file mode 100644 index 0000000000..e603df1edd --- /dev/null +++ b/meta/recipes-multimedia/libpng/libpng_1.6.48.bb | |||
@@ -0,0 +1,71 @@ | |||
1 | SUMMARY = "PNG image format decoding library" | ||
2 | DESCRIPTION = "An open source project to develop and maintain the reference \ | ||
3 | library for use in applications that read, create, and manipulate PNG \ | ||
4 | (Portable Network Graphics) raster image files. " | ||
5 | HOMEPAGE = "http://www.libpng.org/" | ||
6 | SECTION = "libs" | ||
7 | LICENSE = "Libpng" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5516d77a3cf75f55a0d37254e3e65a20" | ||
9 | DEPENDS = "zlib" | ||
10 | |||
11 | LIBV = "16" | ||
12 | |||
13 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz \ | ||
14 | file://run-ptest \ | ||
15 | " | ||
16 | |||
17 | SRC_URI[sha256sum] = "46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03" | ||
18 | |||
19 | MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/" | ||
20 | |||
21 | UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html" | ||
22 | |||
23 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" | ||
24 | |||
25 | inherit autotools binconfig-disabled pkgconfig ptest | ||
26 | |||
27 | # Work around missing symbols | ||
28 | ARMNEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" | ||
29 | ARMNEON:aarch64 = "--enable-hardware-optimizations=on" | ||
30 | EXTRA_OECONF += "${ARMNEON}" | ||
31 | |||
32 | PACKAGES =+ "${PN}-tools" | ||
33 | |||
34 | FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" | ||
35 | |||
36 | RDEPENDS:${PN}-ptest += "make bash gawk" | ||
37 | |||
38 | do_install_ptest() { | ||
39 | # Install test scripts to ptest path | ||
40 | install -d ${D}${PTEST_PATH}/src/tests | ||
41 | install -m 755 ${S}/tests/* ${D}${PTEST_PATH}/src/tests | ||
42 | install -m 755 ${S}/test-driver ${D}${PTEST_PATH} | ||
43 | install -d ${D}${PTEST_PATH}/src/tests/scripts | ||
44 | install -m 755 ${S}/scripts/*.awk ${D}${PTEST_PATH}/src/tests/scripts | ||
45 | install -m 644 ${S}/scripts/pnglib* ${S}/scripts/*.c ${S}/scripts/*.def ${S}/scripts/macro.lst ${D}${PTEST_PATH}/src/tests/scripts | ||
46 | install -m 644 ${S}/scripts/pnglibconf.h.prebuilt ${D}${PTEST_PATH}/src/tests/scripts/pnglibconf.h | ||
47 | install -d ${D}${PTEST_PATH}/src/contrib/tools | ||
48 | install -m 755 ${S}/contrib/tools/*.sh ${D}${PTEST_PATH}/src/contrib/tools | ||
49 | install -m 644 ${S}/contrib/tools/*.c ${S}/contrib/tools/*.h ${D}${PTEST_PATH}/src/contrib/tools | ||
50 | |||
51 | # Install .libs directory binaries to ptest path | ||
52 | install -m 755 ${B}/.libs/pngtest ${B}/.libs/pngstest ${B}/.libs/pngimage ${B}/.libs/pngunknown ${B}/.libs/pngvalid ${D}${PTEST_PATH}/src | ||
53 | |||
54 | # Copy png files to ptest path | ||
55 | cd ${S} && find contrib -name '*.png' | cpio -pd ${D}${PTEST_PATH}/src | ||
56 | |||
57 | # Install Makefile and png files | ||
58 | install -m 644 ${S}/pngtest.png ${D}${PTEST_PATH}/src | ||
59 | install -m 644 ${S}/*.png ${S}/*.h ${S}/*.c ${S}/*.dfa ${B}/pnglibconf.out ${S}/Makefile.am ${S}/Makefile.in ${D}${PTEST_PATH}/src/tests | ||
60 | |||
61 | sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \ | ||
62 | -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \ | ||
63 | -e 's/^srcdir = ..*/srcdir = \./' \ | ||
64 | -e 's/^Makefile: ..*/Makefile: /' \ | ||
65 | -e 's/check-TESTS: $(check_PROGRAMS)/check-TESTS:/g' \ | ||
66 | ${B}/Makefile > ${D}${PTEST_PATH}/src/Makefile | ||
67 | |||
68 | sed -e 's|#!/bin/awk|#!/usr/bin/awk|g' -i ${D}${PTEST_PATH}/src/tests/scripts/*.awk | ||
69 | } | ||
70 | |||
71 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb index 29d48fd333..819096878b 100644 --- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb +++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb | |||
@@ -16,7 +16,7 @@ CVE_PRODUCT = "libsamplerate" | |||
16 | 16 | ||
17 | GITHUB_BASE_URI = "https://github.com/libsndfile/libsamplerate/releases" | 17 | GITHUB_BASE_URI = "https://github.com/libsndfile/libsamplerate/releases" |
18 | 18 | ||
19 | S = "${WORKDIR}/libsamplerate-${PV}" | 19 | S = "${UNPACKDIR}/libsamplerate-${PV}" |
20 | 20 | ||
21 | inherit autotools pkgconfig github-releases | 21 | inherit autotools pkgconfig github-releases |
22 | 22 | ||
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch new file mode 100644 index 0000000000..542a783859 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 0ba5ab2fb7f29a01dbe570c324011e8cffc89d82 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabian Greffrath <fabian@greffrath.com> | ||
3 | Date: Tue, 17 Dec 2024 10:38:47 +0100 | ||
4 | Subject: [PATCH] Include <stdbool.h> instead of redefining `bool`, `true` and | ||
5 | `false` keywords | ||
6 | |||
7 | Fixes #1049 | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/libsndfile/libsndfile/pull/1055] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/ALAC/alac_decoder.c | 6 +----- | ||
14 | src/ALAC/alac_encoder.c | 7 +------ | ||
15 | 2 files changed, 2 insertions(+), 11 deletions(-) | ||
16 | |||
17 | diff --git a/src/ALAC/alac_decoder.c b/src/ALAC/alac_decoder.c | ||
18 | index 46d3330..1b4a87c 100644 | ||
19 | --- a/src/ALAC/alac_decoder.c | ||
20 | +++ b/src/ALAC/alac_decoder.c | ||
21 | @@ -26,6 +26,7 @@ | ||
22 | #include <stdio.h> | ||
23 | #include <stdlib.h> | ||
24 | #include <stddef.h> | ||
25 | +#include <stdbool.h> | ||
26 | #include <string.h> | ||
27 | |||
28 | #include "alac_codec.h" | ||
29 | @@ -38,11 +39,6 @@ | ||
30 | #include "ALACBitUtilities.h" | ||
31 | #include "EndianPortable.h" | ||
32 | |||
33 | -typedef enum | ||
34 | -{ false = 0, | ||
35 | - true = 1 | ||
36 | -} bool ; | ||
37 | - | ||
38 | // constants/data | ||
39 | const uint32_t kMaxBitDepth = 32 ; // max allowed bit depth is 32 | ||
40 | |||
41 | diff --git a/src/ALAC/alac_encoder.c b/src/ALAC/alac_encoder.c | ||
42 | index 599399a..f303311 100644 | ||
43 | --- a/src/ALAC/alac_encoder.c | ||
44 | +++ b/src/ALAC/alac_encoder.c | ||
45 | @@ -30,6 +30,7 @@ | ||
46 | // headers | ||
47 | #include <stdio.h> | ||
48 | #include <stdlib.h> | ||
49 | +#include <stdbool.h> | ||
50 | #include <string.h> | ||
51 | |||
52 | #include "sfendian.h" | ||
53 | @@ -44,12 +45,6 @@ | ||
54 | #include "ALACAudioTypes.h" | ||
55 | #include "EndianPortable.h" | ||
56 | |||
57 | -typedef enum | ||
58 | -{ | ||
59 | - false = 0, | ||
60 | - true = 1 | ||
61 | -} bool ; | ||
62 | - | ||
63 | static void GetConfig (ALAC_ENCODER *p, ALACSpecificConfig * config) ; | ||
64 | |||
65 | static int32_t EncodeStereo (ALAC_ENCODER *p, struct BitBuffer * bitstream, const int32_t * input, uint32_t stride, uint32_t channelIndex, uint32_t numSamples) ; | ||
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2024-50612.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2024-50612.patch new file mode 100644 index 0000000000..368dd5446b --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2024-50612.patch | |||
@@ -0,0 +1,409 @@ | |||
1 | From 4755f5bd7854611d92ad0f1295587b439f9950ba Mon Sep 17 00:00:00 2001 | ||
2 | From: Arthur Taylor <art@ified.ca> | ||
3 | Date: Fri, 15 Nov 2024 19:46:53 -0800 | ||
4 | Subject: [PATCH] src/ogg: better error checking for vorbis. Fixes #1035 | ||
5 | |||
6 | CVE: CVE-2024-50612 | ||
7 | Upstream-Status: Backport [4755f5bd7854611d92ad0f1295587b439f9950ba] | ||
8 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
9 | --- | ||
10 | src/ogg.c | 12 ++-- | ||
11 | src/ogg_opus.c | 17 +++-- | ||
12 | src/ogg_vorbis.c | 170 ++++++++++++++++++++++++++--------------------- | ||
13 | 3 files changed, 114 insertions(+), 85 deletions(-) | ||
14 | |||
15 | diff --git a/src/ogg.c b/src/ogg.c | ||
16 | index 529941af8..e2d679d41 100644 | ||
17 | --- a/src/ogg.c | ||
18 | +++ b/src/ogg.c | ||
19 | @@ -211,12 +211,16 @@ ogg_read_first_page (SF_PRIVATE *psf, OGG_PRIVATE *odata) | ||
20 | |||
21 | int | ||
22 | ogg_write_page (SF_PRIVATE *psf, ogg_page *page) | ||
23 | -{ int bytes ; | ||
24 | +{ int n ; | ||
25 | |||
26 | - bytes = psf_fwrite (page->header, 1, page->header_len, psf) ; | ||
27 | - bytes += psf_fwrite (page->body, 1, page->body_len, psf) ; | ||
28 | + n = psf_fwrite (page->header, 1, page->header_len, psf) ; | ||
29 | + if (n == page->header_len) | ||
30 | + n += psf_fwrite (page->body, 1, page->body_len, psf) ; | ||
31 | |||
32 | - return bytes == page->header_len + page->body_len ; | ||
33 | + if (n != page->body_len + page->header_len) | ||
34 | + return -1 ; | ||
35 | + | ||
36 | + return n ; | ||
37 | } /* ogg_write_page */ | ||
38 | |||
39 | sf_count_t | ||
40 | diff --git a/src/ogg_opus.c b/src/ogg_opus.c | ||
41 | index 511653ecc..e01224b99 100644 | ||
42 | --- a/src/ogg_opus.c | ||
43 | +++ b/src/ogg_opus.c | ||
44 | @@ -827,15 +827,16 @@ ogg_opus_write_header (SF_PRIVATE *psf, int UNUSED (calc_length)) | ||
45 | |||
46 | /* The first page MUST only contain the header, so flush it out now */ | ||
47 | ogg_stream_packetin (&odata->ostream, &op) ; | ||
48 | - for ( ; (nn = ogg_stream_flush (&odata->ostream, &odata->opage)) ; ) | ||
49 | - { if (! (nn = ogg_write_page (psf, &odata->opage))) | ||
50 | + while (ogg_stream_flush (&odata->ostream, &odata->opage)) | ||
51 | + { nn = ogg_write_page (psf, &odata->opage) ; | ||
52 | + if (nn < 0) | ||
53 | { psf_log_printf (psf, "Opus : Failed to write header!\n") ; | ||
54 | if (psf->error) | ||
55 | return psf->error ; | ||
56 | return SFE_INTERNAL ; | ||
57 | } ; | ||
58 | psf->dataoffset += nn ; | ||
59 | - } | ||
60 | + } ; | ||
61 | |||
62 | /* | ||
63 | ** Metadata Tags (manditory) | ||
64 | @@ -850,15 +851,16 @@ ogg_opus_write_header (SF_PRIVATE *psf, int UNUSED (calc_length)) | ||
65 | vorbiscomment_write_tags (psf, &op, &opustags_ident, opus_get_version_string (), - (OGG_OPUS_COMMENT_PAD)) ; | ||
66 | op.packetno = 2 ; | ||
67 | ogg_stream_packetin (&odata->ostream, &op) ; | ||
68 | - for ( ; (nn = ogg_stream_flush (&odata->ostream, &odata->opage)) ; ) | ||
69 | - { if (! (nn = ogg_write_page (psf, &odata->opage))) | ||
70 | + while (ogg_stream_flush (&odata->ostream, &odata->opage)) | ||
71 | + { nn = ogg_write_page (psf, &odata->opage) ; | ||
72 | + if (nn < 0) | ||
73 | { psf_log_printf (psf, "Opus : Failed to write comments!\n") ; | ||
74 | if (psf->error) | ||
75 | return psf->error ; | ||
76 | return SFE_INTERNAL ; | ||
77 | } ; | ||
78 | psf->dataoffset += nn ; | ||
79 | - } | ||
80 | + } ; | ||
81 | |||
82 | return 0 ; | ||
83 | } /* ogg_opus_write_header */ | ||
84 | @@ -1132,7 +1134,8 @@ ogg_opus_write_out (SF_PRIVATE *psf, OGG_PRIVATE *odata, OPUS_PRIVATE *oopus) | ||
85 | if (nbytes > 0) | ||
86 | { oopus->u.encode.last_segments -= ogg_page_segments (&odata->opage) ; | ||
87 | oopus->pg_pos = oopus->pkt_pos ; | ||
88 | - ogg_write_page (psf, &odata->opage) ; | ||
89 | + if (ogg_write_page (psf, &odata->opage) < 0) | ||
90 | + return -1 ; | ||
91 | } | ||
92 | else | ||
93 | break ; | ||
94 | diff --git a/src/ogg_vorbis.c b/src/ogg_vorbis.c | ||
95 | index add123966..fae252ca0 100644 | ||
96 | --- a/src/ogg_vorbis.c | ||
97 | +++ b/src/ogg_vorbis.c | ||
98 | @@ -82,28 +82,6 @@ | ||
99 | /* How many seconds in the future to not bother bisection searching for. */ | ||
100 | #define VORBIS_SEEK_THRESHOLD 2 | ||
101 | |||
102 | -typedef int convert_func (SF_PRIVATE *psf, int, void *, int, int, float **) ; | ||
103 | - | ||
104 | -static int vorbis_read_header (SF_PRIVATE *psf) ; | ||
105 | -static int vorbis_write_header (SF_PRIVATE *psf, int calc_length) ; | ||
106 | -static int vorbis_close (SF_PRIVATE *psf) ; | ||
107 | -static int vorbis_command (SF_PRIVATE *psf, int command, void *data, int datasize) ; | ||
108 | -static int vorbis_byterate (SF_PRIVATE *psf) ; | ||
109 | -static int vorbis_calculate_granulepos (SF_PRIVATE *psf, uint64_t *gp_out) ; | ||
110 | -static int vorbis_skip (SF_PRIVATE *psf, uint64_t target_gp) ; | ||
111 | -static int vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp) ; | ||
112 | -static sf_count_t vorbis_seek (SF_PRIVATE *psf, int mode, sf_count_t offset) ; | ||
113 | -static sf_count_t vorbis_read_s (SF_PRIVATE *psf, short *ptr, sf_count_t len) ; | ||
114 | -static sf_count_t vorbis_read_i (SF_PRIVATE *psf, int *ptr, sf_count_t len) ; | ||
115 | -static sf_count_t vorbis_read_f (SF_PRIVATE *psf, float *ptr, sf_count_t len) ; | ||
116 | -static sf_count_t vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t len) ; | ||
117 | -static sf_count_t vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t len) ; | ||
118 | -static sf_count_t vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t len) ; | ||
119 | -static sf_count_t vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t len) ; | ||
120 | -static sf_count_t vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t len) ; | ||
121 | -static sf_count_t vorbis_read_sample (SF_PRIVATE *psf, void *ptr, sf_count_t lens, convert_func *transfn) ; | ||
122 | -static int vorbis_rnull (SF_PRIVATE *psf, int samples, void *vptr, int off , int channels, float **pcm) ; | ||
123 | - | ||
124 | typedef struct | ||
125 | { int id ; | ||
126 | const char *name ; | ||
127 | @@ -145,6 +123,45 @@ typedef struct | ||
128 | sf_count_t last_page ; | ||
129 | } VORBIS_PRIVATE ; | ||
130 | |||
131 | +typedef int convert_func (SF_PRIVATE *psf, int, void *, int, int, float **) ; | ||
132 | + | ||
133 | +static int vorbis_read_header (SF_PRIVATE *psf) ; | ||
134 | +static int vorbis_write_header (SF_PRIVATE *psf, int calc_length) ; | ||
135 | +static int vorbis_close (SF_PRIVATE *psf) ; | ||
136 | +static int vorbis_command (SF_PRIVATE *psf, int command, void *data, int datasize) ; | ||
137 | +static int vorbis_byterate (SF_PRIVATE *psf) ; | ||
138 | +static int vorbis_calculate_granulepos (SF_PRIVATE *psf, uint64_t *gp_out) ; | ||
139 | +static int vorbis_skip (SF_PRIVATE *psf, uint64_t target_gp) ; | ||
140 | +static int vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp) ; | ||
141 | +static sf_count_t vorbis_seek (SF_PRIVATE *psf, int mode, sf_count_t offset) ; | ||
142 | +static sf_count_t vorbis_read_s (SF_PRIVATE *psf, short *ptr, sf_count_t len) ; | ||
143 | +static sf_count_t vorbis_read_i (SF_PRIVATE *psf, int *ptr, sf_count_t len) ; | ||
144 | +static sf_count_t vorbis_read_f (SF_PRIVATE *psf, float *ptr, sf_count_t len) ; | ||
145 | +static sf_count_t vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t len) ; | ||
146 | +static sf_count_t vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t len) ; | ||
147 | +static sf_count_t vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t len) ; | ||
148 | +static sf_count_t vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t len) ; | ||
149 | +static sf_count_t vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t len) ; | ||
150 | +static sf_count_t vorbis_read_sample (SF_PRIVATE *psf, void *ptr, sf_count_t lens, convert_func *transfn) ; | ||
151 | +static int vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata, int in_frames) ; | ||
152 | +static int vorbis_rnull (SF_PRIVATE *psf, int samples, void *vptr, int off , int channels, float **pcm) ; | ||
153 | +static void vorbis_log_error (SF_PRIVATE *psf, int error) ; | ||
154 | + | ||
155 | + | ||
156 | +static void | ||
157 | +vorbis_log_error(SF_PRIVATE *psf, int error) { | ||
158 | + switch (error) | ||
159 | + { case 0: return; | ||
160 | + case OV_EIMPL: psf->error = SFE_UNIMPLEMENTED ; break ; | ||
161 | + case OV_ENOTVORBIS: psf->error = SFE_MALFORMED_FILE ; break ; | ||
162 | + case OV_EBADHEADER: psf->error = SFE_MALFORMED_FILE ; break ; | ||
163 | + case OV_EVERSION: psf->error = SFE_UNSUPPORTED_ENCODING ; break ; | ||
164 | + case OV_EFAULT: | ||
165 | + case OV_EINVAL: | ||
166 | + default: psf->error = SFE_INTERNAL ; | ||
167 | + } ; | ||
168 | +} ; | ||
169 | + | ||
170 | static int | ||
171 | vorbis_read_header (SF_PRIVATE *psf) | ||
172 | { OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ; | ||
173 | @@ -380,7 +397,6 @@ vorbis_write_header (SF_PRIVATE *psf, int UNUSED (calc_length)) | ||
174 | { ogg_packet header ; | ||
175 | ogg_packet header_comm ; | ||
176 | ogg_packet header_code ; | ||
177 | - int result ; | ||
178 | |||
179 | vorbis_analysis_headerout (&vdata->vdsp, &vdata->vcomment, &header, &header_comm, &header_code) ; | ||
180 | ogg_stream_packetin (&odata->ostream, &header) ; /* automatically placed in its own page */ | ||
181 | @@ -390,9 +406,9 @@ vorbis_write_header (SF_PRIVATE *psf, int UNUSED (calc_length)) | ||
182 | /* This ensures the actual | ||
183 | * audio data will start on a new page, as per spec | ||
184 | */ | ||
185 | - while ((result = ogg_stream_flush (&odata->ostream, &odata->opage)) != 0) | ||
186 | - { ogg_write_page (psf, &odata->opage) ; | ||
187 | - } ; | ||
188 | + while (ogg_stream_flush (&odata->ostream, &odata->opage)) | ||
189 | + if (ogg_write_page (psf, &odata->opage) < 0) | ||
190 | + return -1 ; | ||
191 | } | ||
192 | |||
193 | return 0 ; | ||
194 | @@ -402,6 +418,7 @@ static int | ||
195 | vorbis_close (SF_PRIVATE *psf) | ||
196 | { OGG_PRIVATE* odata = psf->container_data ; | ||
197 | VORBIS_PRIVATE *vdata = psf->codec_data ; | ||
198 | + int ret = 0 ; | ||
199 | |||
200 | if (odata == NULL || vdata == NULL) | ||
201 | return 0 ; | ||
202 | @@ -412,34 +429,14 @@ vorbis_close (SF_PRIVATE *psf) | ||
203 | if (psf->file.mode == SFM_WRITE) | ||
204 | { | ||
205 | if (psf->write_current <= 0) | ||
206 | - vorbis_write_header (psf, 0) ; | ||
207 | - | ||
208 | - vorbis_analysis_wrote (&vdata->vdsp, 0) ; | ||
209 | - while (vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock) == 1) | ||
210 | - { | ||
211 | + ret = vorbis_write_header (psf, 0) ; | ||
212 | |||
213 | - /* analysis, assume we want to use bitrate management */ | ||
214 | - vorbis_analysis (&vdata->vblock, NULL) ; | ||
215 | - vorbis_bitrate_addblock (&vdata->vblock) ; | ||
216 | - | ||
217 | - while (vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket)) | ||
218 | - { /* weld the packet into the bitstream */ | ||
219 | - ogg_stream_packetin (&odata->ostream, &odata->opacket) ; | ||
220 | - | ||
221 | - /* write out pages (if any) */ | ||
222 | - while (!odata->eos) | ||
223 | - { int result = ogg_stream_pageout (&odata->ostream, &odata->opage) ; | ||
224 | - if (result == 0) break ; | ||
225 | - ogg_write_page (psf, &odata->opage) ; | ||
226 | - | ||
227 | - /* this could be set above, but for illustrative purposes, I do | ||
228 | - it here (to show that vorbis does know where the stream ends) */ | ||
229 | - | ||
230 | - if (ogg_page_eos (&odata->opage)) odata->eos = 1 ; | ||
231 | - } | ||
232 | - } | ||
233 | - } | ||
234 | - } | ||
235 | + if (ret == 0) | ||
236 | + { /* A write of zero samples tells Vorbis the stream is done and to | ||
237 | + flush. */ | ||
238 | + ret = vorbis_write_samples (psf, odata, vdata, 0) ; | ||
239 | + } ; | ||
240 | + } ; | ||
241 | |||
242 | /* ogg_page and ogg_packet structs always point to storage in | ||
243 | libvorbis. They are never freed or manipulated directly */ | ||
244 | @@ -449,7 +446,7 @@ vorbis_close (SF_PRIVATE *psf) | ||
245 | vorbis_comment_clear (&vdata->vcomment) ; | ||
246 | vorbis_info_clear (&vdata->vinfo) ; | ||
247 | |||
248 | - return 0 ; | ||
249 | + return ret ; | ||
250 | } /* vorbis_close */ | ||
251 | |||
252 | int | ||
253 | @@ -688,33 +685,40 @@ vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t lens) | ||
254 | /*============================================================================== | ||
255 | */ | ||
256 | |||
257 | -static void | ||
258 | +static int | ||
259 | vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata, int in_frames) | ||
260 | -{ | ||
261 | - vorbis_analysis_wrote (&vdata->vdsp, in_frames) ; | ||
262 | +{ int ret ; | ||
263 | + | ||
264 | + if ((ret = vorbis_analysis_wrote (&vdata->vdsp, in_frames)) != 0) | ||
265 | + return ret ; | ||
266 | |||
267 | /* | ||
268 | ** Vorbis does some data preanalysis, then divvies up blocks for | ||
269 | ** more involved (potentially parallel) processing. Get a single | ||
270 | ** block for encoding now. | ||
271 | */ | ||
272 | - while (vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock) == 1) | ||
273 | + while ((ret = vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock)) == 1) | ||
274 | { | ||
275 | /* analysis, assume we want to use bitrate management */ | ||
276 | - vorbis_analysis (&vdata->vblock, NULL) ; | ||
277 | - vorbis_bitrate_addblock (&vdata->vblock) ; | ||
278 | + if ((ret = vorbis_analysis (&vdata->vblock, NULL)) != 0) | ||
279 | + return ret ; | ||
280 | + if ((ret = vorbis_bitrate_addblock (&vdata->vblock)) != 0) | ||
281 | + return ret ; | ||
282 | |||
283 | - while (vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket)) | ||
284 | + while ((ret = vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket)) == 1) | ||
285 | { | ||
286 | /* weld the packet into the bitstream */ | ||
287 | - ogg_stream_packetin (&odata->ostream, &odata->opacket) ; | ||
288 | + if ((ret = ogg_stream_packetin (&odata->ostream, &odata->opacket)) != 0) | ||
289 | + return ret ; | ||
290 | |||
291 | /* write out pages (if any) */ | ||
292 | while (!odata->eos) | ||
293 | - { int result = ogg_stream_pageout (&odata->ostream, &odata->opage) ; | ||
294 | - if (result == 0) | ||
295 | + { ret = ogg_stream_pageout (&odata->ostream, &odata->opage) ; | ||
296 | + if (ret == 0) | ||
297 | break ; | ||
298 | - ogg_write_page (psf, &odata->opage) ; | ||
299 | + | ||
300 | + if (ogg_write_page (psf, &odata->opage) < 0) | ||
301 | + return -1 ; | ||
302 | |||
303 | /* This could be set above, but for illustrative purposes, I do | ||
304 | ** it here (to show that vorbis does know where the stream ends) */ | ||
305 | @@ -722,16 +726,22 @@ vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata | ||
306 | odata->eos = 1 ; | ||
307 | } ; | ||
308 | } ; | ||
309 | + if (ret != 0) | ||
310 | + return ret ; | ||
311 | } ; | ||
312 | + if (ret != 0) | ||
313 | + return ret ; | ||
314 | |||
315 | vdata->gp += in_frames ; | ||
316 | + | ||
317 | + return 0 ; | ||
318 | } /* vorbis_write_data */ | ||
319 | |||
320 | |||
321 | static sf_count_t | ||
322 | vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t lens) | ||
323 | { | ||
324 | - int i, m, j = 0 ; | ||
325 | + int i, m, j = 0, ret ; | ||
326 | OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ; | ||
327 | VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ; | ||
328 | int in_frames = lens / psf->sf.channels ; | ||
329 | @@ -740,14 +750,17 @@ vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t lens) | ||
330 | for (m = 0 ; m < psf->sf.channels ; m++) | ||
331 | buffer [m][i] = (float) (ptr [j++]) / 32767.0f ; | ||
332 | |||
333 | - vorbis_write_samples (psf, odata, vdata, in_frames) ; | ||
334 | + if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames))) | ||
335 | + { vorbis_log_error (psf, ret) ; | ||
336 | + return 0 ; | ||
337 | + } ; | ||
338 | |||
339 | return lens ; | ||
340 | } /* vorbis_write_s */ | ||
341 | |||
342 | static sf_count_t | ||
343 | vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t lens) | ||
344 | -{ int i, m, j = 0 ; | ||
345 | +{ int i, m, j = 0, ret ; | ||
346 | OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ; | ||
347 | VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ; | ||
348 | int in_frames = lens / psf->sf.channels ; | ||
349 | @@ -756,14 +769,17 @@ vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t lens) | ||
350 | for (m = 0 ; m < psf->sf.channels ; m++) | ||
351 | buffer [m][i] = (float) (ptr [j++]) / 2147483647.0f ; | ||
352 | |||
353 | - vorbis_write_samples (psf, odata, vdata, in_frames) ; | ||
354 | + if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames))) | ||
355 | + { vorbis_log_error (psf, ret) ; | ||
356 | + return 0 ; | ||
357 | + } ; | ||
358 | |||
359 | return lens ; | ||
360 | } /* vorbis_write_i */ | ||
361 | |||
362 | static sf_count_t | ||
363 | vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t lens) | ||
364 | -{ int i, m, j = 0 ; | ||
365 | +{ int i, m, j = 0, ret ; | ||
366 | OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ; | ||
367 | VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ; | ||
368 | int in_frames = lens / psf->sf.channels ; | ||
369 | @@ -772,14 +788,17 @@ vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t lens) | ||
370 | for (m = 0 ; m < psf->sf.channels ; m++) | ||
371 | buffer [m][i] = ptr [j++] ; | ||
372 | |||
373 | - vorbis_write_samples (psf, odata, vdata, in_frames) ; | ||
374 | + if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)) != 0) | ||
375 | + { vorbis_log_error (psf, ret) ; | ||
376 | + return 0 ; | ||
377 | + } ; | ||
378 | |||
379 | return lens ; | ||
380 | } /* vorbis_write_f */ | ||
381 | |||
382 | static sf_count_t | ||
383 | vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t lens) | ||
384 | -{ int i, m, j = 0 ; | ||
385 | +{ int i, m, j = 0, ret ; | ||
386 | OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ; | ||
387 | VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ; | ||
388 | int in_frames = lens / psf->sf.channels ; | ||
389 | @@ -788,7 +807,10 @@ vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t lens) | ||
390 | for (m = 0 ; m < psf->sf.channels ; m++) | ||
391 | buffer [m][i] = (float) ptr [j++] ; | ||
392 | |||
393 | - vorbis_write_samples (psf, odata, vdata, in_frames) ; | ||
394 | + if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)) != 0) | ||
395 | + { vorbis_log_error (psf, ret) ; | ||
396 | + return 0 ; | ||
397 | + } ; | ||
398 | |||
399 | return lens ; | ||
400 | } /* vorbis_write_d */ | ||
401 | @@ -884,7 +906,7 @@ vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp) | ||
402 | return 0 ; | ||
403 | |||
404 | /* Search for a position a half large-block before our target. As Vorbis is | ||
405 | - ** lapped, every sample position come from two blocks, the "left" half of | ||
406 | + ** lapped, every sample position comes from two blocks, the "left" half of | ||
407 | ** one block and the "right" half of the previous block. The granule | ||
408 | ** position of an Ogg page of a Vorbis stream is the sample offset of the | ||
409 | ** last finished sample in the stream that can be decoded from a page. A | ||
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb index a9ee7c3575..0ec40dda7a 100644 --- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb +++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb | |||
@@ -10,6 +10,8 @@ LICENSE = "LGPL-2.1-only" | |||
10 | SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \ | 10 | SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \ |
11 | file://noopus.patch \ | 11 | file://noopus.patch \ |
12 | file://cve-2022-33065.patch \ | 12 | file://cve-2022-33065.patch \ |
13 | file://CVE-2024-50612.patch \ | ||
14 | file://0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch \ | ||
13 | " | 15 | " |
14 | GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" | 16 | GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" |
15 | 17 | ||
@@ -19,7 +21,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a" | |||
19 | 21 | ||
20 | CVE_PRODUCT = "libsndfile" | 22 | CVE_PRODUCT = "libsndfile" |
21 | 23 | ||
22 | S = "${WORKDIR}/libsndfile-${PV}" | 24 | S = "${UNPACKDIR}/libsndfile-${PV}" |
23 | 25 | ||
24 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}" | 26 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}" |
25 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" | 27 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" |
diff --git a/meta/recipes-multimedia/libtheora/libtheora-1.1.1/no-docs.patch b/meta/recipes-multimedia/libtheora/libtheora-1.1.1/no-docs.patch deleted file mode 100644 index 359f3d1a7a..0000000000 --- a/meta/recipes-multimedia/libtheora/libtheora-1.1.1/no-docs.patch +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: libtheora-1.1.1/Makefile.am | ||
4 | =================================================================== | ||
5 | --- libtheora-1.1.1.orig/Makefile.am 2009-11-25 22:01:53.593775926 +0100 | ||
6 | +++ libtheora-1.1.1/Makefile.am 2009-11-25 22:02:00.777524017 +0100 | ||
7 | @@ -8,7 +8,7 @@ | ||
8 | EXAMPLES_DIR = | ||
9 | endif | ||
10 | |||
11 | -SUBDIRS = lib include doc tests m4 $(EXAMPLES_DIR) | ||
12 | +SUBDIRS = lib include tests m4 $(EXAMPLES_DIR) | ||
13 | |||
14 | |||
15 | # we include the whole debian/ dir in EXTRA_DIST because there's a problem | ||
diff --git a/meta/recipes-multimedia/libtheora/libtheora/0001-add-missing-files.patch b/meta/recipes-multimedia/libtheora/libtheora/0001-add-missing-files.patch new file mode 100644 index 0000000000..323ac7da83 --- /dev/null +++ b/meta/recipes-multimedia/libtheora/libtheora/0001-add-missing-files.patch | |||
@@ -0,0 +1,769 @@ | |||
1 | From 0880595f9b08d15da0e72cefaf24841cbb930883 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gyorgy Sarvari <skandigraun@gmail.com> | ||
3 | Date: Sat, 7 Jun 2025 14:10:40 +0200 | ||
4 | Subject: [PATCH] add missing files | ||
5 | |||
6 | Due to a release issue, two files were not added to the libtheora 1.2.0 | ||
7 | release tarball - these files are required to be able to build the | ||
8 | library for 32-bit ARM systems along with assembly optimization. | ||
9 | |||
10 | This patch adds these files. | ||
11 | |||
12 | This is not a code issue per-se, rather a tarballing one, as the files | ||
13 | are present in the source code repository. | ||
14 | |||
15 | Upstream-Status: Backport [https://gitlab.xiph.org/xiph/theora/-/issues/2338] | ||
16 | |||
17 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
18 | --- | ||
19 | lib/arm/armenc.c | 57 ++++ | ||
20 | lib/arm/armloop.s | 676 ++++++++++++++++++++++++++++++++++++++++++++++ | ||
21 | 2 files changed, 733 insertions(+) | ||
22 | create mode 100644 lib/arm/armenc.c | ||
23 | create mode 100644 lib/arm/armloop.s | ||
24 | |||
25 | diff --git a/lib/arm/armenc.c b/lib/arm/armenc.c | ||
26 | new file mode 100644 | ||
27 | index 0000000..4cfb8a7 | ||
28 | --- /dev/null | ||
29 | +++ b/lib/arm/armenc.c | ||
30 | @@ -0,0 +1,57 @@ | ||
31 | +/******************************************************************** | ||
32 | + * * | ||
33 | + * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * | ||
34 | + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * | ||
35 | + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * | ||
36 | + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * | ||
37 | + * * | ||
38 | + * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 * | ||
39 | + * by the Xiph.Org Foundation and contributors * | ||
40 | + * https://www.xiph.org/ * | ||
41 | + * * | ||
42 | + ******************************************************************** | ||
43 | + | ||
44 | + function: | ||
45 | + | ||
46 | + ********************************************************************/ | ||
47 | +#include "armenc.h" | ||
48 | + | ||
49 | +#if defined(OC_ARM_ASM) | ||
50 | + | ||
51 | +void oc_enc_accel_init_arm(oc_enc_ctx *_enc){ | ||
52 | + ogg_uint32_t cpu_flags; | ||
53 | + cpu_flags=_enc->state.cpu_flags; | ||
54 | + oc_enc_accel_init_c(_enc); | ||
55 | +# if defined(OC_ENC_USE_VTABLE) | ||
56 | + /*TODO: Add ARMv4 functions here.*/ | ||
57 | +# endif | ||
58 | +# if defined(OC_ARM_ASM_EDSP) | ||
59 | + if(cpu_flags&OC_CPU_ARM_EDSP){ | ||
60 | +# if defined(OC_STATE_USE_VTABLE) | ||
61 | + /*TODO: Add EDSP functions here.*/ | ||
62 | +# endif | ||
63 | + } | ||
64 | +# if defined(OC_ARM_ASM_MEDIA) | ||
65 | + if(cpu_flags&OC_CPU_ARM_MEDIA){ | ||
66 | +# if defined(OC_STATE_USE_VTABLE) | ||
67 | + /*TODO: Add Media functions here.*/ | ||
68 | +# endif | ||
69 | + } | ||
70 | +# if defined(OC_ARM_ASM_NEON) | ||
71 | + if(cpu_flags&OC_CPU_ARM_NEON){ | ||
72 | +# if defined(OC_STATE_USE_VTABLE) | ||
73 | + _enc->opt_vtable.frag_satd=oc_enc_frag_satd_neon; | ||
74 | + _enc->opt_vtable.frag_satd2=oc_enc_frag_satd2_neon; | ||
75 | + _enc->opt_vtable.frag_intra_satd=oc_enc_frag_intra_satd_neon; | ||
76 | + _enc->opt_vtable.enquant_table_init=oc_enc_enquant_table_init_neon; | ||
77 | + _enc->opt_vtable.enquant_table_fixup=oc_enc_enquant_table_fixup_neon; | ||
78 | + _enc->opt_vtable.quantize=oc_enc_quantize_neon; | ||
79 | +# endif | ||
80 | + _enc->opt_data.enquant_table_size=128*sizeof(ogg_uint16_t); | ||
81 | + _enc->opt_data.enquant_table_alignment=16; | ||
82 | + } | ||
83 | +# endif | ||
84 | +# endif | ||
85 | +# endif | ||
86 | +} | ||
87 | +#endif | ||
88 | diff --git a/lib/arm/armloop.s b/lib/arm/armloop.s | ||
89 | new file mode 100644 | ||
90 | index 0000000..c35da0f | ||
91 | --- /dev/null | ||
92 | +++ b/lib/arm/armloop.s | ||
93 | @@ -0,0 +1,676 @@ | ||
94 | +;******************************************************************** | ||
95 | +;* * | ||
96 | +;* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * | ||
97 | +;* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * | ||
98 | +;* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * | ||
99 | +;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * | ||
100 | +;* * | ||
101 | +;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 * | ||
102 | +;* by the Xiph.Org Foundation and contributors * | ||
103 | +;* https://www.xiph.org/ * | ||
104 | +;* * | ||
105 | +;******************************************************************** | ||
106 | +; Original implementation: | ||
107 | +; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd | ||
108 | +;******************************************************************** | ||
109 | + | ||
110 | + AREA |.text|, CODE, READONLY | ||
111 | + | ||
112 | + GET armopts.s | ||
113 | + | ||
114 | + EXPORT oc_loop_filter_frag_rows_arm | ||
115 | + | ||
116 | +; Which bit this is depends on the order of packing within a bitfield. | ||
117 | +; Hopefully that doesn't change among any of the relevant compilers. | ||
118 | +OC_FRAG_CODED_FLAG * 1 | ||
119 | + | ||
120 | + ; Vanilla ARM v4 version | ||
121 | +loop_filter_h_arm PROC | ||
122 | + ; r0 = unsigned char *_pix | ||
123 | + ; r1 = int _ystride | ||
124 | + ; r2 = int *_bv | ||
125 | + ; preserves r0-r3 | ||
126 | + STMFD r13!,{r3-r6,r14} | ||
127 | + MOV r14,#8 | ||
128 | + MOV r6, #255 | ||
129 | +lfh_arm_lp | ||
130 | + LDRB r3, [r0, #-2] ; r3 = _pix[0] | ||
131 | + LDRB r12,[r0, #1] ; r12= _pix[3] | ||
132 | + LDRB r4, [r0, #-1] ; r4 = _pix[1] | ||
133 | + LDRB r5, [r0] ; r5 = _pix[2] | ||
134 | + SUB r3, r3, r12 ; r3 = _pix[0]-_pix[3]+4 | ||
135 | + ADD r3, r3, #4 | ||
136 | + SUB r12,r5, r4 ; r12= _pix[2]-_pix[1] | ||
137 | + ADD r12,r12,r12,LSL #1 ; r12= 3*(_pix[2]-_pix[1]) | ||
138 | + ADD r12,r12,r3 ; r12= _pix[0]-_pix[3]+3*(_pix[2]-_pix[1])+4 | ||
139 | + MOV r12,r12,ASR #3 | ||
140 | + LDRSB r12,[r2, r12] | ||
141 | + ; Stall (2 on Xscale) | ||
142 | + ADDS r4, r4, r12 | ||
143 | + CMPGT r6, r4 | ||
144 | + EORLT r4, r6, r4, ASR #32 | ||
145 | + SUBS r5, r5, r12 | ||
146 | + CMPGT r6, r5 | ||
147 | + EORLT r5, r6, r5, ASR #32 | ||
148 | + STRB r4, [r0, #-1] | ||
149 | + STRB r5, [r0], r1 | ||
150 | + SUBS r14,r14,#1 | ||
151 | + BGT lfh_arm_lp | ||
152 | + SUB r0, r0, r1, LSL #3 | ||
153 | + LDMFD r13!,{r3-r6,PC} | ||
154 | + ENDP | ||
155 | + | ||
156 | +loop_filter_v_arm PROC | ||
157 | + ; r0 = unsigned char *_pix | ||
158 | + ; r1 = int _ystride | ||
159 | + ; r2 = int *_bv | ||
160 | + ; preserves r0-r3 | ||
161 | + STMFD r13!,{r3-r6,r14} | ||
162 | + MOV r14,#8 | ||
163 | + MOV r6, #255 | ||
164 | +lfv_arm_lp | ||
165 | + LDRB r3, [r0, -r1, LSL #1] ; r3 = _pix[0] | ||
166 | + LDRB r12,[r0, r1] ; r12= _pix[3] | ||
167 | + LDRB r4, [r0, -r1] ; r4 = _pix[1] | ||
168 | + LDRB r5, [r0] ; r5 = _pix[2] | ||
169 | + SUB r3, r3, r12 ; r3 = _pix[0]-_pix[3]+4 | ||
170 | + ADD r3, r3, #4 | ||
171 | + SUB r12,r5, r4 ; r12= _pix[2]-_pix[1] | ||
172 | + ADD r12,r12,r12,LSL #1 ; r12= 3*(_pix[2]-_pix[1]) | ||
173 | + ADD r12,r12,r3 ; r12= _pix[0]-_pix[3]+3*(_pix[2]-_pix[1])+4 | ||
174 | + MOV r12,r12,ASR #3 | ||
175 | + LDRSB r12,[r2, r12] | ||
176 | + ; Stall (2 on Xscale) | ||
177 | + ADDS r4, r4, r12 | ||
178 | + CMPGT r6, r4 | ||
179 | + EORLT r4, r6, r4, ASR #32 | ||
180 | + SUBS r5, r5, r12 | ||
181 | + CMPGT r6, r5 | ||
182 | + EORLT r5, r6, r5, ASR #32 | ||
183 | + STRB r4, [r0, -r1] | ||
184 | + STRB r5, [r0], #1 | ||
185 | + SUBS r14,r14,#1 | ||
186 | + BGT lfv_arm_lp | ||
187 | + SUB r0, r0, #8 | ||
188 | + LDMFD r13!,{r3-r6,PC} | ||
189 | + ENDP | ||
190 | + | ||
191 | +oc_loop_filter_frag_rows_arm PROC | ||
192 | + ; r0 = _ref_frame_data | ||
193 | + ; r1 = _ystride | ||
194 | + ; r2 = _bv | ||
195 | + ; r3 = _frags | ||
196 | + ; r4 = _fragi0 | ||
197 | + ; r5 = _fragi0_end | ||
198 | + ; r6 = _fragi_top | ||
199 | + ; r7 = _fragi_bot | ||
200 | + ; r8 = _frag_buf_offs | ||
201 | + ; r9 = _nhfrags | ||
202 | + MOV r12,r13 | ||
203 | + STMFD r13!,{r0,r4-r11,r14} | ||
204 | + LDMFD r12,{r4-r9} | ||
205 | + ADD r2, r2, #127 ; _bv += 127 | ||
206 | + CMP r4, r5 ; if(_fragi0>=_fragi0_end) | ||
207 | + BGE oslffri_arm_end ; bail | ||
208 | + SUBS r9, r9, #1 ; r9 = _nhfrags-1 if (r9<=0) | ||
209 | + BLE oslffri_arm_end ; bail | ||
210 | + ADD r3, r3, r4, LSL #2 ; r3 = &_frags[fragi] | ||
211 | + ADD r8, r8, r4, LSL #2 ; r8 = &_frag_buf_offs[fragi] | ||
212 | + SUB r7, r7, r9 ; _fragi_bot -= _nhfrags; | ||
213 | +oslffri_arm_lp1 | ||
214 | + MOV r10,r4 ; r10= fragi = _fragi0 | ||
215 | + ADD r11,r4, r9 ; r11= fragi_end-1=fragi+_nhfrags-1 | ||
216 | +oslffri_arm_lp2 | ||
217 | + LDR r14,[r3], #4 ; r14= _frags[fragi] _frags++ | ||
218 | + LDR r0, [r13] ; r0 = _ref_frame_data | ||
219 | + LDR r12,[r8], #4 ; r12= _frag_buf_offs[fragi] _frag_buf_offs++ | ||
220 | + TST r14,#OC_FRAG_CODED_FLAG | ||
221 | + BEQ oslffri_arm_uncoded | ||
222 | + CMP r10,r4 ; if (fragi>_fragi0) | ||
223 | + ADD r0, r0, r12 ; r0 = _ref_frame_data + _frag_buf_offs[fragi] | ||
224 | + BLGT loop_filter_h_arm | ||
225 | + CMP r4, r6 ; if (_fragi0>_fragi_top) | ||
226 | + BLGT loop_filter_v_arm | ||
227 | + CMP r10,r11 ; if(fragi+1<fragi_end)===(fragi<fragi_end-1) | ||
228 | + LDRLT r12,[r3] ; r12 = _frags[fragi+1] | ||
229 | + ADD r0, r0, #8 | ||
230 | + ADD r10,r10,#1 ; r10 = fragi+1; | ||
231 | + ANDLT r12,r12,#OC_FRAG_CODED_FLAG | ||
232 | + CMPLT r12,#OC_FRAG_CODED_FLAG ; && _frags[fragi+1].coded==0 | ||
233 | + BLLT loop_filter_h_arm | ||
234 | + CMP r10,r7 ; if (fragi<_fragi_bot) | ||
235 | + LDRLT r12,[r3, r9, LSL #2] ; r12 = _frags[fragi+1+_nhfrags-1] | ||
236 | + SUB r0, r0, #8 | ||
237 | + ADD r0, r0, r1, LSL #3 | ||
238 | + ANDLT r12,r12,#OC_FRAG_CODED_FLAG | ||
239 | + CMPLT r12,#OC_FRAG_CODED_FLAG | ||
240 | + BLLT loop_filter_v_arm | ||
241 | + CMP r10,r11 ; while(fragi<=fragi_end-1) | ||
242 | + BLE oslffri_arm_lp2 | ||
243 | + MOV r4, r10 ; r4 = fragi0 += _nhfrags | ||
244 | + CMP r4, r5 | ||
245 | + BLT oslffri_arm_lp1 | ||
246 | +oslffri_arm_end | ||
247 | + LDMFD r13!,{r0,r4-r11,PC} | ||
248 | +oslffri_arm_uncoded | ||
249 | + ADD r10,r10,#1 | ||
250 | + CMP r10,r11 | ||
251 | + BLE oslffri_arm_lp2 | ||
252 | + MOV r4, r10 ; r4 = _fragi0 += _nhfrags | ||
253 | + CMP r4, r5 | ||
254 | + BLT oslffri_arm_lp1 | ||
255 | + LDMFD r13!,{r0,r4-r11,PC} | ||
256 | + ENDP | ||
257 | + | ||
258 | + [ OC_ARM_ASM_MEDIA | ||
259 | + EXPORT oc_loop_filter_init_v6 | ||
260 | + EXPORT oc_loop_filter_frag_rows_v6 | ||
261 | + | ||
262 | +oc_loop_filter_init_v6 PROC | ||
263 | + ; r0 = _bv | ||
264 | + ; r1 = _flimit (=L from the spec) | ||
265 | + MVN r1, r1, LSL #1 ; r1 = <0xFFFFFF|255-2*L> | ||
266 | + AND r1, r1, #255 ; r1 = ll=r1&0xFF | ||
267 | + ORR r1, r1, r1, LSL #8 ; r1 = <ll|ll> | ||
268 | + PKHBT r1, r1, r1, LSL #16 ; r1 = <ll|ll|ll|ll> | ||
269 | + STR r1, [r0] | ||
270 | + MOV PC,r14 | ||
271 | + ENDP | ||
272 | + | ||
273 | +; We could use the same strategy as the v filter below, but that would require | ||
274 | +; 40 instructions to load the data and transpose it into columns and another | ||
275 | +; 32 to write out the results at the end, plus the 52 instructions to do the | ||
276 | +; filtering itself. | ||
277 | +; This is slightly less, and less code, even assuming we could have shared the | ||
278 | +; 52 instructions in the middle with the other function. | ||
279 | +; It executes slightly fewer instructions than the ARMv6 approach David Conrad | ||
280 | +; proposed for FFmpeg, but not by much: | ||
281 | +; http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-February/083141.html | ||
282 | +; His is a lot less code, though, because it only does two rows at once instead | ||
283 | +; of four. | ||
284 | +loop_filter_h_v6 PROC | ||
285 | + ; r0 = unsigned char *_pix | ||
286 | + ; r1 = int _ystride | ||
287 | + ; r2 = int _ll | ||
288 | + ; preserves r0-r3 | ||
289 | + STMFD r13!,{r4-r11,r14} | ||
290 | + LDR r12,=0x10003 | ||
291 | + BL loop_filter_h_core_v6 | ||
292 | + ADD r0, r0, r1, LSL #2 | ||
293 | + BL loop_filter_h_core_v6 | ||
294 | + SUB r0, r0, r1, LSL #2 | ||
295 | + LDMFD r13!,{r4-r11,PC} | ||
296 | + ENDP | ||
297 | + | ||
298 | +loop_filter_h_core_v6 PROC | ||
299 | + ; r0 = unsigned char *_pix | ||
300 | + ; r1 = int _ystride | ||
301 | + ; r2 = int _ll | ||
302 | + ; r12= 0x10003 | ||
303 | + ; Preserves r0-r3, r12; Clobbers r4-r11. | ||
304 | + LDR r4,[r0, #-2]! ; r4 = <p3|p2|p1|p0> | ||
305 | + ; Single issue | ||
306 | + LDR r5,[r0, r1]! ; r5 = <q3|q2|q1|q0> | ||
307 | + UXTB16 r6, r4, ROR #16 ; r6 = <p0|p2> | ||
308 | + UXTB16 r4, r4, ROR #8 ; r4 = <p3|p1> | ||
309 | + UXTB16 r7, r5, ROR #16 ; r7 = <q0|q2> | ||
310 | + UXTB16 r5, r5, ROR #8 ; r5 = <q3|q1> | ||
311 | + PKHBT r8, r4, r5, LSL #16 ; r8 = <__|q1|__|p1> | ||
312 | + PKHBT r9, r6, r7, LSL #16 ; r9 = <__|q2|__|p2> | ||
313 | + SSUB16 r6, r4, r6 ; r6 = <p3-p0|p1-p2> | ||
314 | + SMLAD r6, r6, r12,r12 ; r6 = <????|(p3-p0)+3*(p1-p2)+3> | ||
315 | + SSUB16 r7, r5, r7 ; r7 = <q3-q0|q1-q2> | ||
316 | + SMLAD r7, r7, r12,r12 ; r7 = <????|(q0-q3)+3*(q2-q1)+4> | ||
317 | + LDR r4,[r0, r1]! ; r4 = <r3|r2|r1|r0> | ||
318 | + MOV r6, r6, ASR #3 ; r6 = <??????|(p3-p0)+3*(p1-p2)+3>>3> | ||
319 | + LDR r5,[r0, r1]! ; r5 = <s3|s2|s1|s0> | ||
320 | + PKHBT r11,r6, r7, LSL #13 ; r11= <??|-R_q|??|-R_p> | ||
321 | + UXTB16 r6, r4, ROR #16 ; r6 = <r0|r2> | ||
322 | + UXTB16 r11,r11 ; r11= <__|-R_q|__|-R_p> | ||
323 | + UXTB16 r4, r4, ROR #8 ; r4 = <r3|r1> | ||
324 | + UXTB16 r7, r5, ROR #16 ; r7 = <s0|s2> | ||
325 | + PKHBT r10,r6, r7, LSL #16 ; r10= <__|s2|__|r2> | ||
326 | + SSUB16 r6, r4, r6 ; r6 = <r3-r0|r1-r2> | ||
327 | + UXTB16 r5, r5, ROR #8 ; r5 = <s3|s1> | ||
328 | + SMLAD r6, r6, r12,r12 ; r6 = <????|(r3-r0)+3*(r2-r1)+3> | ||
329 | + SSUB16 r7, r5, r7 ; r7 = <r3-r0|r1-r2> | ||
330 | + SMLAD r7, r7, r12,r12 ; r7 = <????|(s0-s3)+3*(s2-s1)+4> | ||
331 | + ORR r9, r9, r10, LSL #8 ; r9 = <s2|q2|r2|p2> | ||
332 | + MOV r6, r6, ASR #3 ; r6 = <??????|(r0-r3)+3*(r2-r1)+4>>3> | ||
333 | + PKHBT r10,r4, r5, LSL #16 ; r10= <__|s1|__|r1> | ||
334 | + PKHBT r6, r6, r7, LSL #13 ; r6 = <??|-R_s|??|-R_r> | ||
335 | + ORR r8, r8, r10, LSL #8 ; r8 = <s1|q1|r1|p1> | ||
336 | + UXTB16 r6, r6 ; r6 = <__|-R_s|__|-R_r> | ||
337 | + MOV r10,#0 | ||
338 | + ORR r6, r11,r6, LSL #8 ; r6 = <-R_s|-R_q|-R_r|-R_p> | ||
339 | + ; Single issue | ||
340 | + ; There's no min, max or abs instruction. | ||
341 | + ; SSUB8 and SEL will work for abs, and we can do all the rest with | ||
342 | + ; unsigned saturated adds, which means the GE flags are still all | ||
343 | + ; set when we're done computing lflim(abs(R_i),L). | ||
344 | + ; This allows us to both add and subtract, and split the results by | ||
345 | + ; the original sign of R_i. | ||
346 | + SSUB8 r7, r10,r6 | ||
347 | + ; Single issue | ||
348 | + SEL r7, r7, r6 ; r7 = abs(R_i) | ||
349 | + ; Single issue | ||
350 | + UQADD8 r4, r7, r2 ; r4 = 255-max(2*L-abs(R_i),0) | ||
351 | + ; Single issue | ||
352 | + UQADD8 r7, r7, r4 | ||
353 | + ; Single issue | ||
354 | + UQSUB8 r7, r7, r4 ; r7 = min(abs(R_i),max(2*L-abs(R_i),0)) | ||
355 | + ; Single issue | ||
356 | + UQSUB8 r4, r8, r7 | ||
357 | + UQADD8 r5, r9, r7 | ||
358 | + UQADD8 r8, r8, r7 | ||
359 | + UQSUB8 r9, r9, r7 | ||
360 | + SEL r8, r8, r4 ; r8 = p1+lflim(R_i,L) | ||
361 | + SEL r9, r9, r5 ; r9 = p2-lflim(R_i,L) | ||
362 | + MOV r5, r9, LSR #24 ; r5 = s2 | ||
363 | + STRB r5, [r0,#2]! | ||
364 | + MOV r4, r8, LSR #24 ; r4 = s1 | ||
365 | + STRB r4, [r0,#-1] | ||
366 | + MOV r5, r9, LSR #8 ; r5 = r2 | ||
367 | + STRB r5, [r0,-r1]! | ||
368 | + MOV r4, r8, LSR #8 ; r4 = r1 | ||
369 | + STRB r4, [r0,#-1] | ||
370 | + MOV r5, r9, LSR #16 ; r5 = q2 | ||
371 | + STRB r5, [r0,-r1]! | ||
372 | + MOV r4, r8, LSR #16 ; r4 = q1 | ||
373 | + STRB r4, [r0,#-1] | ||
374 | + ; Single issue | ||
375 | + STRB r9, [r0,-r1]! | ||
376 | + ; Single issue | ||
377 | + STRB r8, [r0,#-1] | ||
378 | + MOV PC,r14 | ||
379 | + ENDP | ||
380 | + | ||
381 | +; This uses the same strategy as the MMXEXT version for x86, except that UHADD8 | ||
382 | +; computes (a+b>>1) instead of (a+b+1>>1) like PAVGB. | ||
383 | +; This works just as well, with the following procedure for computing the | ||
384 | +; filter value, f: | ||
385 | +; u = ~UHADD8(p1,~p2); | ||
386 | +; v = UHADD8(~p1,p2); | ||
387 | +; m = v-u; | ||
388 | +; a = m^UHADD8(m^p0,m^~p3); | ||
389 | +; f = UHADD8(UHADD8(a,u1),v1); | ||
390 | +; where f = 127+R, with R in [-127,128] defined as in the spec. | ||
391 | +; This is exactly the same amount of arithmetic as the version that uses PAVGB | ||
392 | +; as the basic operator. | ||
393 | +; It executes about 2/3 the number of instructions of David Conrad's approach, | ||
394 | +; but requires more code, because it does all eight columns at once, instead | ||
395 | +; of four at a time. | ||
396 | +loop_filter_v_v6 PROC | ||
397 | + ; r0 = unsigned char *_pix | ||
398 | + ; r1 = int _ystride | ||
399 | + ; r2 = int _ll | ||
400 | + ; preserves r0-r11 | ||
401 | + STMFD r13!,{r4-r11,r14} | ||
402 | + LDRD r6, [r0, -r1]! ; r7, r6 = <p5|p1> | ||
403 | + LDRD r4, [r0, -r1] ; r5, r4 = <p4|p0> | ||
404 | + LDRD r8, [r0, r1]! ; r9, r8 = <p6|p2> | ||
405 | + MVN r14,r6 ; r14= ~p1 | ||
406 | + LDRD r10,[r0, r1] ; r11,r10= <p7|p3> | ||
407 | + ; Filter the first four columns. | ||
408 | + MVN r12,r8 ; r12= ~p2 | ||
409 | + UHADD8 r14,r14,r8 ; r14= v1=~p1+p2>>1 | ||
410 | + UHADD8 r12,r12,r6 ; r12= p1+~p2>>1 | ||
411 | + MVN r10, r10 ; r10=~p3 | ||
412 | + MVN r12,r12 ; r12= u1=~p1+p2+1>>1 | ||
413 | + SSUB8 r14,r14,r12 ; r14= m1=v1-u1 | ||
414 | + ; Single issue | ||
415 | + EOR r4, r4, r14 ; r4 = m1^p0 | ||
416 | + EOR r10,r10,r14 ; r10= m1^~p3 | ||
417 | + UHADD8 r4, r4, r10 ; r4 = (m1^p0)+(m1^~p3)>>1 | ||
418 | + ; Single issue | ||
419 | + EOR r4, r4, r14 ; r4 = a1=m1^((m1^p0)+(m1^~p3)>>1) | ||
420 | + SADD8 r14,r14,r12 ; r14= v1=m1+u1 | ||
421 | + UHADD8 r4, r4, r12 ; r4 = a1+u1>>1 | ||
422 | + MVN r12,r9 ; r12= ~p6 | ||
423 | + UHADD8 r4, r4, r14 ; r4 = f1=(a1+u1>>1)+v1>>1 | ||
424 | + ; Filter the second four columns. | ||
425 | + MVN r14,r7 ; r14= ~p5 | ||
426 | + UHADD8 r12,r12,r7 ; r12= p5+~p6>>1 | ||
427 | + UHADD8 r14,r14,r9 ; r14= v2=~p5+p6>>1 | ||
428 | + MVN r12,r12 ; r12= u2=~p5+p6+1>>1 | ||
429 | + MVN r11,r11 ; r11=~p7 | ||
430 | + SSUB8 r10,r14,r12 ; r10= m2=v2-u2 | ||
431 | + ; Single issue | ||
432 | + EOR r5, r5, r10 ; r5 = m2^p4 | ||
433 | + EOR r11,r11,r10 ; r11= m2^~p7 | ||
434 | + UHADD8 r5, r5, r11 ; r5 = (m2^p4)+(m2^~p7)>>1 | ||
435 | + ; Single issue | ||
436 | + EOR r5, r5, r10 ; r5 = a2=m2^((m2^p4)+(m2^~p7)>>1) | ||
437 | + ; Single issue | ||
438 | + UHADD8 r5, r5, r12 ; r5 = a2+u2>>1 | ||
439 | + LDR r12,=0x7F7F7F7F ; r12 = {127}x4 | ||
440 | + UHADD8 r5, r5, r14 ; r5 = f2=(a2+u2>>1)+v2>>1 | ||
441 | + ; Now split f[i] by sign. | ||
442 | + ; There's no min or max instruction. | ||
443 | + ; We could use SSUB8 and SEL, but this is just as many instructions and | ||
444 | + ; dual issues more (for v7 without NEON). | ||
445 | + UQSUB8 r10,r4, r12 ; r10= R_i>0?R_i:0 | ||
446 | + UQSUB8 r4, r12,r4 ; r4 = R_i<0?-R_i:0 | ||
447 | + UQADD8 r11,r10,r2 ; r11= 255-max(2*L-abs(R_i<0),0) | ||
448 | + UQADD8 r14,r4, r2 ; r14= 255-max(2*L-abs(R_i>0),0) | ||
449 | + UQADD8 r10,r10,r11 | ||
450 | + UQADD8 r4, r4, r14 | ||
451 | + UQSUB8 r10,r10,r11 ; r10= min(abs(R_i<0),max(2*L-abs(R_i<0),0)) | ||
452 | + UQSUB8 r4, r4, r14 ; r4 = min(abs(R_i>0),max(2*L-abs(R_i>0),0)) | ||
453 | + UQSUB8 r11,r5, r12 ; r11= R_i>0?R_i:0 | ||
454 | + UQADD8 r6, r6, r10 | ||
455 | + UQSUB8 r8, r8, r10 | ||
456 | + UQSUB8 r5, r12,r5 ; r5 = R_i<0?-R_i:0 | ||
457 | + UQSUB8 r6, r6, r4 ; r6 = p1+lflim(R_i,L) | ||
458 | + UQADD8 r8, r8, r4 ; r8 = p2-lflim(R_i,L) | ||
459 | + UQADD8 r10,r11,r2 ; r10= 255-max(2*L-abs(R_i<0),0) | ||
460 | + UQADD8 r14,r5, r2 ; r14= 255-max(2*L-abs(R_i>0),0) | ||
461 | + UQADD8 r11,r11,r10 | ||
462 | + UQADD8 r5, r5, r14 | ||
463 | + UQSUB8 r11,r11,r10 ; r11= min(abs(R_i<0),max(2*L-abs(R_i<0),0)) | ||
464 | + UQSUB8 r5, r5, r14 ; r5 = min(abs(R_i>0),max(2*L-abs(R_i>0),0)) | ||
465 | + UQADD8 r7, r7, r11 | ||
466 | + UQSUB8 r9, r9, r11 | ||
467 | + UQSUB8 r7, r7, r5 ; r7 = p5+lflim(R_i,L) | ||
468 | + STRD r6, [r0, -r1] ; [p5:p1] = [r7: r6] | ||
469 | + UQADD8 r9, r9, r5 ; r9 = p6-lflim(R_i,L) | ||
470 | + STRD r8, [r0] ; [p6:p2] = [r9: r8] | ||
471 | + LDMFD r13!,{r4-r11,PC} | ||
472 | + ENDP | ||
473 | + | ||
474 | +oc_loop_filter_frag_rows_v6 PROC | ||
475 | + ; r0 = _ref_frame_data | ||
476 | + ; r1 = _ystride | ||
477 | + ; r2 = _bv | ||
478 | + ; r3 = _frags | ||
479 | + ; r4 = _fragi0 | ||
480 | + ; r5 = _fragi0_end | ||
481 | + ; r6 = _fragi_top | ||
482 | + ; r7 = _fragi_bot | ||
483 | + ; r8 = _frag_buf_offs | ||
484 | + ; r9 = _nhfrags | ||
485 | + MOV r12,r13 | ||
486 | + STMFD r13!,{r0,r4-r11,r14} | ||
487 | + LDMFD r12,{r4-r9} | ||
488 | + LDR r2, [r2] ; ll = *(int *)_bv | ||
489 | + CMP r4, r5 ; if(_fragi0>=_fragi0_end) | ||
490 | + BGE oslffri_v6_end ; bail | ||
491 | + SUBS r9, r9, #1 ; r9 = _nhfrags-1 if (r9<=0) | ||
492 | + BLE oslffri_v6_end ; bail | ||
493 | + ADD r3, r3, r4, LSL #2 ; r3 = &_frags[fragi] | ||
494 | + ADD r8, r8, r4, LSL #2 ; r8 = &_frag_buf_offs[fragi] | ||
495 | + SUB r7, r7, r9 ; _fragi_bot -= _nhfrags; | ||
496 | +oslffri_v6_lp1 | ||
497 | + MOV r10,r4 ; r10= fragi = _fragi0 | ||
498 | + ADD r11,r4, r9 ; r11= fragi_end-1=fragi+_nhfrags-1 | ||
499 | +oslffri_v6_lp2 | ||
500 | + LDR r14,[r3], #4 ; r14= _frags[fragi] _frags++ | ||
501 | + LDR r0, [r13] ; r0 = _ref_frame_data | ||
502 | + LDR r12,[r8], #4 ; r12= _frag_buf_offs[fragi] _frag_buf_offs++ | ||
503 | + TST r14,#OC_FRAG_CODED_FLAG | ||
504 | + BEQ oslffri_v6_uncoded | ||
505 | + CMP r10,r4 ; if (fragi>_fragi0) | ||
506 | + ADD r0, r0, r12 ; r0 = _ref_frame_data + _frag_buf_offs[fragi] | ||
507 | + BLGT loop_filter_h_v6 | ||
508 | + CMP r4, r6 ; if (fragi0>_fragi_top) | ||
509 | + BLGT loop_filter_v_v6 | ||
510 | + CMP r10,r11 ; if(fragi+1<fragi_end)===(fragi<fragi_end-1) | ||
511 | + LDRLT r12,[r3] ; r12 = _frags[fragi+1] | ||
512 | + ADD r0, r0, #8 | ||
513 | + ADD r10,r10,#1 ; r10 = fragi+1; | ||
514 | + ANDLT r12,r12,#OC_FRAG_CODED_FLAG | ||
515 | + CMPLT r12,#OC_FRAG_CODED_FLAG ; && _frags[fragi+1].coded==0 | ||
516 | + BLLT loop_filter_h_v6 | ||
517 | + CMP r10,r7 ; if (fragi<_fragi_bot) | ||
518 | + LDRLT r12,[r3, r9, LSL #2] ; r12 = _frags[fragi+1+_nhfrags-1] | ||
519 | + SUB r0, r0, #8 | ||
520 | + ADD r0, r0, r1, LSL #3 | ||
521 | + ANDLT r12,r12,#OC_FRAG_CODED_FLAG | ||
522 | + CMPLT r12,#OC_FRAG_CODED_FLAG | ||
523 | + BLLT loop_filter_v_v6 | ||
524 | + CMP r10,r11 ; while(fragi<=fragi_end-1) | ||
525 | + BLE oslffri_v6_lp2 | ||
526 | + MOV r4, r10 ; r4 = fragi0 += nhfrags | ||
527 | + CMP r4, r5 | ||
528 | + BLT oslffri_v6_lp1 | ||
529 | +oslffri_v6_end | ||
530 | + LDMFD r13!,{r0,r4-r11,PC} | ||
531 | +oslffri_v6_uncoded | ||
532 | + ADD r10,r10,#1 | ||
533 | + CMP r10,r11 | ||
534 | + BLE oslffri_v6_lp2 | ||
535 | + MOV r4, r10 ; r4 = fragi0 += nhfrags | ||
536 | + CMP r4, r5 | ||
537 | + BLT oslffri_v6_lp1 | ||
538 | + LDMFD r13!,{r0,r4-r11,PC} | ||
539 | + ENDP | ||
540 | + ] | ||
541 | + | ||
542 | + [ OC_ARM_ASM_NEON | ||
543 | + EXPORT oc_loop_filter_init_neon | ||
544 | + EXPORT oc_loop_filter_frag_rows_neon | ||
545 | + | ||
546 | +oc_loop_filter_init_neon PROC | ||
547 | + ; r0 = _bv | ||
548 | + ; r1 = _flimit (=L from the spec) | ||
549 | + MOV r1, r1, LSL #1 ; r1 = 2*L | ||
550 | + VDUP.S16 Q15, r1 ; Q15= 2L in U16s | ||
551 | + VST1.64 {D30,D31}, [r0@128] | ||
552 | + MOV PC,r14 | ||
553 | + ENDP | ||
554 | + | ||
555 | +loop_filter_h_neon PROC | ||
556 | + ; r0 = unsigned char *_pix | ||
557 | + ; r1 = int _ystride | ||
558 | + ; r2 = int *_bv | ||
559 | + ; preserves r0-r3 | ||
560 | + ; We assume Q15= 2*L in U16s | ||
561 | + ; My best guesses at cycle counts (and latency)--vvv | ||
562 | + SUB r12,r0, #2 | ||
563 | + ; Doing a 2-element structure load saves doing two VTRN's below, at the | ||
564 | + ; cost of using two more slower single-lane loads vs. the faster | ||
565 | + ; all-lane loads. | ||
566 | + ; It's less code this way, though, and benches a hair faster, but it | ||
567 | + ; leaves D2 and D4 swapped. | ||
568 | + VLD2.16 {D0[],D2[]}, [r12], r1 ; D0 = ____________1100 2,1 | ||
569 | + ; D2 = ____________3322 | ||
570 | + VLD2.16 {D4[],D6[]}, [r12], r1 ; D4 = ____________5544 2,1 | ||
571 | + ; D6 = ____________7766 | ||
572 | + VLD2.16 {D0[1],D2[1]},[r12], r1 ; D0 = ________99881100 3,1 | ||
573 | + ; D2 = ________BBAA3322 | ||
574 | + VLD2.16 {D4[1],D6[1]},[r12], r1 ; D4 = ________DDCC5544 3,1 | ||
575 | + ; D6 = ________FFEE7766 | ||
576 | + VLD2.16 {D0[2],D2[2]},[r12], r1 ; D0 = ____GGHH99881100 3,1 | ||
577 | + ; D2 = ____JJIIBBAA3322 | ||
578 | + VLD2.16 {D4[2],D6[2]},[r12], r1 ; D4 = ____KKLLDDCC5544 3,1 | ||
579 | + ; D6 = ____NNMMFFEE7766 | ||
580 | + VLD2.16 {D0[3],D2[3]},[r12], r1 ; D0 = PPOOGGHH99881100 3,1 | ||
581 | + ; D2 = RRQQJJIIBBAA3322 | ||
582 | + VLD2.16 {D4[3],D6[3]},[r12], r1 ; D4 = TTSSKKLLDDCC5544 3,1 | ||
583 | + ; D6 = VVUUNNMMFFEE7766 | ||
584 | + VTRN.8 D0, D4 ; D0 = SSOOKKGGCC884400 D4 = TTPPLLHHDD995511 1,1 | ||
585 | + VTRN.8 D2, D6 ; D2 = UUQQMMIIEEAA6622 D6 = VVRRNNJJFFBB7733 1,1 | ||
586 | + VSUBL.U8 Q0, D0, D6 ; Q0 = 00 - 33 in S16s 1,3 | ||
587 | + VSUBL.U8 Q8, D2, D4 ; Q8 = 22 - 11 in S16s 1,3 | ||
588 | + ADD r12,r0, #8 | ||
589 | + VADD.S16 Q0, Q0, Q8 ; 1,3 | ||
590 | + PLD [r12] | ||
591 | + VADD.S16 Q0, Q0, Q8 ; 1,3 | ||
592 | + PLD [r12,r1] | ||
593 | + VADD.S16 Q0, Q0, Q8 ; Q0 = [0-3]+3*[2-1] 1,3 | ||
594 | + PLD [r12,r1, LSL #1] | ||
595 | + VRSHR.S16 Q0, Q0, #3 ; Q0 = f = ([0-3]+3*[2-1]+4)>>3 1,4 | ||
596 | + ADD r12,r12,r1, LSL #2 | ||
597 | + ; We want to do | ||
598 | + ; f = CLAMP(MIN(-2L-f,0), f, MAX(2L-f,0)) | ||
599 | + ; = ((f >= 0) ? MIN( f ,MAX(2L- f ,0)) : MAX( f , MIN(-2L- f ,0))) | ||
600 | + ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) : MAX(-|f|, MIN(-2L+|f|,0))) | ||
601 | + ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) :-MIN( |f|,-MIN(-2L+|f|,0))) | ||
602 | + ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) :-MIN( |f|, MAX( 2L-|f|,0))) | ||
603 | + ; So we've reduced the left and right hand terms to be the same, except | ||
604 | + ; for a negation. | ||
605 | + ; Stall x3 | ||
606 | + VABS.S16 Q9, Q0 ; Q9 = |f| in U16s 1,4 | ||
607 | + PLD [r12,-r1] | ||
608 | + VSHR.S16 Q0, Q0, #15 ; Q0 = -1 or 0 according to sign 1,3 | ||
609 | + PLD [r12] | ||
610 | + VQSUB.U16 Q10,Q15,Q9 ; Q10= MAX(2L-|f|,0) in U16s 1,4 | ||
611 | + PLD [r12,r1] | ||
612 | + VMOVL.U8 Q1, D2 ; Q2 = __UU__QQ__MM__II__EE__AA__66__22 2,3 | ||
613 | + PLD [r12,r1,LSL #1] | ||
614 | + VMIN.U16 Q9, Q10,Q9 ; Q9 = MIN(|f|,MAX(2L-|f|)) 1,4 | ||
615 | + ADD r12,r12,r1, LSL #2 | ||
616 | + ; Now we need to correct for the sign of f. | ||
617 | + ; For negative elements of Q0, we want to subtract the appropriate | ||
618 | + ; element of Q9. For positive elements we want to add them. No NEON | ||
619 | + ; instruction exists to do this, so we need to negate the negative | ||
620 | + ; elements, and we can then just add them. a-b = a-(1+!b) = a-1+!b | ||
621 | + VADD.S16 Q9, Q9, Q0 ; 1,3 | ||
622 | + PLD [r12,-r1] | ||
623 | + VEOR.S16 Q9, Q9, Q0 ; Q9 = real value of f 1,3 | ||
624 | + ; Bah. No VRSBW.U8 | ||
625 | + ; Stall (just 1 as Q9 not needed to second pipeline stage. I think.) | ||
626 | + VADDW.U8 Q2, Q9, D4 ; Q1 = xxTTxxPPxxLLxxHHxxDDxx99xx55xx11 1,3 | ||
627 | + VSUB.S16 Q1, Q1, Q9 ; Q2 = xxUUxxQQxxMMxxIIxxEExxAAxx66xx22 1,3 | ||
628 | + VQMOVUN.S16 D4, Q2 ; D4 = TTPPLLHHDD995511 1,1 | ||
629 | + VQMOVUN.S16 D2, Q1 ; D2 = UUQQMMIIEEAA6622 1,1 | ||
630 | + SUB r12,r0, #1 | ||
631 | + VTRN.8 D4, D2 ; D4 = QQPPIIHHAA992211 D2 = MMLLEEDD6655 1,1 | ||
632 | + VST1.16 {D4[0]}, [r12], r1 | ||
633 | + VST1.16 {D2[0]}, [r12], r1 | ||
634 | + VST1.16 {D4[1]}, [r12], r1 | ||
635 | + VST1.16 {D2[1]}, [r12], r1 | ||
636 | + VST1.16 {D4[2]}, [r12], r1 | ||
637 | + VST1.16 {D2[2]}, [r12], r1 | ||
638 | + VST1.16 {D4[3]}, [r12], r1 | ||
639 | + VST1.16 {D2[3]}, [r12], r1 | ||
640 | + MOV PC,r14 | ||
641 | + ENDP | ||
642 | + | ||
643 | +loop_filter_v_neon PROC | ||
644 | + ; r0 = unsigned char *_pix | ||
645 | + ; r1 = int _ystride | ||
646 | + ; r2 = int *_bv | ||
647 | + ; preserves r0-r3 | ||
648 | + ; We assume Q15= 2*L in U16s | ||
649 | + ; My best guesses at cycle counts (and latency)--vvv | ||
650 | + SUB r12,r0, r1, LSL #1 | ||
651 | + VLD1.64 {D0}, [r12@64], r1 ; D0 = SSOOKKGGCC884400 2,1 | ||
652 | + VLD1.64 {D2}, [r12@64], r1 ; D2 = TTPPLLHHDD995511 2,1 | ||
653 | + VLD1.64 {D4}, [r12@64], r1 ; D4 = UUQQMMIIEEAA6622 2,1 | ||
654 | + VLD1.64 {D6}, [r12@64] ; D6 = VVRRNNJJFFBB7733 2,1 | ||
655 | + VSUBL.U8 Q8, D4, D2 ; Q8 = 22 - 11 in S16s 1,3 | ||
656 | + VSUBL.U8 Q0, D0, D6 ; Q0 = 00 - 33 in S16s 1,3 | ||
657 | + ADD r12, #8 | ||
658 | + VADD.S16 Q0, Q0, Q8 ; 1,3 | ||
659 | + PLD [r12] | ||
660 | + VADD.S16 Q0, Q0, Q8 ; 1,3 | ||
661 | + PLD [r12,r1] | ||
662 | + VADD.S16 Q0, Q0, Q8 ; Q0 = [0-3]+3*[2-1] 1,3 | ||
663 | + SUB r12, r0, r1 | ||
664 | + VRSHR.S16 Q0, Q0, #3 ; Q0 = f = ([0-3]+3*[2-1]+4)>>3 1,4 | ||
665 | + ; We want to do | ||
666 | + ; f = CLAMP(MIN(-2L-f,0), f, MAX(2L-f,0)) | ||
667 | + ; = ((f >= 0) ? MIN( f ,MAX(2L- f ,0)) : MAX( f , MIN(-2L- f ,0))) | ||
668 | + ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) : MAX(-|f|, MIN(-2L+|f|,0))) | ||
669 | + ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) :-MIN( |f|,-MIN(-2L+|f|,0))) | ||
670 | + ; = ((f >= 0) ? MIN(|f|,MAX(2L-|f|,0)) :-MIN( |f|, MAX( 2L-|f|,0))) | ||
671 | + ; So we've reduced the left and right hand terms to be the same, except | ||
672 | + ; for a negation. | ||
673 | + ; Stall x3 | ||
674 | + VABS.S16 Q9, Q0 ; Q9 = |f| in U16s 1,4 | ||
675 | + VSHR.S16 Q0, Q0, #15 ; Q0 = -1 or 0 according to sign 1,3 | ||
676 | + ; Stall x2 | ||
677 | + VQSUB.U16 Q10,Q15,Q9 ; Q10= MAX(2L-|f|,0) in U16s 1,4 | ||
678 | + VMOVL.U8 Q2, D4 ; Q2 = __UU__QQ__MM__II__EE__AA__66__22 2,3 | ||
679 | + ; Stall x2 | ||
680 | + VMIN.U16 Q9, Q10,Q9 ; Q9 = MIN(|f|,MAX(2L-|f|)) 1,4 | ||
681 | + ; Now we need to correct for the sign of f. | ||
682 | + ; For negative elements of Q0, we want to subtract the appropriate | ||
683 | + ; element of Q9. For positive elements we want to add them. No NEON | ||
684 | + ; instruction exists to do this, so we need to negate the negative | ||
685 | + ; elements, and we can then just add them. a-b = a-(1+!b) = a-1+!b | ||
686 | + ; Stall x3 | ||
687 | + VADD.S16 Q9, Q9, Q0 ; 1,3 | ||
688 | + ; Stall x2 | ||
689 | + VEOR.S16 Q9, Q9, Q0 ; Q9 = real value of f 1,3 | ||
690 | + ; Bah. No VRSBW.U8 | ||
691 | + ; Stall (just 1 as Q9 not needed to second pipeline stage. I think.) | ||
692 | + VADDW.U8 Q1, Q9, D2 ; Q1 = xxTTxxPPxxLLxxHHxxDDxx99xx55xx11 1,3 | ||
693 | + VSUB.S16 Q2, Q2, Q9 ; Q2 = xxUUxxQQxxMMxxIIxxEExxAAxx66xx22 1,3 | ||
694 | + VQMOVUN.S16 D2, Q1 ; D2 = TTPPLLHHDD995511 1,1 | ||
695 | + VQMOVUN.S16 D4, Q2 ; D4 = UUQQMMIIEEAA6622 1,1 | ||
696 | + VST1.64 {D2}, [r12@64], r1 | ||
697 | + VST1.64 {D4}, [r12@64], r1 | ||
698 | + MOV PC,r14 | ||
699 | + ENDP | ||
700 | + | ||
701 | +oc_loop_filter_frag_rows_neon PROC | ||
702 | + ; r0 = _ref_frame_data | ||
703 | + ; r1 = _ystride | ||
704 | + ; r2 = _bv | ||
705 | + ; r3 = _frags | ||
706 | + ; r4 = _fragi0 | ||
707 | + ; r5 = _fragi0_end | ||
708 | + ; r6 = _fragi_top | ||
709 | + ; r7 = _fragi_bot | ||
710 | + ; r8 = _frag_buf_offs | ||
711 | + ; r9 = _nhfrags | ||
712 | + MOV r12,r13 | ||
713 | + STMFD r13!,{r0,r4-r11,r14} | ||
714 | + LDMFD r12,{r4-r9} | ||
715 | + CMP r4, r5 ; if(_fragi0>=_fragi0_end) | ||
716 | + BGE oslffri_neon_end; bail | ||
717 | + SUBS r9, r9, #1 ; r9 = _nhfrags-1 if (r9<=0) | ||
718 | + BLE oslffri_neon_end ; bail | ||
719 | + VLD1.64 {D30,D31}, [r2@128] ; Q15= 2L in U16s | ||
720 | + ADD r3, r3, r4, LSL #2 ; r3 = &_frags[fragi] | ||
721 | + ADD r8, r8, r4, LSL #2 ; r8 = &_frag_buf_offs[fragi] | ||
722 | + SUB r7, r7, r9 ; _fragi_bot -= _nhfrags; | ||
723 | +oslffri_neon_lp1 | ||
724 | + MOV r10,r4 ; r10= fragi = _fragi0 | ||
725 | + ADD r11,r4, r9 ; r11= fragi_end-1=fragi+_nhfrags-1 | ||
726 | +oslffri_neon_lp2 | ||
727 | + LDR r14,[r3], #4 ; r14= _frags[fragi] _frags++ | ||
728 | + LDR r0, [r13] ; r0 = _ref_frame_data | ||
729 | + LDR r12,[r8], #4 ; r12= _frag_buf_offs[fragi] _frag_buf_offs++ | ||
730 | + TST r14,#OC_FRAG_CODED_FLAG | ||
731 | + BEQ oslffri_neon_uncoded | ||
732 | + CMP r10,r4 ; if (fragi>_fragi0) | ||
733 | + ADD r0, r0, r12 ; r0 = _ref_frame_data + _frag_buf_offs[fragi] | ||
734 | + BLGT loop_filter_h_neon | ||
735 | + CMP r4, r6 ; if (_fragi0>_fragi_top) | ||
736 | + BLGT loop_filter_v_neon | ||
737 | + CMP r10,r11 ; if(fragi+1<fragi_end)===(fragi<fragi_end-1) | ||
738 | + LDRLT r12,[r3] ; r12 = _frags[fragi+1] | ||
739 | + ADD r0, r0, #8 | ||
740 | + ADD r10,r10,#1 ; r10 = fragi+1; | ||
741 | + ANDLT r12,r12,#OC_FRAG_CODED_FLAG | ||
742 | + CMPLT r12,#OC_FRAG_CODED_FLAG ; && _frags[fragi+1].coded==0 | ||
743 | + BLLT loop_filter_h_neon | ||
744 | + CMP r10,r7 ; if (fragi<_fragi_bot) | ||
745 | + LDRLT r12,[r3, r9, LSL #2] ; r12 = _frags[fragi+1+_nhfrags-1] | ||
746 | + SUB r0, r0, #8 | ||
747 | + ADD r0, r0, r1, LSL #3 | ||
748 | + ANDLT r12,r12,#OC_FRAG_CODED_FLAG | ||
749 | + CMPLT r12,#OC_FRAG_CODED_FLAG | ||
750 | + BLLT loop_filter_v_neon | ||
751 | + CMP r10,r11 ; while(fragi<=fragi_end-1) | ||
752 | + BLE oslffri_neon_lp2 | ||
753 | + MOV r4, r10 ; r4 = _fragi0 += _nhfrags | ||
754 | + CMP r4, r5 | ||
755 | + BLT oslffri_neon_lp1 | ||
756 | +oslffri_neon_end | ||
757 | + LDMFD r13!,{r0,r4-r11,PC} | ||
758 | +oslffri_neon_uncoded | ||
759 | + ADD r10,r10,#1 | ||
760 | + CMP r10,r11 | ||
761 | + BLE oslffri_neon_lp2 | ||
762 | + MOV r4, r10 ; r4 = _fragi0 += _nhfrags | ||
763 | + CMP r4, r5 | ||
764 | + BLT oslffri_neon_lp1 | ||
765 | + LDMFD r13!,{r0,r4-r11,PC} | ||
766 | + ENDP | ||
767 | + ] | ||
768 | + | ||
769 | + END | ||
diff --git a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb deleted file mode 100644 index 11674af379..0000000000 --- a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | SUMMARY = "Theora Video Codec" | ||
2 | DESCRIPTION = "The libtheora reference implementation provides the standard encoder and decoder under a BSD license." | ||
3 | HOMEPAGE = "http://xiph.org/" | ||
4 | BUGTRACKER = "https://trac.xiph.org/newticket" | ||
5 | SECTION = "libs" | ||
6 | LICENSE = "BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132" | ||
8 | DEPENDS = "libogg" | ||
9 | |||
10 | |||
11 | SRC_URI = "http://downloads.xiph.org/releases/theora/libtheora-${PV}.tar.bz2 \ | ||
12 | file://no-docs.patch" | ||
13 | |||
14 | SRC_URI[md5sum] = "292ab65cedd5021d6b7ddd117e07cd8e" | ||
15 | SRC_URI[sha256sum] = "b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc" | ||
16 | |||
17 | UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)" | ||
18 | |||
19 | inherit autotools pkgconfig | ||
20 | |||
21 | EXTRA_OECONF = "--disable-examples" | ||
diff --git a/meta/recipes-multimedia/libtheora/libtheora_1.2.0.bb b/meta/recipes-multimedia/libtheora/libtheora_1.2.0.bb new file mode 100644 index 0000000000..04de8507fb --- /dev/null +++ b/meta/recipes-multimedia/libtheora/libtheora_1.2.0.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Theora Video Codec" | ||
2 | DESCRIPTION = "The libtheora reference implementation provides the standard encoder and decoder under a BSD license." | ||
3 | HOMEPAGE = "http://xiph.org/" | ||
4 | BUGTRACKER = "https://trac.xiph.org/newticket" | ||
5 | SECTION = "libs" | ||
6 | LICENSE = "BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132" | ||
8 | DEPENDS = "libogg" | ||
9 | |||
10 | SRC_URI = "http://downloads.xiph.org/releases/theora/libtheora-${PV}.tar.xz \ | ||
11 | file://0001-add-missing-files.patch" | ||
12 | |||
13 | SRC_URI[sha256sum] = "ebdf77a8f5c0a8f7a9e42323844fa09502b34eb1d1fece7b5f54da41fe2122ec" | ||
14 | |||
15 | UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)" | ||
16 | |||
17 | inherit autotools pkgconfig | ||
18 | |||
19 | EXTRA_OECONF = "--disable-examples --disable-doc" | ||
20 | |||
21 | # theora 1.2.0 has broken 32-bit arm assembler, see: | ||
22 | # https://gitlab.xiph.org/xiph/theora/-/issues/2339 | ||
23 | # https://gitlab.xiph.org/xiph/theora/-/issues/2340 | ||
24 | EXTRA_OECONF:append:arm = " --disable-asm" | ||
25 | |||
26 | # these old architectures don't support all the instructions from the asm source files | ||
27 | EXTRA_OECONF:append:armv4 = " --disable-asm " | ||
28 | EXTRA_OECONF:append:armv5 = " --disable-asm " | ||
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch deleted file mode 100644 index f5520fcafd..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch +++ /dev/null | |||
@@ -1,238 +0,0 @@ | |||
1 | From 335947359ce2dd3862cd9f7c49f92eba065dfed4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Su_Laus <sulau@freenet.de> | ||
3 | Date: Thu, 1 Feb 2024 13:06:08 +0000 | ||
4 | Subject: [PATCH] manpage: Update TIFF documentation about TIFFOpenOptions.rst | ||
5 | and TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes. | ||
6 | |||
7 | CVE: CVE-2023-52355 | ||
8 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/335947359ce2dd3862cd9f7c49f92eba065dfed4] | ||
9 | |||
10 | Signed-off-by: Yogita Urade <yogita.urade@windriver.com> | ||
11 | --- | ||
12 | doc/functions/TIFFDeferStrileArrayWriting.rst | 5 +++ | ||
13 | doc/functions/TIFFError.rst | 3 ++ | ||
14 | doc/functions/TIFFOpen.rst | 13 +++--- | ||
15 | doc/functions/TIFFOpenOptions.rst | 44 ++++++++++++++++++- | ||
16 | doc/functions/TIFFStrileQuery.rst | 5 +++ | ||
17 | doc/libtiff.rst | 31 ++++++++++++- | ||
18 | 6 files changed, 91 insertions(+), 10 deletions(-) | ||
19 | |||
20 | diff --git a/doc/functions/TIFFDeferStrileArrayWriting.rst b/doc/functions/TIFFDeferStrileArrayWriting.rst | ||
21 | index 60ee746..705aebc 100644 | ||
22 | --- a/doc/functions/TIFFDeferStrileArrayWriting.rst | ||
23 | +++ b/doc/functions/TIFFDeferStrileArrayWriting.rst | ||
24 | @@ -61,6 +61,11 @@ Diagnostics | ||
25 | All error messages are directed to the :c:func:`TIFFErrorExtR` routine. | ||
26 | Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. | ||
27 | |||
28 | +Note | ||
29 | +---- | ||
30 | + | ||
31 | +This functionality was introduced with libtiff 4.1. | ||
32 | + | ||
33 | See also | ||
34 | -------- | ||
35 | |||
36 | diff --git a/doc/functions/TIFFError.rst b/doc/functions/TIFFError.rst | ||
37 | index 99924ad..cf4b37c 100644 | ||
38 | --- a/doc/functions/TIFFError.rst | ||
39 | +++ b/doc/functions/TIFFError.rst | ||
40 | @@ -65,6 +65,9 @@ or :c:func:`TIFFClientOpenExt`. | ||
41 | Furthermore, a **custom defined data structure** *user_data* for the | ||
42 | error handler can be given along. | ||
43 | |||
44 | +Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the | ||
45 | +application-specific handler introduced with libtiff 4.5. | ||
46 | + | ||
47 | Note | ||
48 | ---- | ||
49 | |||
50 | diff --git a/doc/functions/TIFFOpen.rst b/doc/functions/TIFFOpen.rst | ||
51 | index db79d7b..adc474f 100644 | ||
52 | --- a/doc/functions/TIFFOpen.rst | ||
53 | +++ b/doc/functions/TIFFOpen.rst | ||
54 | @@ -94,8 +94,9 @@ TIFF structure without closing the file handle and afterwards the | ||
55 | file should be closed using its file descriptor *fd*. | ||
56 | |||
57 | :c:func:`TIFFOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFOpen`, | ||
58 | -but options, such as re-entrant error and warning handlers may be passed | ||
59 | -with the *opts* argument. The *opts* argument may be NULL. | ||
60 | +but options, such as re-entrant error and warning handlers and a limit in byte | ||
61 | +that libtiff internal memory allocation functions are allowed to request per call | ||
62 | +may be passed with the *opts* argument. The *opts* argument may be NULL. | ||
63 | Refer to :doc:`TIFFOpenOptions` for allocating and filling the *opts* argument | ||
64 | parameters. The allocated memory for :c:type:`TIFFOpenOptions` | ||
65 | can be released straight after successful execution of the related | ||
66 | @@ -105,9 +106,7 @@ can be released straight after successful execution of the related | ||
67 | but opens a TIFF file with a Unicode filename. | ||
68 | |||
69 | :c:func:`TIFFFdOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFFdOpen`, | ||
70 | -but options, such as re-entrant error and warning handlers may be passed | ||
71 | -with the *opts* argument. The *opts* argument may be NULL. | ||
72 | -Refer to :doc:`TIFFOpenOptions` for filling the *opts* argument. | ||
73 | +but options argument *opts* like for :c:func:`TIFFOpenExt` can be passed. | ||
74 | |||
75 | :c:func:`TIFFSetFileName` sets the file name in the tif-structure | ||
76 | and returns the old file name. | ||
77 | @@ -326,5 +325,5 @@ See also | ||
78 | |||
79 | :doc:`libtiff` (3tiff), | ||
80 | :doc:`TIFFClose` (3tiff), | ||
81 | -:doc:`TIFFStrileQuery`, | ||
82 | -:doc:`TIFFOpenOptions` | ||
83 | \ No newline at end of file | ||
84 | +:doc:`TIFFStrileQuery` (3tiff), | ||
85 | +:doc:`TIFFOpenOptions` | ||
86 | diff --git a/doc/functions/TIFFOpenOptions.rst b/doc/functions/TIFFOpenOptions.rst | ||
87 | index 5c67566..23f2975 100644 | ||
88 | --- a/doc/functions/TIFFOpenOptions.rst | ||
89 | +++ b/doc/functions/TIFFOpenOptions.rst | ||
90 | @@ -38,12 +38,17 @@ opaque structure and returns a :c:type:`TIFFOpenOptions` pointer. | ||
91 | :c:func:`TIFFOpenOptionsFree` releases the allocated memory for | ||
92 | :c:type:`TIFFOpenOptions`. The allocated memory for :c:type:`TIFFOpenOptions` | ||
93 | can be released straight after successful execution of the related | ||
94 | -TIFF open"Ext" functions like :c:func:`TIFFOpenExt`. | ||
95 | +TIFFOpen"Ext" functions like :c:func:`TIFFOpenExt`. | ||
96 | |||
97 | :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` sets parameter for the | ||
98 | maximum single memory limit in byte that ``libtiff`` internal memory allocation | ||
99 | functions are allowed to request per call. | ||
100 | |||
101 | +.. note:: | ||
102 | + However, the ``libtiff`` external functions :c:func:`_TIFFmalloc` | ||
103 | + and :c:func:`_TIFFrealloc` **do not apply** this internal memory | ||
104 | + allocation limit set by :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`! | ||
105 | + | ||
106 | :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` sets the function pointer to | ||
107 | an application-specific and per-TIFF handle (re-entrant) error handler. | ||
108 | Furthermore, a pointer to a **custom defined data structure** *errorhandler_user_data* | ||
109 | @@ -55,6 +60,43 @@ The *errorhandler_user_data* argument may be NULL. | ||
110 | :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` but for the warning handler, | ||
111 | which is invoked through :c:func:`TIFFWarningExtR` | ||
112 | |||
113 | +Example | ||
114 | +------- | ||
115 | + | ||
116 | +:: | ||
117 | + | ||
118 | + #include "tiffio.h" | ||
119 | + | ||
120 | + typedef struct MyErrorHandlerUserDataStruct | ||
121 | + { | ||
122 | + /* ... any user data structure ... */ | ||
123 | + } MyErrorHandlerUserDataStruct; | ||
124 | + | ||
125 | + static int myErrorHandler(TIFF *tiff, void *user_data, const char *module, | ||
126 | + const char *fmt, va_list ap) | ||
127 | + { | ||
128 | + MyErrorHandlerUserDataStruct *errorhandler_user_data = | ||
129 | + (MyErrorHandlerUserDataStruct *)user_data; | ||
130 | + /*... code of myErrorHandler ...*/ | ||
131 | + return 1; | ||
132 | + } | ||
133 | + | ||
134 | + | ||
135 | + main() | ||
136 | + { | ||
137 | + tmsize_t limit = (256 * 1024 * 1024); | ||
138 | + MyErrorHandlerUserDataStruct user_data = { /* ... any data ... */}; | ||
139 | + | ||
140 | + TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); | ||
141 | + TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); | ||
142 | + TIFFOpenOptionsSetErrorHandlerExtR(opts, myErrorHandler, &user_data); | ||
143 | + TIFF *tif = TIFFOpenExt("foo.tif", "r", opts); | ||
144 | + TIFFOpenOptionsFree(opts); | ||
145 | + /* ... go on here ... */ | ||
146 | + | ||
147 | + TIFFClose(tif); | ||
148 | + } | ||
149 | + | ||
150 | Note | ||
151 | ---- | ||
152 | |||
153 | diff --git a/doc/functions/TIFFStrileQuery.rst b/doc/functions/TIFFStrileQuery.rst | ||
154 | index f8631af..7931fe4 100644 | ||
155 | --- a/doc/functions/TIFFStrileQuery.rst | ||
156 | +++ b/doc/functions/TIFFStrileQuery.rst | ||
157 | @@ -66,6 +66,11 @@ Diagnostics | ||
158 | All error messages are directed to the :c:func:`TIFFErrorExtR` routine. | ||
159 | Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. | ||
160 | |||
161 | +Note | ||
162 | +---- | ||
163 | + | ||
164 | +This functionality was introduced with libtiff 4.1. | ||
165 | + | ||
166 | See also | ||
167 | -------- | ||
168 | |||
169 | diff --git a/doc/libtiff.rst b/doc/libtiff.rst | ||
170 | index 6a0054c..d96a860 100644 | ||
171 | --- a/doc/libtiff.rst | ||
172 | +++ b/doc/libtiff.rst | ||
173 | @@ -90,11 +90,15 @@ compatibility on machines with a segmented architecture. | ||
174 | :c:func:`realloc`, and :c:func:`free` routines in the C library.) | ||
175 | |||
176 | To deal with segmented pointer issues ``libtiff`` also provides | ||
177 | -:c:func:`_TIFFmemcpy`, :c:func:`_TIFFmemset`, and :c:func:`_TIFFmemmove` | ||
178 | +:c:func:`_TIFFmemcpy`, :c:func:`_TIFFmemset`, and :c:func:`_TIFFmemcmp` | ||
179 | routines that mimic the equivalent ANSI C routines, but that are | ||
180 | intended for use with memory allocated through :c:func:`_TIFFmalloc` | ||
181 | and :c:func:`_TIFFrealloc`. | ||
182 | |||
183 | +With ``libtiff`` 4.5 a method was introduced to limit the internal | ||
184 | +memory allocation that functions are allowed to request per call | ||
185 | +(see :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` and :c:func:`TIFFOpenExt`). | ||
186 | + | ||
187 | Error Handling | ||
188 | -------------- | ||
189 | |||
190 | @@ -106,6 +110,10 @@ routine that can be specified with a call to :c:func:`TIFFSetErrorHandler`. | ||
191 | Likewise warning messages are directed to a single handler routine | ||
192 | that can be specified with a call to :c:func:`TIFFSetWarningHandler` | ||
193 | |||
194 | +Further application-specific and per-TIFF handle (re-entrant) error handler | ||
195 | +and warning handler can be set. Please refer to :doc:`/functions/TIFFError` | ||
196 | +and :doc:`/functions/TIFFOpenOptions`. | ||
197 | + | ||
198 | Basic File Handling | ||
199 | ------------------- | ||
200 | |||
201 | @@ -139,7 +147,7 @@ a ``"w"`` argument: | ||
202 | main() | ||
203 | { | ||
204 | TIFF* tif = TIFFOpen("foo.tif", "w"); | ||
205 | - ... do stuff ... | ||
206 | + /* ... do stuff ... */ | ||
207 | TIFFClose(tif); | ||
208 | } | ||
209 | |||
210 | @@ -157,6 +165,25 @@ to always call :c:func:`TIFFClose` or :c:func:`TIFFFlush` to flush any | ||
211 | buffered information to a file. Note that if you call :c:func:`TIFFClose` | ||
212 | you do not need to call :c:func:`TIFFFlush`. | ||
213 | |||
214 | +.. warning:: | ||
215 | + | ||
216 | + In order to prevent out-of-memory issues when opening a TIFF file | ||
217 | + :c:func:`TIFFOpenExt` can be used and then the maximum single memory | ||
218 | + limit in byte that ``libtiff`` internal memory allocation functions | ||
219 | + are allowed to request per call can be set with | ||
220 | + :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`. | ||
221 | + | ||
222 | +Example | ||
223 | + | ||
224 | +:: | ||
225 | + | ||
226 | + tmsize_t limit = (256 * 1024 * 1024); | ||
227 | + TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); | ||
228 | + TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); | ||
229 | + TIFF *tif = TIFFOpenExt("foo.tif", "w", opts); | ||
230 | + TIFFOpenOptionsFree(opts); | ||
231 | + /* ... go on here ... */ | ||
232 | + | ||
233 | TIFF Directories | ||
234 | ---------------- | ||
235 | |||
236 | -- | ||
237 | 2.40.0 | ||
238 | |||
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch deleted file mode 100644 index 19a1ef727a..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 16ab4a205cfc938c32686e8d697d048fabf97ed4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Timothy Lyanguzov <theta682@gmail.com> | ||
3 | Date: Thu, 1 Feb 2024 11:19:06 +0000 | ||
4 | Subject: [PATCH] Fix typo. | ||
5 | |||
6 | CVE: CVE-2023-52355 | ||
7 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/16ab4a205cfc938c32686e8d697d048fabf97ed4] | ||
8 | |||
9 | Signed-off-by: Yogita Urade <yogita.urade@windriver.com> | ||
10 | --- | ||
11 | doc/libtiff.rst | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/doc/libtiff.rst b/doc/libtiff.rst | ||
15 | index d96a860..4fedc3e 100644 | ||
16 | --- a/doc/libtiff.rst | ||
17 | +++ b/doc/libtiff.rst | ||
18 | @@ -169,7 +169,7 @@ you do not need to call :c:func:`TIFFFlush`. | ||
19 | |||
20 | In order to prevent out-of-memory issues when opening a TIFF file | ||
21 | :c:func:`TIFFOpenExt` can be used and then the maximum single memory | ||
22 | - limit in byte that ``libtiff`` internal memory allocation functions | ||
23 | + limit in bytes that ``libtiff`` internal memory allocation functions | ||
24 | are allowed to request per call can be set with | ||
25 | :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`. | ||
26 | |||
27 | -- | ||
28 | 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 deleted file mode 100644 index 75f5d8946a..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52356.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 51558511bdbbcffdce534db21dbaf5d54b31638a Mon Sep 17 00:00:00 2001 | ||
2 | From: Even Rouault <even.rouault@spatialys.com> | ||
3 | Date: Thu, 1 Feb 2024 11:38:14 +0000 | ||
4 | Subject: [PATCH] TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of | ||
5 | col/row (fixes #622) | ||
6 | |||
7 | CVE: CVE-2023-52356 | ||
8 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/51558511bdbbcffdce534db21dbaf5d54b31638a] | ||
9 | |||
10 | Signed-off-by: Yogita Urade <yogita.urade@windriver.com> | ||
11 | --- | ||
12 | libtiff/tif_getimage.c | 15 +++++++++++++++ | ||
13 | 1 file changed, 15 insertions(+) | ||
14 | |||
15 | diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c | ||
16 | index 41f7dfd..9cd6eee 100644 | ||
17 | --- a/libtiff/tif_getimage.c | ||
18 | +++ b/libtiff/tif_getimage.c | ||
19 | @@ -3224,6 +3224,13 @@ int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster, | ||
20 | if (TIFFRGBAImageOK(tif, emsg) && | ||
21 | TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) | ||
22 | { | ||
23 | + if (row >= img.height) | ||
24 | + { | ||
25 | + TIFFErrorExtR(tif, TIFFFileName(tif), | ||
26 | + "Invalid row passed to TIFFReadRGBAStrip()."); | ||
27 | + TIFFRGBAImageEnd(&img); | ||
28 | + return (0); | ||
29 | + } | ||
30 | |||
31 | img.row_offset = row; | ||
32 | img.col_offset = 0; | ||
33 | @@ -3301,6 +3308,14 @@ int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, | ||
34 | return (0); | ||
35 | } | ||
36 | |||
37 | + if (col >= img.width || row >= img.height) | ||
38 | + { | ||
39 | + TIFFErrorExtR(tif, TIFFFileName(tif), | ||
40 | + "Invalid row/col passed to TIFFReadRGBATile()."); | ||
41 | + TIFFRGBAImageEnd(&img); | ||
42 | + return (0); | ||
43 | + } | ||
44 | + | ||
45 | /* | ||
46 | * The TIFFRGBAImageGet() function doesn't allow us to get off the | ||
47 | * edge of the image, even to fill an otherwise valid tile. So we | ||
48 | -- | ||
49 | 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 deleted file mode 100644 index 2020508fdf..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6228.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 1e7d217a323eac701b134afc4ae39b6bdfdbc96a Mon Sep 17 00:00:00 2001 | ||
2 | From: Su_Laus <sulau@freenet.de> | ||
3 | Date: Wed, 17 Jan 2024 06:57:08 +0000 | ||
4 | Subject: [PATCH] codec of input image is available, independently from codec | ||
5 | check of output image and return with error if not. | ||
6 | |||
7 | Fixes #606. | ||
8 | |||
9 | CVE: CVE-2023-6228 | ||
10 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/1e7d217a323eac701b134afc4ae39b6bdfdbc96a] | ||
11 | |||
12 | Signed-off-by: Yogita Urade <yogita.urade@windriver.com> | ||
13 | --- | ||
14 | tools/tiffcp.c | 2 ++ | ||
15 | 1 file changed, 2 insertions(+) | ||
16 | |||
17 | diff --git a/tools/tiffcp.c b/tools/tiffcp.c | ||
18 | index aff0626..a4f7f6b 100644 | ||
19 | --- a/tools/tiffcp.c | ||
20 | +++ b/tools/tiffcp.c | ||
21 | @@ -846,6 +846,8 @@ static int tiffcp(TIFF *in, TIFF *out) | ||
22 | if (!TIFFIsCODECConfigured(compression)) | ||
23 | return FALSE; | ||
24 | TIFFGetFieldDefaulted(in, TIFFTAG_COMPRESSION, &input_compression); | ||
25 | + if (!TIFFIsCODECConfigured(input_compression)) | ||
26 | + return FALSE; | ||
27 | TIFFGetFieldDefaulted(in, TIFFTAG_PHOTOMETRIC, &input_photometric); | ||
28 | if (input_compression == COMPRESSION_JPEG) | ||
29 | { | ||
30 | -- | ||
31 | 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 deleted file mode 100644 index 5d15dff1d9..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From e1640519208121f916da1772a5efb6ca28971b86 Mon Sep 17 00:00:00 2001 | ||
2 | From: Even Rouault <even.rouault@spatialys.com> | ||
3 | Date: Tue, 31 Oct 2023 15:04:37 +0000 | ||
4 | Subject: [PATCH 3/3] Apply 1 suggestion(s) to 1 file(s) | ||
5 | |||
6 | CVE: CVE-2023-6277 | ||
7 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545] | ||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | libtiff/tif_dirread.c | 1 - | ||
11 | 1 file changed, 1 deletion(-) | ||
12 | |||
13 | diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c | ||
14 | index fe8d6f8..58a4276 100644 | ||
15 | --- a/libtiff/tif_dirread.c | ||
16 | +++ b/libtiff/tif_dirread.c | ||
17 | @@ -5306,7 +5306,6 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, | ||
18 | { | ||
19 | uint64_t space; | ||
20 | uint16_t n; | ||
21 | - filesize = TIFFGetFileSize(tif); | ||
22 | if (!(tif->tif_flags & TIFF_BIGTIFF)) | ||
23 | space = sizeof(TIFFHeaderClassic) + 2 + dircount * 12 + 4; | ||
24 | else | ||
25 | -- | ||
26 | 2.43.0 | ||
27 | |||
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 deleted file mode 100644 index 9fc8182fef..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From f500facf7723f1cae725dd288b2daad15e45131c Mon Sep 17 00:00:00 2001 | ||
2 | From: Su_Laus <sulau@freenet.de> | ||
3 | Date: Mon, 30 Oct 2023 21:21:57 +0100 | ||
4 | Subject: [PATCH 2/3] At image reading, compare data size of some tags / data | ||
5 | structures (StripByteCounts, StripOffsets, StripArray, TIFF directory) with | ||
6 | file size to prevent provoked out-of-memory attacks. | ||
7 | MIME-Version: 1.0 | ||
8 | Content-Type: text/plain; charset=UTF-8 | ||
9 | Content-Transfer-Encoding: 8bit | ||
10 | |||
11 | See issue #614. | ||
12 | |||
13 | Correct declaration of ‘filesize’ shadows a previous local. | ||
14 | |||
15 | CVE: CVE-2023-6277 | ||
16 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545] | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | libtiff/tif_dirread.c | 1 - | ||
20 | 1 file changed, 1 deletion(-) | ||
21 | |||
22 | diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c | ||
23 | index c52d41f..fe8d6f8 100644 | ||
24 | --- a/libtiff/tif_dirread.c | ||
25 | +++ b/libtiff/tif_dirread.c | ||
26 | @@ -5305,7 +5305,6 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, | ||
27 | if (td->td_compression != COMPRESSION_NONE) | ||
28 | { | ||
29 | uint64_t space; | ||
30 | - uint64_t filesize; | ||
31 | uint16_t n; | ||
32 | filesize = TIFFGetFileSize(tif); | ||
33 | if (!(tif->tif_flags & TIFF_BIGTIFF)) | ||
34 | -- | ||
35 | 2.43.0 | ||
36 | |||
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 deleted file mode 100644 index d5854a9059..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
1 | From b33baa5d9c6aac8ce49b5180dd48e39697ab7a11 Mon Sep 17 00:00:00 2001 | ||
2 | From: Su_Laus <sulau@freenet.de> | ||
3 | Date: Fri, 27 Oct 2023 22:11:10 +0200 | ||
4 | Subject: [PATCH 1/3] At image reading, compare data size of some tags / data | ||
5 | structures (StripByteCounts, StripOffsets, StripArray, TIFF directory) with | ||
6 | file size to prevent provoked out-of-memory attacks. | ||
7 | |||
8 | See issue #614. | ||
9 | |||
10 | CVE: CVE-2023-6277 | ||
11 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | libtiff/tif_dirread.c | 90 +++++++++++++++++++++++++++++++++++++++++++ | ||
15 | 1 file changed, 90 insertions(+) | ||
16 | |||
17 | diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c | ||
18 | index 2c49dc6..c52d41f 100644 | ||
19 | --- a/libtiff/tif_dirread.c | ||
20 | +++ b/libtiff/tif_dirread.c | ||
21 | @@ -1308,6 +1308,21 @@ TIFFReadDirEntryArrayWithLimit(TIFF *tif, TIFFDirEntry *direntry, | ||
22 | datasize = (*count) * typesize; | ||
23 | assert((tmsize_t)datasize > 0); | ||
24 | |||
25 | + /* Before allocating a huge amount of memory for corrupted files, check if | ||
26 | + * size of requested memory is not greater than file size. | ||
27 | + */ | ||
28 | + uint64_t filesize = TIFFGetFileSize(tif); | ||
29 | + if (datasize > filesize) | ||
30 | + { | ||
31 | + TIFFWarningExtR(tif, "ReadDirEntryArray", | ||
32 | + "Requested memory size for tag %d (0x%x) %" PRIu32 | ||
33 | + " is greather than filesize %" PRIu64 | ||
34 | + ". Memory not allocated, tag not read", | ||
35 | + direntry->tdir_tag, direntry->tdir_tag, datasize, | ||
36 | + filesize); | ||
37 | + return (TIFFReadDirEntryErrAlloc); | ||
38 | + } | ||
39 | + | ||
40 | if (isMapped(tif) && datasize > (uint64_t)tif->tif_size) | ||
41 | return TIFFReadDirEntryErrIo; | ||
42 | |||
43 | @@ -5266,6 +5281,20 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, | ||
44 | if (!_TIFFFillStrilesInternal(tif, 0)) | ||
45 | return -1; | ||
46 | |||
47 | + /* Before allocating a huge amount of memory for corrupted files, check if | ||
48 | + * size of requested memory is not greater than file size. */ | ||
49 | + uint64_t filesize = TIFFGetFileSize(tif); | ||
50 | + uint64_t allocsize = (uint64_t)td->td_nstrips * sizeof(uint64_t); | ||
51 | + if (allocsize > filesize) | ||
52 | + { | ||
53 | + TIFFWarningExtR(tif, module, | ||
54 | + "Requested memory size for StripByteCounts of %" PRIu64 | ||
55 | + " is greather than filesize %" PRIu64 | ||
56 | + ". Memory not allocated", | ||
57 | + allocsize, filesize); | ||
58 | + return -1; | ||
59 | + } | ||
60 | + | ||
61 | if (td->td_stripbytecount_p) | ||
62 | _TIFFfreeExt(tif, td->td_stripbytecount_p); | ||
63 | td->td_stripbytecount_p = (uint64_t *)_TIFFCheckMalloc( | ||
64 | @@ -5807,6 +5836,20 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff, | ||
65 | dircount16 = (uint16_t)dircount64; | ||
66 | dirsize = 20; | ||
67 | } | ||
68 | + /* Before allocating a huge amount of memory for corrupted files, check | ||
69 | + * if size of requested memory is not greater than file size. */ | ||
70 | + uint64_t filesize = TIFFGetFileSize(tif); | ||
71 | + uint64_t allocsize = (uint64_t)dircount16 * dirsize; | ||
72 | + if (allocsize > filesize) | ||
73 | + { | ||
74 | + TIFFWarningExtR( | ||
75 | + tif, module, | ||
76 | + "Requested memory size for TIFF directory of %" PRIu64 | ||
77 | + " is greather than filesize %" PRIu64 | ||
78 | + ". Memory not allocated, TIFF directory not read", | ||
79 | + allocsize, filesize); | ||
80 | + return 0; | ||
81 | + } | ||
82 | origdir = _TIFFCheckMalloc(tif, dircount16, dirsize, | ||
83 | "to read TIFF directory"); | ||
84 | if (origdir == NULL) | ||
85 | @@ -5921,6 +5964,20 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff, | ||
86 | "directories not supported"); | ||
87 | return 0; | ||
88 | } | ||
89 | + /* Before allocating a huge amount of memory for corrupted files, check | ||
90 | + * if size of requested memory is not greater than file size. */ | ||
91 | + uint64_t filesize = TIFFGetFileSize(tif); | ||
92 | + uint64_t allocsize = (uint64_t)dircount16 * dirsize; | ||
93 | + if (allocsize > filesize) | ||
94 | + { | ||
95 | + TIFFWarningExtR( | ||
96 | + tif, module, | ||
97 | + "Requested memory size for TIFF directory of %" PRIu64 | ||
98 | + " is greather than filesize %" PRIu64 | ||
99 | + ". Memory not allocated, TIFF directory not read", | ||
100 | + allocsize, filesize); | ||
101 | + return 0; | ||
102 | + } | ||
103 | origdir = _TIFFCheckMalloc(tif, dircount16, dirsize, | ||
104 | "to read TIFF directory"); | ||
105 | if (origdir == NULL) | ||
106 | @@ -5968,6 +6025,8 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff, | ||
107 | } | ||
108 | } | ||
109 | } | ||
110 | + /* No check against filesize needed here because "dir" should have same size | ||
111 | + * than "origdir" checked above. */ | ||
112 | dir = (TIFFDirEntry *)_TIFFCheckMalloc( | ||
113 | tif, dircount16, sizeof(TIFFDirEntry), "to read TIFF directory"); | ||
114 | if (dir == 0) | ||
115 | @@ -7164,6 +7223,20 @@ static int TIFFFetchStripThing(TIFF *tif, TIFFDirEntry *dir, uint32_t nstrips, | ||
116 | return (0); | ||
117 | } | ||
118 | |||
119 | + /* Before allocating a huge amount of memory for corrupted files, check | ||
120 | + * if size of requested memory is not greater than file size. */ | ||
121 | + uint64_t filesize = TIFFGetFileSize(tif); | ||
122 | + uint64_t allocsize = (uint64_t)nstrips * sizeof(uint64_t); | ||
123 | + if (allocsize > filesize) | ||
124 | + { | ||
125 | + TIFFWarningExtR(tif, module, | ||
126 | + "Requested memory size for StripArray of %" PRIu64 | ||
127 | + " is greather than filesize %" PRIu64 | ||
128 | + ". Memory not allocated", | ||
129 | + allocsize, filesize); | ||
130 | + _TIFFfreeExt(tif, data); | ||
131 | + return (0); | ||
132 | + } | ||
133 | resizeddata = (uint64_t *)_TIFFCheckMalloc( | ||
134 | tif, nstrips, sizeof(uint64_t), "for strip array"); | ||
135 | if (resizeddata == 0) | ||
136 | @@ -7263,6 +7336,23 @@ static void allocChoppedUpStripArrays(TIFF *tif, uint32_t nstrips, | ||
137 | } | ||
138 | bytecount = last_offset + last_bytecount - offset; | ||
139 | |||
140 | + /* Before allocating a huge amount of memory for corrupted files, check if | ||
141 | + * size of StripByteCount and StripOffset tags is not greater than | ||
142 | + * file size. | ||
143 | + */ | ||
144 | + uint64_t allocsize = (uint64_t)nstrips * sizeof(uint64_t) * 2; | ||
145 | + uint64_t filesize = TIFFGetFileSize(tif); | ||
146 | + if (allocsize > filesize) | ||
147 | + { | ||
148 | + TIFFWarningExtR(tif, "allocChoppedUpStripArrays", | ||
149 | + "Requested memory size for StripByteCount and " | ||
150 | + "StripOffsets %" PRIu64 | ||
151 | + " is greather than filesize %" PRIu64 | ||
152 | + ". Memory not allocated", | ||
153 | + allocsize, filesize); | ||
154 | + return; | ||
155 | + } | ||
156 | + | ||
157 | newcounts = | ||
158 | (uint64_t *)_TIFFCheckMalloc(tif, nstrips, sizeof(uint64_t), | ||
159 | "for chopped \"StripByteCounts\" array"); | ||
160 | -- | ||
161 | 2.43.0 | ||
162 | |||
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.7.0.bb index d42ea6a6e5..5a6939d584 100644 --- a/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb +++ b/meta/recipes-multimedia/libtiff/tiff_4.7.0.bb | |||
@@ -3,28 +3,22 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \ | |||
3 | (TIFF), a widely used format for storing image data. This library \ | 3 | (TIFF), a widely used format for storing image data. This library \ |
4 | provide means to easily access and create TIFF image files." | 4 | provide means to easily access and create TIFF image files." |
5 | HOMEPAGE = "http://www.libtiff.org/" | 5 | HOMEPAGE = "http://www.libtiff.org/" |
6 | LICENSE = "BSD-2-Clause" | 6 | LICENSE = "libtiff" |
7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" | 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" |
8 | 8 | ||
9 | CVE_PRODUCT = "libtiff" | 9 | CVE_PRODUCT = "libtiff" |
10 | 10 | ||
11 | SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ | 11 | SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz" |
12 | file://CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch \ | ||
13 | file://CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch \ | ||
14 | file://CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch \ | ||
15 | file://CVE-2023-6228.patch \ | ||
16 | file://CVE-2023-52355-0001.patch \ | ||
17 | file://CVE-2023-52355-0002.patch \ | ||
18 | file://CVE-2023-52356.patch \ | ||
19 | " | ||
20 | 12 | ||
21 | SRC_URI[sha256sum] = "88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a" | 13 | SRC_URI[sha256sum] = "67160e3457365ab96c5b3286a0903aa6e78bdc44c4bc737d2e486bcecb6ba976" |
22 | 14 | ||
23 | # exclude betas | 15 | # exclude betas |
24 | UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" | 16 | UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" |
25 | 17 | ||
26 | 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" | 18 | 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" |
27 | CVE_STATUS[CVE-2023-3164] = "cpe-incorrect: Issue only affects the tiffcrop tool not compiled by default since 4.6.0" | 19 | CVE_STATUS[CVE-2023-52356] = "fixed-version: Fixed since 4.7.0, NVD tracks this as version-less vulnerability" |
20 | CVE_STATUS[CVE-2023-6228] = "fixed-version: Fixed since 4.7.0, NVD tracks this as version-less vulnerability" | ||
21 | CVE_STATUS[CVE-2023-6277] = "fixed-version: Fixed since 4.7.0, NVD tracks this as version-less vulnerability" | ||
28 | 22 | ||
29 | inherit autotools multilib_header | 23 | inherit autotools multilib_header |
30 | 24 | ||
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch index d4fac605b6..36f47f9173 100644 --- a/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch +++ b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch | |||
@@ -12,8 +12,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
12 | configure.ac | 19 +++++++++++++++++-- | 12 | configure.ac | 19 +++++++++++++++++-- |
13 | 1 file changed, 17 insertions(+), 2 deletions(-) | 13 | 1 file changed, 17 insertions(+), 2 deletions(-) |
14 | 14 | ||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 28b0a14..2d4e984 100644 | ||
17 | --- a/configure.ac | 15 | --- a/configure.ac |
18 | +++ b/configure.ac | 16 | +++ b/configure.ac |
19 | @@ -98,6 +98,16 @@ AC_ARG_ENABLE(examples, | 17 | @@ -98,6 +98,16 @@ AC_ARG_ENABLE(examples, |
@@ -51,6 +49,20 @@ index 28b0a14..2d4e984 100644 | |||
51 | 49 | ||
52 | # glibc < 2.1.3 has a serious FP bug in the math inline header | 50 | # glibc < 2.1.3 has a serious FP bug in the math inline header |
53 | # that will cripple Vorbis. Look to see if the magic FP stack | 51 | # that will cripple Vorbis. Look to see if the magic FP stack |
54 | -- | 52 | @@ -178,12 +193,12 @@ else |
55 | 2.17.0 | 53 | fi;; |
56 | 54 | powerpc-*-linux*spe) | |
55 | DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES" | ||
56 | - CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -D_REENTRANT" | ||
57 | - PROFILE="-pg -g -O3 -ffast-math -mfused-madd -D_REENTRANT";; | ||
58 | + CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT" | ||
59 | + PROFILE="-pg -g -O3 -ffast-math -D_REENTRANT";; | ||
60 | powerpc-*-linux*) | ||
61 | DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES" | ||
62 | - CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT" | ||
63 | - PROFILE="-pg -g -O3 -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT";; | ||
64 | + CFLAGS="-O3 -Wall -Wextra -ffast-math -mcpu=750 -D_REENTRANT" | ||
65 | + PROFILE="-pg -g -O3 -ffast-math -mcpu=750 -D_REENTRANT";; | ||
66 | *-*-linux*) | ||
67 | DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" | ||
68 | CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char" | ||
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb index 023bce0abe..d5bf5ff0fa 100644 --- a/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb +++ b/meta/recipes-multimedia/libvorbis/libvorbis_1.3.7.bb | |||
@@ -13,7 +13,6 @@ DEPENDS = "libogg" | |||
13 | SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \ | 13 | SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \ |
14 | file://0001-configure-Check-for-clang.patch \ | 14 | file://0001-configure-Check-for-clang.patch \ |
15 | " | 15 | " |
16 | SRC_URI[md5sum] = "50902641d358135f06a8392e61c9ac77" | ||
17 | SRC_URI[sha256sum] = "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b" | 16 | SRC_URI[sha256sum] = "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b" |
18 | 17 | ||
19 | inherit autotools pkgconfig | 18 | inherit autotools pkgconfig |
diff --git a/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb b/meta/recipes-multimedia/mpg123/mpg123_1.33.0.bb index f7786e8588..2905bf0abc 100644 --- a/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb +++ b/meta/recipes-multimedia/mpg123/mpg123_1.33.0.bb | |||
@@ -10,7 +10,7 @@ LICENSE = "LGPL-2.1-only" | |||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=e7b9c15fcfb986abb4cc5e8400a24169" | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=e7b9c15fcfb986abb4cc5e8400a24169" |
11 | 11 | ||
12 | SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2" | 12 | SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2" |
13 | SRC_URI[sha256sum] = "ccdd1d0abc31d73d8b435fc658c79049d0a905b30669b6a42a03ad169dc609e6" | 13 | SRC_URI[sha256sum] = "2290e3aede6f4d163e1a17452165af33caad4b5f0948f99429cfa2d8385faa9d" |
14 | 14 | ||
15 | UPSTREAM_CHECK_REGEX = "mpg123-(?P<pver>\d+(\.\d+)+)\.tar" | 15 | UPSTREAM_CHECK_REGEX = "mpg123-(?P<pver>\d+(\.\d+)+)\.tar" |
16 | 16 | ||
@@ -28,7 +28,7 @@ PACKAGECONFIG[jack] = ",,jack" | |||
28 | PACKAGECONFIG[openal] = ",,openal-soft" | 28 | PACKAGECONFIG[openal] = ",,openal-soft" |
29 | PACKAGECONFIG[portaudio] = ",,portaudio-v19" | 29 | PACKAGECONFIG[portaudio] = ",,portaudio-v19" |
30 | PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio" | 30 | PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio" |
31 | PACKAGECONFIG[sdl] = ",,libsdl2" | 31 | PACKAGECONFIG[sdl] = ",,virtual/libsdl2" |
32 | 32 | ||
33 | # Following are possible sound output modules: | 33 | # Following are possible sound output modules: |
34 | # alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi | 34 | # alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi |
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 9fb5c81757..695f4b676d 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc | |||
@@ -71,6 +71,14 @@ inherit bash-completion meson pkgconfig useradd gettext perlnative systemd manpa | |||
71 | # if using --disable-nls | 71 | # if using --disable-nls |
72 | USE_NLS = "yes" | 72 | USE_NLS = "yes" |
73 | 73 | ||
74 | # Helps tests for -msse fail on non-SSE architectures which is all non-x86 | ||
75 | TUNE_CCARGS:append:toolchain-clang = " -Werror=unused-command-line-argument" | ||
76 | |||
77 | # mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2] | ||
78 | # vld1.s32 ${1:h}, [$3] ' | ||
79 | TOOLCHAIN:armv7ve = "gcc" | ||
80 | TOOLCHAIN:armv7a = "gcc" | ||
81 | |||
74 | EXTRA_OEMESON = "\ | 82 | EXTRA_OEMESON = "\ |
75 | -Dhal-compat=false \ | 83 | -Dhal-compat=false \ |
76 | -Dorc=disabled \ | 84 | -Dorc=disabled \ |
@@ -121,9 +129,10 @@ PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" | |||
121 | # able to use pulseaudio autospawn for root as well. | 129 | # able to use pulseaudio autospawn for root as well. |
122 | PACKAGECONFIG[autospawn-for-root] = ",,," | 130 | PACKAGECONFIG[autospawn-for-root] = ",,," |
123 | PACKAGECONFIG[lirc] = "-Dlirc=enabled,-Dlirc=disabled,lirc" | 131 | PACKAGECONFIG[lirc] = "-Dlirc=enabled,-Dlirc=disabled,lirc" |
124 | PACKAGECONFIG[webrtc] = "-Dwebrtc-aec=enabled,-Dwebrtc-aec=disabled,webrtc-audio-processing" | 132 | PACKAGECONFIG[webrtc] = "-Dwebrtc-aec=enabled,-Dwebrtc-aec=disabled,webrtc-audio-processing-1" |
125 | PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," | 133 | PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," |
126 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," | 134 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," |
135 | PACKAGECONFIG[oss-output] = "-Doss-output=enabled,-Doss-output=disabled," | ||
127 | 136 | ||
128 | export TARGET_PFPU = "${TARGET_FPU}" | 137 | export TARGET_PFPU = "${TARGET_FPU}" |
129 | 138 | ||
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb index 54c79b4097..6c172b4ec7 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | require pulseaudio.inc | 1 | require pulseaudio.inc |
2 | 2 | ||
3 | SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ | 3 | SRC_URI = "http://www.freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ |
4 | file://0001-client-conf-Add-allow-autospawn-for-root.patch \ | 4 | file://0001-client-conf-Add-allow-autospawn-for-root.patch \ |
5 | file://0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch \ | 5 | file://0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch \ |
6 | file://volatiles.04_pulse \ | 6 | file://volatiles.04_pulse \ |
diff --git a/meta/recipes-multimedia/sbc/sbc_2.0.bb b/meta/recipes-multimedia/sbc/sbc_2.1.bb index d25be9e80c..8b91e7e65b 100644 --- a/meta/recipes-multimedia/sbc/sbc_2.0.bb +++ b/meta/recipes-multimedia/sbc/sbc_2.1.bb | |||
@@ -7,16 +7,19 @@ LICENSE:${PN} = "LGPL-2.1-or-later" | |||
7 | LICENSE:${PN}-examples = "GPL-2.0-or-later" | 7 | LICENSE:${PN}-examples = "GPL-2.0-or-later" |
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ |
9 | file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ | 9 | file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ |
10 | file://src/sbcenc.c;beginline=1;endline=24;md5=08e7a70b127f4100ff2cd7d629147d8d \ | 10 | file://src/sbcenc.c;beginline=1;endline=8;md5=cfac6012e2dea914de8b3b7693591622 \ |
11 | file://sbc/sbc.h;beginline=1;endline=26;md5=0f57d0df22b0d40746bdd29805a4361b" | 11 | file://sbc/sbc.h;beginline=1;endline=10;md5=bbf642bd99160e4f2a5bbd5d174a8320 \ |
12 | " | ||
12 | 13 | ||
13 | DEPENDS = "libsndfile1" | 14 | DEPENDS = "libsndfile1" |
14 | 15 | ||
15 | SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz" | 16 | SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz" |
16 | 17 | ||
17 | SRC_URI[sha256sum] = "8f12368e1dbbf55e14536520473cfb338c84b392939cc9b64298360fd4a07992" | 18 | SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead3299fcc2" |
18 | 19 | ||
19 | inherit autotools pkgconfig | 20 | inherit autotools pkgconfig |
20 | 21 | ||
22 | CFLAGS += "-std=gnu17" | ||
23 | |||
21 | PACKAGES =+ "${PN}-examples" | 24 | PACKAGES =+ "${PN}-examples" |
22 | FILES:${PN}-examples += "${bindir}/*" | 25 | FILES:${PN}-examples += "${bindir}/*" |
diff --git a/meta/recipes-multimedia/webp/libwebp_1.4.0.bb b/meta/recipes-multimedia/webp/libwebp_1.5.0.bb index d922970479..39fe947eea 100644 --- a/meta/recipes-multimedia/webp/libwebp_1.4.0.bb +++ b/meta/recipes-multimedia/webp/libwebp_1.5.0.bb | |||
@@ -13,8 +13,8 @@ LICENSE = "BSD-3-Clause" | |||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \ | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \ |
14 | file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7" | 14 | file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7" |
15 | 15 | ||
16 | SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz" | 16 | SRC_URI = "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/${BP}.tar.gz" |
17 | SRC_URI[sha256sum] = "61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5" | 17 | SRC_URI[sha256sum] = "7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c" |
18 | 18 | ||
19 | UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html" | 19 | UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html" |
20 | 20 | ||
diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb index fae88d24d1..3cc3392593 100644 --- a/meta/recipes-multimedia/x264/x264_git.bb +++ b/meta/recipes-multimedia/x264/x264_git.bb | |||
@@ -16,8 +16,6 @@ SRCREV = "31e19f92f00c7003fa115047ce50978bc98c3a0d" | |||
16 | 16 | ||
17 | PV = "r3039+git" | 17 | PV = "r3039+git" |
18 | 18 | ||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit lib_package pkgconfig | 19 | inherit lib_package pkgconfig |
22 | 20 | ||
23 | X264_DISABLE_ASM = "" | 21 | X264_DISABLE_ASM = "" |