Skip to contentSkip to conversation

aom: Upgrade to 3.6.1

PATCH New Khem Raj 1 participant 3 messages May 23, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/3 aom: Upgrade to 3.6.1

Switch to using nasm instead of yasm on x86 builds for asm optimizations. This is to enable reproducible builds even though yasm is preferred but it encodes FILE directive in ELF to absolute path of asm files and results in buildpath warnings, there is no way to remove it without editing the final binaries. nasm provides --reproducible option to handle it nicely

License-Update: Fixes a typo [1]

[1] https://aomedia.googlesource.com/aom/+/f97c63026174df67bc08c75fa72bf0ad01ca1a98

---
 ...neon-Provide-prototypes-for-missing-.patch | 83 ++++++++++++++++---
 .../aom/{aom_3.4.0.bb => aom_3.6.1.bb}        | 15 ++--
 2 files changed, 79 insertions(+), 19 deletions(-)
 rename meta-multimedia/recipes-multimedia/aom/{aom_3.4.0.bb => aom_3.6.1.bb} (75%)
meta-multimedia/recipes-multimedia/aom/aom/0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch +72 -11
index 100507cdec..8a8350ec57 100644
@@ -1,6 +1,6 @@
-From c33e07f78982acfb0574a84fb523f8591e55c50e Mon Sep 17 00:00:00 2001
+From 35c1ed84a158354c37e329bad0e236b156836ac7 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
-Date: Sun, 11 Sep 2022 19:46:28 -0700
+Date: Tue, 23 May 2023 14:59:26 -0700
 Subject: [PATCH] subpel_variance_neon: Provide prototypes for missing
  functions
 
@@ -11,18 +11,19 @@ larations [-Wimplicit-function-declaration]
 |          ^
 
 Upstream-Status: Pending
+
 Signed-off-by: Khem Raj <[email protected]>
 ---
- aom_dsp/arm/subpel_variance_neon.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
+ aom_dsp/arm/subpel_variance_neon.c | 76 ++++++++++++++++++++++++++++++
+ 1 file changed, 76 insertions(+)
 
 diff --git a/aom_dsp/arm/subpel_variance_neon.c b/aom_dsp/arm/subpel_variance_neon.c
-index 4ecf891cbeb..859168ea0c5 100644
+index a05886066c4..ea6bada224d 100644
 --- a/aom_dsp/arm/subpel_variance_neon.c
 +++ b/aom_dsp/arm/subpel_variance_neon.c
-@@ -20,6 +20,22 @@
- #include "aom_dsp/aom_filter.h"
+@@ -20,6 +20,82 @@
  #include "aom_dsp/variance.h"
+ #include "aom_dsp/arm/mem_neon.h"
  
 +extern unsigned int aom_variance8x8_neon(const uint8_t *a, int a_stride,
 +                                         const uint8_t *b, int b_stride,
@@ -32,17 +33,77 @@ index 4ecf891cbeb..859168ea0c5 100644
 +                                         const uint8_t *b, int b_stride,
 +                                         unsigned int *sse);
 +
++extern unsigned int aom_variance16x32_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance16x64_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance32x8_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance32x16_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
 +extern unsigned int aom_variance32x32_neon(const uint8_t *a, int a_stride,
 +                                         const uint8_t *b, int b_stride,
 +                                         unsigned int *sse);
 +
++extern unsigned int aom_variance32x64_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance32x128_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance64x8_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance64x16_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance64x32_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
 +extern unsigned int aom_variance64x64_neon(const uint8_t *a, int a_stride,
 +                                         const uint8_t *b, int b_stride,
 +                                         unsigned int *sse);
 +
