Comments (5)
I implemented basic rav1e support today. If you read/execute rav1e.cmd in ext/, you should be able to build with -DAVIF_CODEC_RAV1E=1 -DAVIF_LOCAL_RAV1E=1
and it'll find the library and link against it.
I've only tested on windows-msvc (2017) and macOS Catalina.
from libavif.
I don't have any specific plans right now to add any codecs, but I'm certainly not against it.
The pattern I put in place when I added dav1d would translate well to an encoder-only codec; I would just make it so that enabling it would override the encoding role from libaom, and if enabled in conjunction with dav1d, would avoid aom entirely.
from libavif.
Thanks for working on this!
I noticed a small issue with how you pass quantizer values to rav1e:
int minQuantizer = AVIF_CLAMP(encoder->minQuantizer, 0, 63);
int maxQuantizer = AVIF_CLAMP(encoder->maxQuantizer, 0, 63);
if (alpha) {
minQuantizer = AVIF_QUANTIZER_LOSSLESS;
maxQuantizer = AVIF_QUANTIZER_LOSSLESS;
}
if (rav1e_config_parse_int(rav1eConfig, "min_quantizer", minQuantizer) == -1) {
goto cleanup;
}
if (rav1e_config_parse_int(rav1eConfig, "quantizer", maxQuantizer) == -1) {
goto cleanup;
}
Values for min/max quantizer in libavif are in the [0, 63] range, but in rav1e they are in [0, 255] (see https://github.com/xiph/rav1e/blob/master/src/capi.rs#L490), so clamping like you are here restricts the encoder to a small range of quantizer values.
from libavif.
I've have a test on current ra1ve and aom on macOS 10.15. It seems rav1e encoding AVIF for this kids_720p.avif is 50 times faster 🤣 (aom need 1 minutes with 200% CPU Core, rav1e need just 2 seconds with just 100% CPU Core).
It's now really acceptable to make it possible for Client-User side program to integrate this. Previously my test programe just disable the AVIF encoding :)
from libavif.
Excellent catch on the QP, I believe I've fixed it here:
And yes, I was pleasantly surprised at rav1e's speed as well. If someone builds colorist (a tool of mine that uses libavif) with both rav1e and aom, I choose rav1e for encoding if aom isn't explicitly specified.
from libavif.
Related Issues (20)
- CMake fails in tests/CMakeLists.txt "No known features for CXX compiler" if -DAVIF_BUILD_TESTS=ON -DAVIF_BUILD_APPS=OFF HOT 2
- Grid image arranges tiles in wrong order if IDs in the `iref` are not sequential HOT 8
- libavif does not decode `iovl` overlay images HOT 2
- Incorrect documentation for AVIF_ENABLE_FUZZTEST
- MSVC: avifsampletransformtest.cc(153): warning C4244: 'argument': conversion from 'const avifSampleTransformTokenType' to 'uint8_t', possible loss of data
- Seemingly uncommon use of $<BUILD_INTERFACE> generator expressions in target_compile_options() HOT 2
- In a shared library build, avifincrtest is linked with both the libavif shared and static libraries. HOT 1
- Windows linker error LNK2019: unresolved external symbol __imp_avifGainMapMetadataDoubleToFractions referenced in function avifJPEGParseGainMapXMPProperties HOT 3
- In libavif v1.1.0, only the source files in the avif_obj and avif_apps_obj OBJECT libraries are compiled with warnings enabled HOT 1
- Consider setting the CMAKE_MSVC_RUNTIME_LIBRARY variable to use /MD in all build configurations on Windows
- Investigate whether we still need to compile with /source-charset:utf-8 /execution-charset:us-ascii on Windows HOT 5
- Consider using the MSVC linker option /WX if the AVIF_ENABLE_WERROR cmake option is ON HOT 1
- Consider enabling compiler warnings in add_avif_fuzztest() in tests/CMakeLists.txt HOT 3
- Consider testing __STDC_VERSION__ >= 202000L in avif.h for C compiler's [[nodiscard]] support HOT 1
- Audit and fix integer overflows in multiplications with rowBytes in src/reformat.c
- gtest/avif_fuzztest_helpers.cc is compiled once for each fuzztest target
- Fix the limitation of recent-cmake in the setup-common GitHub action HOT 1
- CMAKE_CXX_FLAGS_RELEASE is empty if -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=OFF is specified HOT 8
- Check version numbers of boxes related to the ISO gain map experimental feature HOT 17
- Feature request: separate out encoding of chroma & alpha HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libavif.