Index | Thread | Search

From:
Brad Smith <brad@comstyle.com>
Subject:
UPDATE: libavif 1.4.0
To:
ports@openbsd.org
Date:
Thu, 5 Mar 2026 23:07:50 -0500

Download raw body.

Thread
  • Brad Smith:

    UPDATE: libavif 1.4.0

Here is an update to libavif 1.4.0.


## [1.4.0] - 2026-03-04

### Added since 1.3.0

* Allow avifenc to read png or jpeg files through stdin using --stdin-format.
* Support some Sample Transform schemes as defined in the version 1.2 of the
  AVIF specification.
* Add an optional argument to the --depth flag of avifenc used to enable a bit
  depth extension scheme in the encoded file.
* Add support for converting jpeg files with Apple style gain maps.
* Add support for PNG cICP chunk when decoding PNG files. If a PNG file contains
  a cICP chunk and other color information chunks, such as iCCP (ICC profile),
  the other chunks are ignored as per the PNG Specification Third Edition
  Section 4.3.
* Support reading Sample-Transform-based 16-bit AVIF files when
  avifDecoder::imageContentToDecode & AVIF_IMAGE_CONTENT_SAMPLE_TRANSFORMS is
  not zero.
* Support Sample Transform derived image items with grid input image items.
* Add --sato flag to avifdec to enable Sample Transforms support at decoding.
* Add --grid option to avifgainmaputil.
* Apply clean aperture crop, rotation and mirror when decoding to PNG or JPEG.
  Remove orientation information from Exif if present.
* Add avif::RGBImageCleanup to the C++ API.


Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/libavif/Makefile,v
retrieving revision 1.25
diff -u -p -u -p -r1.25 Makefile
--- Makefile	20 Jul 2025 14:47:22 -0000	1.25
+++ Makefile	5 Mar 2026 19:45:32 -0000
@@ -1,13 +1,13 @@
 COMMENT=	library for encoding and decoding .avif files
 
-DIST_TUPLE+=	github AOMediaCodec libavif v1.3.0 .
+DIST_TUPLE+=	github AOMediaCodec libavif v1.4.0 .
 DIST_TUPLE+=	github lemenkov libyuv \
-		4db2af62dab48895226be6b52737247e898ebe36 ext/libyuv
+		deeb764bb92b6305ee0cb5dae7a5940fdb457fa9 ext/libyuv
 DIST_TUPLE+=	github kmurray libargparse \
-		ee74d1b53bd680748af14e737378de57e2a0a954 ext/libargparse
+		81998ffafb9c2ac8cf488d31e536a2e6fd6b3fdf ext/libargparse
 CATEGORIES=	graphics
 
