On Wed, Feb 12, 2025 at 05:40:41PM -0500, Brad Smith wrote:
> Here is an update to aom 3.12.0.
> 
> 
> libaom v3.12.0 North Star release
> 
> 2025-02-10 v3.12.0
>   This release includes new codec interfaces, compression efficiency and
>   perceptual improvements, speedup and memory optimizations, and bug
>   fixes. This release is ABI compatible with the last release.
> 
>   Five internal functions (aom_free, aom_malloc, aom_wb_bytes_written,
>   aom_wb_write_bit, aom_wb_write_literal) that were exported by mistake
>   are no longer exported from the libaom shared library. The removal of
>   these internal functions from the ABI is a bug fix and does not break
>   ABI compatibility.
> 
>   Acknowledgments: The image quality optimizations in the new tuning
>   mode AOM_TUNE_IQ were originally developed for SVT-AV1-PSY by
>   Cole Ogaard, Gianni Rosato, Julio Barba, and Zakaria Djebrouni.
> 
>   - New Features
>     * New tuning mode AOM_TUNE_IQ (image quality) for the
>       AOME_SET_TUNING codec control (--tune=iq) in all-intra mode. The
>       feature detection macro AOM_HAVE_TUNE_IQ, if defined, indicates
>       that AOM_TUNE_IQ is available. The image quality optimizations in
>       AOM_TUNE_IQ were developed by using the SSIMULACRA 2 metric for
>       guidance and validated with subjective visual quality checks.
>     * New value 6 for the AV1E_SET_DELTAQ_MODE codec control
>       (--deltaq-mode): use modulation for all intra using Variance
>       Boost. Variance Boost is a variance adaptive quantization
>       implementation that modulates qindex depending on the ratio of
>       low-variance to high-variance 8x8 subblocks within a 64x64
>       superblock, as well as the actual variance of the subblocks
>       themselves.
>     * New value 3 for the AV1E_SET_ENABLE_CDEF codec control
>       (--enable-cdef): Enable CDEF adaptively based on frame qindex.
>     * In all-intra mode, the AOME_SET_SHARPNESS codec control now also
>       sets the loop_filter_sharpness syntax element in the bitstream.
>       Larger values increasingly reduce how much the filtering can
>       change the sample values on block edges to favor perceived
>       sharpness.
>     * In all-intra mode, the default value of the AV1E_SET_QM_MIN codec
>       control is decreased to 4, and the default value of the
>       AV1E_SET_QM_MAX codec control is increased to 10. The default
>       values in good-quality and realtime modes remain unchanged (5 and
>       9, respectively).
> 
>   - Compression Efficiency Improvements
>     * Tuning mode AOM_TUNE_IQ improves image compression efficiency on
>       the CLIC dataset by up to 12% for the same SSIMULACRA 2 score, up
>       to 14% for the same DSSIM score, and up to 17% for the same
>       Butteraugli score.
>     * ~3% BD-rate gains for speed 11 VGA camera mode.
>     * ~5% BD-rate gains for speed 11 on scroll clips screen mode.
> 
>   - Perceptual Quality Improvements
>     * Adjust temporal filter strength for better visual quality.
>     * RTC screen: visual quality improvements for scrolling and for
>       scene/slide changes.
>     * RTC camera mode: visual quality improvements for speed 11 VGA.
> 
>   - Speedup and Memory Optimizations
>     * Optimize the Arm Neon implementation of the loop filter functions
>       with an average uplift of 15 - 25% in microbenchmarks.
>     * Add the CDEF optimization for RISC-V.
>     * Help the compiler generate better vectorized code for variance
>       calculation and warped motion in generic CPU builds.
>     * Make several arrays const.
> 
>   - Other Improvements
>     * Binary size reduction: 1 - 2% compared with last release, with
>       CONFIG_REALTIME_ONLY enabled, CONFIG_AV1_DECODER and
>       CONFIG_AV1_HIGHBITDEPTH disabled.
>     * Build: compile source files in parallel under MSVC.
> 
>   - Bug Fixes
>     * Fix bug where metadata added with aom_img_add_metadata was lost
>       when frame scaling was used.
>     * Bug b:383306740: RTC: Fix to issues with scrolling for screen
>       content.
>     * Bug b:382465458: RTC: Fix to artifact for grayscale input.
>     * Bug b:380247338: RTC: Fix to encode_time spikes on scene/slide
>       changes.
>     * RTC: Fix to rate correction factor update for VBR screen mode.
>       https://groups.google.com/a/aomedia.org/g/av1-discuss/c/nJxECdg-7P8
>     * Bug b:378401081: RTC: Fix to cyclic refresh update for external RC
>       (rate control).
 
Here is an updated diff with some changes for PowerPC and RISC-V.

Needs testing on PowerPC64.

 
Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/aom/Makefile,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 Makefile
--- Makefile    29 Nov 2024 16:33:36 -0000      1.28
+++ Makefile    14 Feb 2025 07:19:27 -0000
@@ -1,11 +1,11 @@
 COMMENT=       Alliance for Open Media AV1 video codec
 
-V=             3.11.0
+V=             3.12.0
 DISTNAME=      libaom-$V
 PKGNAME=       aom-$V
 CATEGORIES=    multimedia
 
-SHARED_LIBS=   aom     5.0
+SHARED_LIBS=   aom     6.0
 
 HOMEPAGE=      https://aomedia.org/
 SITES=         https://storage.googleapis.com/aom-releases/
Index: distinfo
===================================================================
RCS file: /cvs/ports/multimedia/aom/distinfo,v
retrieving revision 1.23
diff -u -p -u -p -r1.23 distinfo
--- distinfo    29 Nov 2024 16:33:36 -0000      1.23
+++ distinfo    14 Feb 2025 07:19:27 -0000
@@ -1,2 +1,2 @@
-SHA256 (libaom-3.11.0.tar.gz) = z30QPSeY5RKsqcbnNT1+v4ln7pb//plG4BW7mUeQPj4=
-SIZE (libaom-3.11.0.tar.gz) = 5478757
+SHA256 (libaom-3.12.0.tar.gz) = 2J2qFgoOoUCcQZO+WxfJWRAkxPWg5UXcudGXU1xmg24=
+SIZE (libaom-3.12.0.tar.gz) = 5496350
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/multimedia/aom/patches/patch-CMakeLists_txt,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt        29 Nov 2024 16:33:36 -0000      1.9
+++ patches/patch-CMakeLists_txt        14 Feb 2025 07:19:27 -0000
@@ -1,13 +1,12 @@
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
-@@ -858,7 +858,8 @@ if(BUILD_SHARED_LIBS)
+@@ -865,7 +865,7 @@ if(BUILD_SHARED_LIBS)
+   # https://clang.llvm.org/docs/AddressSanitizer.html#usage. Similarly, see
    # https://clang.llvm.org/docs/MemorySanitizer.html#usage.
-   if(NOT WIN32
-      AND NOT APPLE
--     AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE))
-+     AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE)
-+     AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+   if(NOT
+-     (APPLE OR CYGWIN OR WIN32)
++     (APPLE OR CYGWIN OR WIN32 OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+      AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE))
      # The -z defs linker option reports unresolved symbol references from 
object
      # files when building a shared library.
-     if("${CMAKE_VERSION}" VERSION_LESS "3.13")
Index: patches/patch-aom_ports_aarch32_cpudetect_c
===================================================================
RCS file: 
/cvs/ports/multimedia/aom/patches/patch-aom_ports_aarch32_cpudetect_c,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-aom_ports_aarch32_cpudetect_c
--- patches/patch-aom_ports_aarch32_cpudetect_c 5 Feb 2025 19:15:54 -0000       
1.3
+++ patches/patch-aom_ports_aarch32_cpudetect_c 14 Feb 2025 07:19:27 -0000
@@ -1,4 +1,4 @@
-Allow ARM CPU runtime detection code to build on OpenBSD.
+Add ARM CPU feature detection support for OpenBSD.
 
 Index: aom_ports/aarch32_cpudetect.c
 --- aom_ports/aarch32_cpudetect.c.orig
Index: patches/patch-aom_ports_ppc_cpudetect_c
===================================================================
RCS file: /cvs/ports/multimedia/aom/patches/patch-aom_ports_ppc_cpudetect_c,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-aom_ports_ppc_cpudetect_c
--- patches/patch-aom_ports_ppc_cpudetect_c     11 Mar 2022 19:39:15 -0000      
1.3
+++ patches/patch-aom_ports_ppc_cpudetect_c     14 Feb 2025 07:19:27 -0000
@@ -1,32 +1,71 @@
-Allow PowerPC CPU runtime detection code to build on OpenBSD.
+Add PowerPC CPU feature detection support for OpenBSD.
 
 Index: aom_ports/ppc_cpudetect.c
 --- aom_ports/ppc_cpudetect.c.orig
 +++ aom_ports/ppc_cpudetect.c