- // Load 2 sets of 4 bytes when alignment is not guaranteed.
- static INLINE uint8x8_t load_unaligned_u8(const uint8_t *buf, int stride) {
-   uint32_t a;
++extern unsigned int aom_variance64x128_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x8_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x16_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x32_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x64_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
++extern unsigned int aom_variance128x128_neon(const uint8_t *a, int a_stride,
++                                         const uint8_t *b, int b_stride,
++                                         unsigned int *sse);
++
+ static void var_filter_block2d_bil_w4(const uint8_t *src_ptr, uint8_t *dst_ptr,
+                                       int src_stride, int pixel_step,
+                                       int dst_height, int filter_offset) {
 -- 
-2.37.3
+2.40.1
 
meta-multimedia/recipes-multimedia/aom/aom_3.6.1.bb renamed from meta-multimedia/recipes-multimedia/aom/aom_3.4.0.bb +7 -8
similarity index 75%
rename from meta-multimedia/recipes-multimedia/aom/aom_3.4.0.bb
rename to meta-multimedia/recipes-multimedia/aom/aom_3.6.1.bb
index 9cd6f7a9e9..ff7f0d0902 100644
@@ -3,23 +3,22 @@ DESCRIPTION = "Alliance for Open Media AV1 codec library"
 
 LICENSE = "BSD-2-Clause & AOM-Patent-License-1.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=6ea91368c1bbdf877159435572b931f5 \
-                    file://PATENTS;md5=e69ad12202bd20da3c76a5d3648cfa83 \
+                    file://PATENTS;md5=a111d47497d3bb49e04eef71377eb8ba \
                    "
-
+SRCREV = "7ade96172b95adc91a5d85bf80c90989cd543ee8"
 SRC_URI = "git://aomedia.googlesource.com/aom;protocol=https;branch=main \
-           file://0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch \
-          "
-
-SRCREV = "fd0c9275d36930a6eea6d3c35972e7cf9c512944"
+           file://0001-subpel_variance_neon-Provide-prototypes-for-missing-.patch"
 
 S = "${WORKDIR}/git"
 
 inherit cmake pkgconfig
-DEPENDS = " yasm-native"
+
+DEPENDS = " nasm-native"
 
 EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=1 -DENABLE_TESTS=0 \
+                  -DAOM_AS_FLAGS=--reproducible \
                   -DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl \
                 "
-
+CMAKE_VERBOSE = "VERBOSE=1"
 CFLAGS:append:libc-musl = " -D_GNU_SOURCE"
 EXTRA_OECMAKE:append:arm = " ${@bb.utils.contains("TUNE_FEATURES","neon","-DENABLE_NEON=ON","-DENABLE_NEON=OFF",d)}"
Signature · 1 line
2.40.1
author
#1 lore raw

PATCH v2 2/3 aom: Pass nasm flags via toochain.cmake

---
 meta-multimedia/recipes-multimedia/aom/aom_3.6.1.bb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta-multimedia/recipes-multimedia/aom/aom_3.6.1.bb +6 -3
index ff7f0d0902..45dd487f30 100644
@@ -15,10 +15,13 @@ inherit cmake pkgconfig
 
 DEPENDS = " nasm-native"
 
-EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=1 -DENABLE_TESTS=0 \
-                  -DAOM_AS_FLAGS=--reproducible \
-                  -DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl \
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=1 -DENABLE_TESTS=0 \
+                 -DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl \
                 "
 CMAKE_VERBOSE = "VERBOSE=1"
 CFLAGS:append:libc-musl = " -D_GNU_SOURCE"
 EXTRA_OECMAKE:append:arm = " ${@bb.utils.contains("TUNE_FEATURES","neon","-DENABLE_NEON=ON","-DENABLE_NEON=OFF",d)}"
+
+do_generate_toolchain_file:append() {
+    echo "set(AOM_AS_FLAGS --debug-prefix-map ${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR})" >> ${WORKDIR}/toolchain.cmake
+}
Signature · 1 line
2.40.1
author
#2 lore raw

PATCH v2 3/3 uml-utilities: Fix references to TMPDIR

In reply to Khem Raj

Pass CFLAGS from environment

Fixes
WARNING: uml-utilities-20040406-r1 do_package_qa: QA Issue: File /usr/lib/uml/.debug/port-helper in package uml-utilities-dbg contains reference to TMPDIR

---
 .../0001-cow.c-Replace-stat64-with-stat.patch |  34 +++++
 ...ppend-to-CFLAGS-instead-of-re-assign.patch | 122 ++++++++++++++++++
 .../uml-utilities/uml-utilities_20040406.bb   |   2 +
 3 files changed, 158 insertions(+)
 create mode 100644 meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-cow.c-Replace-stat64-with-stat.patch
 create mode 100644 meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-makefiles-Append-to-CFLAGS-instead-of-re-assign.patch
meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-cow.c-Replace-stat64-with-stat.patch new file +34 -0
new file mode 100644
index 0000000000..348d7ce104
@@ -0,0 +1,34 @@
+From c4f85268da6c30b0aec3d9a0e951b2088887cff4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 22 May 2023 18:35:37 -0700
+Subject: [PATCH] cow.c: Replace stat64 with stat
+
+LFS64 is deprecated in latest musl and this fails to build
+therefore switch to using stat API which is same as stat64 these days
+
+Upstream-Status: Inappropriate [No upstream]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ moo/cow.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/moo/cow.c
++++ b/moo/cow.c
+@@ -161,7 +161,7 @@ int write_cow_header(char *cow_file, int
+ 		     int sectorsize, int alignment, long long *size)
+ {
+         struct cow_header_v3 *header;
+-	struct stat64 buf;
++	struct stat buf;
+ 	int err;
+ 
+ 	err = cow_seek_file(fd, 0);
+@@ -192,7 +192,7 @@ int write_cow_header(char *cow_file, int
+ 		      backing_file))
+ 		goto out_free;
+ 
+-	err = stat64(header->backing_file, &buf);
++	err = stat(header->backing_file, &buf);
+ 	if(err < 0){
+ 		cow_printf("Stat of backing file '%s' failed, errno = %d\n",
+ 			   header->backing_file, errno);
meta-oe/recipes-extended/uml-utilities/uml-utilities-20040406/0001-makefiles-Append-to-CFLAGS-instead-of-re-assign.patch new file +122 -0

122 lines not on this page · raw message

meta-oe/recipes-extended/uml-utilities/uml-utilities_20040406.bb +2 -0
index 35ae5f777d..54bc1b21f1 100644
@@ -8,6 +8,8 @@ SRC_URI = "http://downloads.sourceforge.net/project/user-mode-linux/tools/1/uml_
            file://unstrip.patch \
            file://0001-include-required-system-header-files-for-fd_set-and-.patch \
            file://0001-Add-missing-standard-headers-for-str-and-exit-APIs.patch \
+           file://0001-cow.c-Replace-stat64-with-stat.patch \
+           file://0001-makefiles-Append-to-CFLAGS-instead-of-re-assign.patch \
            "
 SRC_URI[md5sum] = "2c1ccd9efacbfb39e42d482b89b2550a"
 SRC_URI[sha256sum] = "4f179b1db021ef15ac7e9b2eed57c525db127a754c574f591c367460cded9f41"
Signature · 1 line
2.40.1