-SHARED_LIBS=	avif	8.0
+SHARED_LIBS=	avif	9.0
 
 HOMEPAGE=	https://github.com/AOMediaCodec/libavif
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/graphics/libavif/distinfo,v
retrieving revision 1.19
diff -u -p -u -p -r1.19 distinfo
--- distinfo	20 Jul 2025 14:47:22 -0000	1.19
+++ distinfo	5 Mar 2026 19:45:32 -0000
@@ -1,6 +1,6 @@
-SHA256 (AOMediaCodec-libavif-v1.3.0.tar.gz) = ClRelTzASb9bz07kZzBqLxE6dREO31nmEkiHMQHNJsE=
-SHA256 (kmurray-libargparse-ee74d1b53bd680748af14e737378de57e2a0a954.tar.gz) = dyewSYhR5bam/Nc062Z6iiMYl+LIajV67FHMBmSBMGA=
-SHA256 (lemenkov-libyuv-4db2af62dab48895226be6b52737247e898ebe36.tar.gz) = 0eVhTT+9BDkVvV4VaVG7GgnmMciQsyJ5aG69rUze7C0=
-SIZE (AOMediaCodec-libavif-v1.3.0.tar.gz) = 14062497
-SIZE (kmurray-libargparse-ee74d1b53bd680748af14e737378de57e2a0a954.tar.gz) = 22394
-SIZE (lemenkov-libyuv-4db2af62dab48895226be6b52737247e898ebe36.tar.gz) = 615749
+SHA256 (AOMediaCodec-libavif-v1.4.0.tar.gz) = cT4rmYygv1Rz/kYkr9vH+p9uR5ndQUAg/mfVb2mXv04=
+SHA256 (kmurray-libargparse-81998ffafb9c2ac8cf488d31e536a2e6fd6b3fdf.tar.gz) = wmp3K6LLUoKXWdtGNsZ8oxjh3ZXBklRIg1PtkCHzZsw=
+SHA256 (lemenkov-libyuv-deeb764bb92b6305ee0cb5dae7a5940fdb457fa9.tar.gz) = ffdf3nQV1TV7LjFHlEZXlpCp/g22f5BcC9PZoNmpRHk=
+SIZE (AOMediaCodec-libavif-v1.4.0.tar.gz) = 14418584
+SIZE (kmurray-libargparse-81998ffafb9c2ac8cf488d31e536a2e6fd6b3fdf.tar.gz) = 22411
+SIZE (lemenkov-libyuv-deeb764bb92b6305ee0cb5dae7a5940fdb457fa9.tar.gz) = 587514
Index: patches/patch-ext_libyuv_include_libyuv_cpu_id_h
===================================================================
RCS file: /cvs/ports/graphics/libavif/patches/patch-ext_libyuv_include_libyuv_cpu_id_h,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-ext_libyuv_include_libyuv_cpu_id_h
--- patches/patch-ext_libyuv_include_libyuv_cpu_id_h	20 Jul 2025 14:47:22 -0000	1.1
+++ patches/patch-ext_libyuv_include_libyuv_cpu_id_h	5 Mar 2026 19:45:32 -0000
@@ -1,7 +1,7 @@
 Index: ext/libyuv/include/libyuv/cpu_id.h
 --- ext/libyuv/include/libyuv/cpu_id.h.orig
 +++ ext/libyuv/include/libyuv/cpu_id.h
-@@ -95,7 +95,7 @@ int MipsCpuCaps(const char* cpuinfo_name);
+@@ -90,7 +90,7 @@ int ArmCpuCaps(const char* cpuinfo_name);
  LIBYUV_API
  int RiscvCpuCaps(const char* cpuinfo_name);
  
Index: patches/patch-ext_libyuv_source_cpu_id_cc
===================================================================
RCS file: /cvs/ports/graphics/libavif/patches/patch-ext_libyuv_source_cpu_id_cc,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-ext_libyuv_source_cpu_id_cc
--- patches/patch-ext_libyuv_source_cpu_id_cc	20 Jul 2025 14:47:22 -0000	1.1
+++ patches/patch-ext_libyuv_source_cpu_id_cc	5 Mar 2026 19:45:32 -0000
@@ -5,9 +5,9 @@ Index: ext/libyuv/source/cpu_id.cc
  #include <stdio.h>  // For fopen()
  #include <string.h>
  
--#if defined(__linux__) && defined(__aarch64__)
+-#if defined(__linux__) && (defined(__aarch64__) || defined(__loongarch__))
 +#if (defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && \
-+    defined(__aarch64__)
++    (defined(__aarch64__) || defined(__loongarch__))
  #include <sys/auxv.h>  // For getauxval()
  #endif
  
@@ -20,7 +20,7 @@ Index: ext/libyuv/source/cpu_id.cc
  // 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 YUV_AARCH64_HWCAP_ASIMDDP (1UL << 20)
-@@ -472,13 +473,20 @@ static SAFEBUFFERS int GetCpuFlags(void) {
+@@ -442,13 +443,20 @@ static SAFEBUFFERS int GetCpuFlags(void) {
    cpu_info |= kCpuHasLOONGARCH;
  #endif
  #if defined(__aarch64__)