After emerging dav1d-1.0.0 and rebuilding required dependences (including libheif), I noticed that no software using libheif for reading AVIF files reported error. For example: $ heif-info foo.avif MIME type: image/avif main brand: avif compatible brands: avif, mif1, miaf image: 667x1000 (id=1), primary color profile: prof alpha channel: no depth channel: no $ heif-convert foo.avif foo.jpg File contains 1 images Could not decode image: 0: Decoder plugin generated an error: Unspecified. It also broke support of AVIF in software using libheif like Imagemagick or Gimp. AVIF files in question were produced by Gimp using the newer dav1d. It seems problem only concerns with reading files, writting seems to be working fine. Downgrading to media-libs/dav1d-0.9.2 and rebuilding libheif solved the issue for me. Reproducible: Always Steps to Reproduce: 1. emerge =dav1d-1.0.0 2. heif-convert foo.avif foo.jpg Actual Results: File contains 1 images Could not decode image: 0: Decoder plugin generated an error: Unspecified. Expected Results: File contains 1 images Written to foo.jpg Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1/desktop, gcc-11.2.1, glibc-2.33-r13, 5.16.12-gentoo x86_64) ================================================================= System uname: Linux-5.16.12-gentoo-x86_64-AMD_Ryzen_5_3600_6-Core_Processor-with-glibc2.33 KiB Mem: 32873884 total, 13164128 free KiB Swap: 2097148 total, 914908 free Timestamp of repository gentoo: Sat, 26 Mar 2022 10:30:01 +0000 Head commit of repository gentoo: 3974a90619c6cd12a1d5610b5f2ab33962258450 Timestamp of repository farmboy0: Sat, 26 Mar 2022 00:34:27 +0000 Head commit of repository farmboy0: d53024a27d0f8a9537b5dbc2a2d18f9a2ee234d0 Timestamp of repository guru: Sat, 26 Mar 2022 00:49:20 +0000 Head commit of repository guru: 211239e7dbbdb1c4920754a13dff6bc506bea3fb Timestamp of repository jorgicio: Sat, 26 Mar 2022 00:34:29 +0000 Head commit of repository jorgicio: 1df491cea1353fb53ab09d351fb2f18b3ec465e1 Timestamp of repository kde: Sat, 26 Mar 2022 05:19:23 +0000 Head commit of repository kde: b83b402be05edada76c5252e6911b3bc046d3a21 Timestamp of repository steam-overlay: Fri, 25 Mar 2022 20:09:27 +0000 Head commit of repository steam-overlay: 56ef3833617c6ee33bd01a07a704a1167cf9a27e sh bash 5.1_p16 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 distcc 3.4 x86_64-pc-linux-gnu [disabled] app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p16::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r6::gentoo dev-lang/python: 2.7.18_p14::gentoo, 3.9.9-r1::gentoo, 3.10.2_p1::gentoo dev-lang/rust-bin: 1.58.1::gentoo dev-util/cmake: 3.22.2::gentoo dev-util/meson: 0.60.3::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.29::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.16.4::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo sys-devel/binutils-config: 5.4::gentoo sys-devel/clang: 13.0.1::gentoo, 14.0.0-r1::gentoo sys-devel/gcc: 6.5.0-r4::gentoo, 7.5.0-r2::gentoo, 8.5.0-r1::gentoo, 10.3.1_p20211126::gentoo, 11.2.1_p20220115::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/lld: 13.0.1::gentoo sys-devel/llvm: 13.0.1::gentoo, 14.0.0::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r13::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes farmboy0 location: /var/db/repos/farmboy0 sync-type: git sync-uri: https://github.com/gentoo-mirror/farmboy0.git masters: gentoo guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo jorgicio location: /var/db/repos/jorgicio sync-type: git sync-uri: https://github.com/gentoo-mirror/jorgicio.git masters: gentoo kde location: /var/db/repos/kde sync-type: git sync-uri: https://github.com/gentoo-mirror/kde.git masters: gentoo local location: /var/db/repos/local masters: gentoo steam-overlay location: /var/db/repos/steam-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/steam-overlay.git masters: gentoo arduino-crossdev location: /var/db/repos/arduino masters: gentoo priority: 10 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=native -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build=n --jobs=20 --load-average=14 --keep-going" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -march=native -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live candy cgroup distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -march=native -pipe" GENTOO_MIRRORS="http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.leaseweb.com/gentoo/" INSTALL_MASK="/usr/share/locale -/usr/share/locale/pl* -/usr/share/locale/en /usr/share/binutils-data/*/*/locale -/usr/share/binutils-data/*/*/locale/pl* -/usr/share/binutils-data/*/*/locale/en /usr/share/gcc-data/*/*/locale -/usr/share/gcc-data/*/*/locale/pl* -/usr/share/gcc-data/*/*/locale/en /usr/share/man/ -/usr/share/man/man* -/usr/share/man/pl* -/usr/share/man/whatis" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed" MAKEOPTS="-j8" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acoustid acpi alsa amd64 avif bash-completion branding brotli bzip2 cairo cdda cdr cli cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gimp gpm gpu gtk gtk3 gui heif http2 iconv icu jpeg lcms libglvnd libnotify libtirpc lto mad mng mobi mp3 mp4 mpeg mtp multilib musepack musicbrainz ncurses nls nptl offensive ogg opencl opengl openmp opus pam pango pcre pdf pgo png policykit postscript ppds qt5 readline sane scanner sdl seccomp spell split-usr ssl startup-notification svg system-cairo system-harfbuzz system-icu system-jpeg system-jsoncpp system-libevent system-libvpx system-llvm system-png system-sqlite tiff truetype udev udisks unicode upower usb userlocales vdpau vorbis vulkan webp wxwidgets x264 x265 xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" ALSA_CARDS="intel8x0" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="en pl" LCD_DEVICES="hd44780 curses text rawserial serialpos serialvfd" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" SANE_BACKENDS="pixma" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
The problem is in heif https://github.com/strukturag/libheif/issues/644 potentially already fixed in their master.
I think we need this patch to libheif: https://github.com/strukturag/libheif/commit/0f8496f22d284e1a69df12fe0b72f375aed31315
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=289889477eb75bb7432c9ef0f414edc6fdbfc625 commit 289889477eb75bb7432c9ef0f414edc6fdbfc625 Author: Jakov Smolić <jsmolic@gentoo.org> AuthorDate: 2022-07-28 09:09:46 +0000 Commit: Jakov Smolić <jsmolic@gentoo.org> CommitDate: 2022-07-28 09:15:47 +0000 media-libs/libheif: Fix breakage with dav1d-1.0.0 Closes: https://bugs.gentoo.org/836205 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org> .../libheif/files/libheif-1.12.0-dav1d-1.0.0.patch | 45 +++++++++++++ media-libs/libheif/libheif-1.12.0-r2.ebuild | 77 ++++++++++++++++++++++ 2 files changed, 122 insertions(+)