-
Notifications
You must be signed in to change notification settings - Fork 143
Add more complete descriptions for PixelFormats #165
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
Comments
Triage note: marking 'editorial' as we have broad consensus on the meaning of well known pixel formats (certainly true for the single I420 currently in the spec), and this issue merely tracks the work to document it's meaning. |
Yes, but this needs to be specified normatively and unambiguously before any implement ships. I think we all agree what it is though:
In this format, a component for a pixel is 8-bits in all 3 planes. Because of the API, I don't think it's necessary to specify whether the Y, U and V planes linear and contiguous in memory when the buffer is in regular memory: it's always access via If an implementation wants to ship any other format it needs to be specified unambiguously in the same fashion. |
Also Y U and V are in this precise order. |
I believe we agree on the definition given above. @sandersdan to double check me. |
Just to clarify, that is how the APIs handle the planes but does not describe their layout in memory (which as you mentioned is arbitrary). I'll add only that there are also general restrictions I would like to apply to all formats that also apply to I420:
We could go further and specify byte ordering (eg. top-left at lowest memory address, increasing along rows up the the stride size, then wrapping to the left of the next row). Again this is probably the same for all formats, but it can cause confusion due to GL using y-flipped coordinates relative to this definition. (Edit: just realized that stride wasn't mentioned in any post before this one. Stride behavior should be the same for all formats, but it does affect the calculations mentioned above; |
Thanks for the comment. I agree with everything and will write a PR with all of this. |
For instance, for I420 we could mention
This is good for interop and documentation. It also allows us to give more complete steps to validate PlaneInit dictionaries.
The text was updated successfully, but these errors were encountered: