Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10-bit avif support #2232

Open
FlyingWombat opened this issue May 9, 2024 · 2 comments
Open

10-bit avif support #2232

FlyingWombat opened this issue May 9, 2024 · 2 comments

Comments

@FlyingWombat
Copy link

Please support 10-bit avif. 10-bit is the standard for AV1, because it offers significant BD-rate gain over 8-bit at the expense of marginally higher en/decoding complexity. Everything in my library is 10-bit -- both downloaded from other sources and what I've encoded myself.

A more specific use case I have for this is using ssimulacra2_rs, which uses image-rs for decoding, to help evaluate encoding quality.

Another use case is wpaperd, which uses image-rs for decoding.

#1504 is related, but is more about handling improperly formatted avif files.

@kornelski
Copy link
Contributor

Indeed, AVIF works better with more than 8 bits. The quality improvement is significant enough that it makes up for extra computation (you'd need even slower encoding options to achieve the same quality in 8 bits).

@fintelia
Copy link
Contributor

fintelia commented May 9, 2024

This would be a welcome improvement. The key changes needed would be to have the AVIF decoder report the color type as ColorType::Rgba16 for 10-bit and 12-bit files, and then have the read_image method expand each color component to 16-bits when writing to the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants