Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916948 - media-libs/libavif: enable libyuv support
Summary: media-libs/libavif: enable libyuv support
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Daniel Novomeský
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-05 21:14 UTC by jlm
Modified: 2023-11-06 12:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jlm 2023-11-05 21:14:06 UTC
avif images created using imagemagick doesn't display on qt app using kde-frameworks/kimageformats qt plugins

this is because imagemagick create yuv420 images, when libavif does only support yuv422 natively, and require libyuv to decode other formats

https://invent.kde.org/frameworks/kimageformats/-/issues/8

Reproducible: Always

Steps to Reproduce:
1. install requirements kimageformats, nomacs or kolourpaint
2. convert a portrait image (don't know why but landscape image works, maybe an issue of image size?) using imagemagick `convert image.jpg image.avif` 
3. try to open it with nomacs or kolourpaint
Actual Results:  
image is not decoded (libheif based app does decode the file)

Expected Results:  
the file should be displayed

using avifdec libavif tool the error displayed is :
avifImageScale() called, but is unimplemented without libyuv!

didn't found any libyuv ebuild information... so a libyuv package should be created and libavif must have a dependency on it
Comment 1 Daniel Novomeský 2023-11-06 12:12:19 UTC
The root of the problem is bug in older libheif.

Problem is with rotated images and that width and heigh are swapped.
Firefox reject such images and Google Chrome apply unexpected scaling so that picture looks differently as intended.

We have 1.15.2 version in Gentoo, that version has the bug. But after manually building libheif, the AVIF files with rotation are created correctly.

Rotated AVIF created using libheif-1.15.2 are not correct. Enabling libyuv would help to display them, but the scaling (like what Chrome uses) would be performed, it would look much differently than original (because of swapped with and height after rotation).

I recommend to upgrade libheif when possible and to re-generate the AVIF files again afterwards.