-
Notifications
You must be signed in to change notification settings - Fork 14
Support libavif v0.60 and set proper color space as possible. #13
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
Support libavif v0.60 and set proper color space as possible. #13
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
- Coverage 77.02% 67.17% -9.85%
==========================================
Files 4 4
Lines 1014 1496 +482
==========================================
+ Hits 781 1005 +224
- Misses 233 491 +258
Continue to review full report at Codecov.
|
return; | ||
} | ||
|
||
*ref = CreateColorSpaceRGB(colorPrimaries, transferCharacteristics); |
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.
This is the fallback case for CGColorSpace which does not supported ?
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.
This branch is for when there is no corresponding built-in color space in CGColorSpace.h
, like kCGColorSpaceSRGB
. It creates new CGColorSpaceRef.
If there is better way to create color spaces, please tell me.
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.
OK. Seems we need to refactory soon....There are so many calc code and utils C function right now :). Don't need to do this right now.
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.
OK. I removed the code that creates CGColorSpace using vImage, and left a TODO comment about it.
Yeah, I also felt we need refactoring.
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.
Sorry, I mis-understand your message. I reverted 71ecfa1 .
77fd1af
to
4f6e324
Compare
😅 Seems you still trying some changes. If you find it's ready to merge, @ me again. And, can CI test image been passed after this color space support changes ? |
@dreampiggy Sorry! I've done!
Unfortunatelly, AOMediaCodec/libavif#98 should also be merged to libavif, and we have to wait the new version release of libavif to fix CI tests. |
This reverts commit 71ecfa1.
7d48bdc
to
9da58e8
Compare
@dreampiggy Hi! Now libavif v0.6.0 is supported, and all end-to-end tests (Github Actions) have finally passed! |
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.
LGTM...Actually the color profile check code is OK and we can use test case to ensure the correctness
Thank you! |
I tested the new alpha channel codes with plum-blossom-large.profile0.8bpc.yuv420.avif iPhone 6
It runs faster about 13% iPhone 8
It runs faster about 25% |
Hi.
In this PR, set proper color profile values to CGImage (if possible).
This PR and AOMediaCodec/libavif#98 may resolve #12 .
Please take a look!