ping.
On 2025-03-20 8:27 p.m., Brad Smith wrote:
Here is an update to libavif 1.2.1.
## [1.2.1] - 2025-03-17
### Added since 1.2.0
* Add support for outputting all frames of an image sequence in `avifdec`.
`avifdec --index all sequence.avif out.png` creates files named
`out-xxxxxxxxxx.png` where xxxxxxxxxx are the zero-padded frame indices.
### Changed since 1.2.0
* Fix local libargparse dependency patch step on macOS 10.15 and earlier.
* Patch local libyuv dependency for compatibility with gcc 10.
* Use stricter C99 syntax to avoid related compilation issues.
## [1.2.0] - 2025-02-25
### Added since 1.1.1
* Turn on the gain map API. Remove the AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP CMake
flag.
* Allow YCgCo_Re and YCgCo_Ro encoding/decoding and update the enum values to
the latest CICP specification. Remove the AVIF_ENABLE_EXPERIMENTAL_YCGCO_R
CMake flag.
* Add the properties and numProperties fields to avifImage. They are filled by
the avifDecoder instance with the properties unrecognized by libavif. They
are
written by the avifEncoder.
* Add avif(Un)SignedFraction structs and avifDoubleTo(Un)SignedFraction
utility functions.
* Add 'avifgainmaputil' command line tool to installed apps.
* Add avifCropRectRequiresUpsampling().
* Add experimental support for PixelInformationProperty syntax from HEIF 3rd Ed.
Amd2 behind the compilation flag AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI.
* Add experimental Sample Transform recipe
BIT_DEPTH_EXTENSION_12B_8B_OVERLAP_4B.
### Changed since 1.1.1
* avifenc: Allow large images to be encoded.
* Fix empty CMAKE_CXX_FLAGS_RELEASE if -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=OFF
is specified. https://github.com/AOMediaCodec/libavif/issues/2365.
* Rename AVIF_ENABLE_EXPERIMENTAL_METAV1 to AVIF_ENABLE_EXPERIMENTAL_MINI and
update the experimental reduced header feature to the latest specification
draft. Rename AVIF_HEADER_REDUCED to AVIF_HEADER_MINI.
* Update the experimental Sample Transform feature behind the
AVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM CMake flag to the latest
specification draft.
* Ignore gain maps with unsupported metadata. Handle gain maps with
writer_version > 0 correctly.
* Simplify gain map API: remove the enableParsingGainMapMetadata setting, now
gain map metadata is always parsed if present and if this feature is compiled
in. Replace enableDecodingGainMap and ignoreColorAndAlpha with a bit field to
choose image content to decode. Remove gainMapPresent: users can check if
decoder->image->gainMap != NULL instead. Remove avifGainMapMetadata and
avifGainMapMetadataDouble structs.
* Write an empty HandlerBox name field instead of "libavif" (saves 7 bytes).
* Check for FileTypeBox precedence in avifParse().
* Do not write an alternative group with the same ID as an item.
* Update parseAV2SequenceHeader() and avm.cmd: research-v9.0.0
* Remove AVIF_ENABLE_GTEST CMake option. It's now implied by
AVIF_GTEST=LOCAL/SYSTEM.
* Deprecate `avifEncoder`'s `minQuantizer`, `maxQuantizer`, `minQuantizerAlpha`,
and `maxQuantizerAlpha` fields. `quality` and `qualityAlpha`\xc2\xa0should
be used
instead. Deprecate\xc2\xa0`avifenc`'s `--min`, `--max`, `--minalpha` and
`--maxalpha`
flags. `-q` or `--qcolor` and `--qalpha`\xc2\xa0should be used instead.
* For dependencies, the deprecated way of setting AVIF_LOCAL_* to ON is
removed. Dependency options can now only be set to OFF/LOCAL/SYSTEM.
* Change the default quality for alpha to be the same as the quality for color.
* Allow decoding subsampled images with odd Clean Aperture dimensions or
offsets.
* Deprecate avifCropRectConvertCleanApertureBox() and
avifCleanApertureBoxConvertCropRect(). Replace them with
avifCropRectFromCleanApertureBox() and avifCleanApertureBoxFromCropRect().
* Write descriptive properties before transformative properties.
* Reject non-essential transformative properties.
* Treat avifenc --stdin as a regular positional file path argument.
* Update man pages based on avifenc/dec's --help message.
* android_jni: Support 16kb page size
* android_jni: Set threads to 2 instead of CPU count
* Fix overflows when dealing with alpha during YUV/RGB conversions and in
avifRGBImageAllocatePixels().
* Make avifEncoder.headerFormat a flag combination for future features.
* Rename AVIF_HEADER_FULL to AVIF_HEADER_DEFAULT. Deprecate AVIF_HEADER_FULL.
* Fix decoding image sequences with non video tracks (such as audio or
subtitles).
* Fix type checking of auxiliary tracks: previously any auxiliary track was
assumed to be alpha, even if it was a different type. If the aux type is
absent,
it is assumed to be alpha.
Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/libavif/Makefile,v
retrieving revision 1.24
diff -u -p -u -p -r1.24 Makefile
--- Makefile 30 Aug 2024 07:48:53 -0000 1.24
+++ Makefile 20 Mar 2025 01:58:40 -0000
@@ -1,11 +1,11 @@
COMMENT= library for encoding and decoding .avif files
-DIST_TUPLE+= github AOMediaCodec libavif v1.1.1 .
+DIST_TUPLE+= github AOMediaCodec libavif v1.2.1 .
DIST_TUPLE+= github lemenkov libyuv \
- a6a2ec654b1be1166b376476a7555c89eca0c275 ext/libyuv
+ ccdf870348764e4b77fa3b56accb2a896a901bad ext/libyuv
CATEGORIES= graphics
-SHARED_LIBS= avif 7.1
+SHARED_LIBS= avif 8.0
HOMEPAGE= https://github.com/AOMediaCodec/libavif
Index: distinfo
===================================================================
RCS file: /cvs/ports/graphics/libavif/distinfo,v
retrieving revision 1.18
diff -u -p -u -p -r1.18 distinfo
--- distinfo 30 Aug 2024 07:48:53 -0000 1.18
+++ distinfo 20 Mar 2025 01:58:40 -0000
@@ -1,4 +1,4 @@
-SHA256 (AOMediaCodec-libavif-v1.1.1.tar.gz) =
kUZi4WJF4GLtc/kBEvu0VIJBMAhDp3ctjUQbtoWd5Fs=
-SHA256 (lemenkov-libyuv-a6a2ec654b1be1166b376476a7555c89eca0c275.tar.gz) =
+5dXKi3B2Ok3bmGzPrSHCMzPs0Egb8m02atl9Asyb7M=
-SIZE (AOMediaCodec-libavif-v1.1.1.tar.gz) = 13644189
-SIZE (lemenkov-libyuv-a6a2ec654b1be1166b376476a7555c89eca0c275.tar.gz) = 570482
+SHA256 (AOMediaCodec-libavif-v1.2.1.tar.gz) =
nIWcfBLMsPQHURv+MD5qckf19nOPVIUmYsbfgEja3fQ=
+SHA256 (lemenkov-libyuv-ccdf870348764e4b77fa3b56accb2a896a901bad.tar.gz) =
F0H+XOzsy+15Q/nMzwJgHrQwtzF/jUTMaFY5XEaqyuw=
+SIZE (AOMediaCodec-libavif-v1.2.1.tar.gz) = 13942041
+SIZE (lemenkov-libyuv-ccdf870348764e4b77fa3b56accb2a896a901bad.tar.gz) = 614050
Index: patches/patch-ext_libyuv_include_libyuv_cpu_id_h
===================================================================
RCS file: patches/patch-ext_libyuv_include_libyuv_cpu_id_h
diff -N patches/patch-ext_libyuv_include_libyuv_cpu_id_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ext_libyuv_include_libyuv_cpu_id_h 20 Mar 2025 01:58:40
-0000
@@ -0,0 +1,12 @@
+Index: ext/libyuv/include/libyuv/cpu_id.h
+--- ext/libyuv/include/libyuv/cpu_id.h.orig
++++ ext/libyuv/include/libyuv/cpu_id.h
+@@ -94,7 +94,7 @@ int MipsCpuCaps(const char* cpuinfo_name);
+ LIBYUV_API
+ int RiscvCpuCaps(const char* cpuinfo_name);
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ // On Linux, parse AArch64 features from getauxval(AT_HWCAP{,2}).
+ LIBYUV_API
+ int AArch64CpuCaps(unsigned long hwcap, unsigned long hwcap2);
Index: patches/patch-ext_libyuv_source_cpu_id_cc
===================================================================
RCS file: patches/patch-ext_libyuv_source_cpu_id_cc
diff -N patches/patch-ext_libyuv_source_cpu_id_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ext_libyuv_source_cpu_id_cc 20 Mar 2025 01:58:40 -0000
@@ -0,0 +1,44 @@
+Index: ext/libyuv/source/cpu_id.cc
+--- ext/libyuv/source/cpu_id.cc.orig
++++ ext/libyuv/source/cpu_id.cc
+@@ -23,7 +23,8 @@
+ #include <stdio.h> // For fopen()
+ #include <string.h>
+
+-#if defined(__linux__) && defined(__aarch64__)
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && \
++ defined(__aarch64__)
+ #include <sys/auxv.h> // For getauxval()
+ #endif
+
+@@ -179,7 +180,7 @@ LIBYUV_API SAFEBUFFERS int ArmCpuCaps(const char* cpui
+ }
+
+ #ifdef __aarch64__
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ // 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 (1 << 20)
+@@ -464,13 +465,20 @@ static SAFEBUFFERS int GetCpuFlags(void) {
+ cpu_info |= kCpuHasLOONGARCH;
+ #endif
+ #if defined(__aarch64__)
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__FreeBSD__) || defined(__OpenBSD__)
++ unsigned long hwcap = 0;
++ unsigned long hwcap2 = 0;
++ elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
++ elf_aux_info(AT_HWCAP2, &hwcap2, sizeof(hwcap2));
++#else
+ // getauxval is supported since Android SDK version 18, minimum at time of
+ // writing is 21, so should be safe to always use this. If getauxval is
+ // somehow disabled then getauxval returns 0, which will leave Neon enabled
+ // since Neon is mandatory on AArch64.
+ unsigned long hwcap = getauxval(AT_HWCAP);
+ unsigned long hwcap2 = getauxval(AT_HWCAP2);
++#endif
+ cpu_info = AArch64CpuCaps(hwcap, hwcap2);
+ #else
+ cpu_info = AArch64CpuCaps();
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/graphics/libavif/pkg/PLIST,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 PLIST
--- pkg/PLIST 27 Aug 2024 07:54:17 -0000 1.6
+++ pkg/PLIST 20 Mar 2025 01:58:40 -0000
@@ -1,5 +1,6 @@
@bin bin/avifdec
@bin bin/avifenc
+@bin bin/avifgainmaputil
include/avif/
include/avif/avif.h
include/avif/avif_cxx.h