-@@ -9,17 +9,20 @@
+@@ -9,11 +9,8 @@
   * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
   */
  
-+#if defined(__linux__)
- #include <fcntl.h>
+-#include <fcntl.h>
  #include <unistd.h>
  #include <stdint.h>
- #include <asm/cputable.h>
- #include <linux/auxvec.h>
-+#endif
+-#include <asm/cputable.h>
+-#include <linux/auxvec.h>
  
  #include "config/aom_config.h"
  
- #include "aom_ports/ppc.h"
+@@ -37,6 +34,12 @@ static int cpu_env_mask(void) {
+   return env && *env ? (int)strtol(env, NULL, 0) : ~0;
+ }
  
- #if CONFIG_RUNTIME_CPU_DETECT
 +#if defined(__linux__)
- static int cpu_env_flags(int *flags) {
-   char *env;
-   env = getenv("AOM_SIMD_CAPS");
-@@ -79,4 +82,5 @@ out_close:
++
++#include <fcntl.h>
++#include <asm/cputable.h>
++#include <linux/auxvec.h>
++
+ int ppc_simd_caps(void) {
+   int flags;
+   int mask;
+@@ -75,7 +78,40 @@ out_close:
+   close(fd);
+   return flags & mask;
+ }
++
++#elif defined(__OpenBSD__)
++
++#include <sys/auxv.h>
++
++// Define hwcap values ourselves: building with an old auxv header where these
++// hwcap values are not defined should not prevent features from being 
enabled.
++#define AOM_PPC_HWCAP_VSX (1 << 7)
++
++int ppc_simd_caps(void) {
++  int flags;
++  int mask;
++
++  // If AOM_SIMD_CAPS_MASK is set then allow only those capabilities.
++  if (!cpu_env_flags(&flags)) {
++    return flags;
++  }
++
++  mask = cpu_env_mask();
++
++#ifdef __OpenBSD__
++  unsigned long hwcap = 0;
++  elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
+ #else
++  unsigned long hwcap = getauxval(AT_HWCAP);
++#endif
++#if HAVE_VSX
++  if (hwcap & AOM_PPC_HWCAP_VSX) {
++    flags |= HAS_VSX;
++  }
++#endif  // HAVE_VSX
++  return flags & mask;
++}
++else
  // If there is no RTCD the function pointers are not used and can not be
  // changed.
  int ppc_simd_caps(void) { return 0; }
-+#endif
- #endif  // CONFIG_RUNTIME_CPU_DETECT
Index: patches/patch-aom_ports_riscv_cpudetect_c
===================================================================
RCS file: patches/patch-aom_ports_riscv_cpudetect_c
diff -N patches/patch-aom_ports_riscv_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-aom_ports_riscv_cpudetect_c   14 Feb 2025 07:19:27 -0000
@@ -0,0 +1,18 @@
+Add RISC-V CPU feature detection support for OpenBSD.
+
+Index: aom_ports/riscv_cpudetect.c
+--- aom_ports/riscv_cpudetect.c.orig
++++ aom_ports/riscv_cpudetect.c
+@@ -26,7 +26,12 @@
+ int riscv_simd_caps(void) {
+   int flags = 0;
+ #if HAVE_RVV
++#ifdef __OpenBSD__
++  unsigned long hwcap = 0;
++  elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
++#else
+   unsigned long hwcap = getauxval(AT_HWCAP);
++#endif
+   if (hwcap & HWCAP_RVV) flags |= HAS_RVV;
+ #endif
+   return flags;
Index: patches/patch-build_cmake_aom_configure_cmake
===================================================================
RCS file: 
/cvs/ports/multimedia/aom/patches/patch-build_cmake_aom_configure_cmake,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 patch-build_cmake_aom_configure_cmake
--- patches/patch-build_cmake_aom_configure_cmake       29 Oct 2024 12:28:48 
-0000      1.13
+++ patches/patch-build_cmake_aom_configure_cmake       14 Feb 2025 07:19:27 
-0000
@@ -3,7 +3,7 @@ ARM uses compiler intrinsics, so don't r
 Index: build/cmake/aom_configure.cmake
 --- build/cmake/aom_configure.cmake.orig
 +++ build/cmake/aom_configure.cmake
-@@ -192,6 +192,10 @@ elseif(AOM_TARGET_CPU MATCHES "arm")
+@@ -194,6 +194,10 @@ elseif(AOM_TARGET_CPU MATCHES "arm")
      if(NOT CMAKE_ASM_COMPILER)
        set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} "-c -mimplicit-it=always")
      endif()

Reply via email to