-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
wip: uncompressed codec filter-array support #1311
Conversation
@@ -268,6 +268,14 @@ uint32_t BitstreamRange::read32() | |||
(buf[3])); | |||
} | |||
|
|||
float BitstreamRange::readFloat32() | |||
{ | |||
int i = read32(); |
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.
There is a BitstreamRange::read32_float()
function in the timestamp-properties
branch. It didn't get merged (yet) and the TAI timestamps changed their use of float
to int
. It seems that the two implementations are equivalent.
Could we use a reinterpret_cast
instead of the memcpy
? And uint32_t
instead of int
.
I checked how endianness works for floating point. It seems that all modern architectures use the same endianness for floats as for integers. The only exception seems to be some ARM processors that use a mixed-endian format for 64bit floats.
We may have to rethink how we map the 23001-17 components to libheif data types. I am not convinced anymore about our current approach to use Thus, we might have to change How about this:
If we do not want that hack, instead of the second point, we can also introduce new API functions with
Coming back to your question: yes, "filter array" would then be a |
Can you cherry-pick 7b8545e into this PR-branch? What should we map the 23001-17 "monochrome" component to? heif_channel_Y is probably a bad idea since that is a separate component type. Is "monochrome" a good name anyway or should it actually be "non_visual"? |
bbee2f3
to
37b8834
Compare
Since I'm again shuffling code around, should I merge this now? This PR is still in the draft status, but I think it is better to merge it now and we can decide later how to handle the channel IDs for "non-visual" channels. |
I'm OK with it going in. I have no idea how to do the debayering though. |
Did you see this? I have not tried it yet. It seems to only support a couple of standard patterns: Probably we could do debayering in the color conversion pipeline like a regular color transformation. |
Could you send me your example image? |
For discussion.
This decodes the Filter Array as mono, and it looks roughly right, but clearly its meant to be coloured.
gpac interpretation:
Any recommendations for de-Bayering libraries that will work off an explicit matrix and (ideally) relative component gain values?
Should we have a "filter array" data type?