CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Add AVIF support through libavif. #23596
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
Conversation
39ca51b
to
1c4cebf
Compare
I fixed the EXIF that was not handled and I set the output buffers to 16 bit when reading 10/12 bit. We lose the bit depth information though. |
Build with default Ubuntu 22.04 libavif package fails with compilation error:
Version info:
|
I split the tests and fixed the compilation on Ubuntu (that API is also useless for us). I added a test for EXIF (that only works with libavif HEAD). |
@vrabaud Thanks a lot for the update. Looks like you forgot about opencv_extra patch:
|
2423ae9
to
bd40e00
Compare
All imgcodecs tests now pass. |
All tests passed on my side with Ubuntu 22.04. Thanks a lot! I'll try to look into code in details for the next several days and provide feedback. I also added Ubuntu 22.04 config with libavif on board to CI in opencv/ci-gha-workflow#101 and opencv-infrastructure/opencv-gha-dockerfile#18 |
(the CI error seems unrelated: DNN with CUDA error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@vrabaud We discussed the solution on core team meeting and decided to disable libavif by default for now and treat it's support as experimental till 4.9.0. Could you disable the option by default? I'll add CI configuration a bit later after the release. |
@asmorkalov: sure, done. WITH_AVIF is set to OFF by default. |
@asmorkalov @vrabaud Hey, I was reading cmake files and noticed that AVIF support relies on headers & libraries either being present on the system, or built separately and pointed at by the user, while many other 3rd party components like jpeg, png, webp and more have an option (like Is a |
Major issue is mostly engineering. AVIF has a lot of own dependencies that we do not want to bring into OpenCV. Licenses for AVIF dependence sub-tree is open issue too. |
Licenses are fine: libavif is BSD 2 clause. |
Add AVIF support through libavif. opencv#23596 This is to fix opencv#19271 Extra: opencv/opencv_extra#1069 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
Add AVIF support through libavif. opencv#23596 This is to fix opencv#19271 Extra: opencv/opencv_extra#1069 See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
Add AVIF support through libavif. opencv#23596 This is to fix opencv#19271 Extra: opencv/opencv_extra#1069 See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
This is to fix #19271
Extra: opencv/opencv_extra#1069
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.