-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add HBD YUV Planar pixel formats #766
Conversation
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.
Generally looks perfect, but I have some questions, that we might be able to address in a follow-up.
compared to the Y plane, and not [=sub-sampled=] vertically. | ||
|
||
Each sample in this format is 10 bits, encoded as a 16-bit integer in | ||
little-endian byte order. |
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.
I wonder if we should say something about those 6 bits (or 4, depending on the depth) that aren't used.
Are they to be ignored, are they always set to 0? In terms of developer ergonomics, if I read back the values to an ArrayBuffer
to perform some computations, should I always mask the unused bits or can I simply read the value with a DataView
as uint16_t. In terms of implementation, is that a fair assumption we can make, or do some decoders leave the bits alone, and so this could be a source of fingerprinting?
We should also specify (probably globally, since it applies to all formats) that the sample values are unsigned integer, I tried to look for that but didn't find it for the video side of things.
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.
These are fair questions that I don't have answers to. I don't imagine that decoders would do anything other than zero them, but if a frame is created with data in those bits the behavior after that is probably not defined. We may be on the hook to zero them at frame creation, but unfortunately that would prevent using the buffer transfer optimization.
Specifying unsigned integers seems reasonable to me, I'll go ahead and add that in this PR.
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.
I don't know either. I filed #767, let's discuss there once we have implementation experience on various graphics API, hardware and drivers.
This PR looks good to merge from my point of view.
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.
Looks good to me too.
Fix an -> and Co-authored-by: Chris Needham <chrisn@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by Djuffin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: d5a4ed2 Reason: push, by tguilbert-google Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This patch adds high-bit-depth YUV pixel formats to `VideoPixelFormat` webidl to meet the changes in WebCodecs PR 766 [1]. [1] w3c/webcodecs#766
…media-playback-reviewers,padenot,smaug This patch adds high-bit-depth YUV pixel formats to `VideoPixelFormat` webidl to meet the changes in WebCodecs PR 766 [1]. [1] w3c/webcodecs#766 Differential Revision: https://phabricator.services.mozilla.com/D213637
…media-playback-reviewers,padenot,smaug This patch adds high-bit-depth YUV pixel formats to `VideoPixelFormat` webidl to meet the changes in WebCodecs PR 766 [1]. [1] w3c/webcodecs#766 Differential Revision: https://phabricator.services.mozilla.com/D213637 UltraBlame original commit: 982db1444720117806fd4fd3b107884fe268dedd
…media-playback-reviewers,padenot,smaug This patch adds high-bit-depth YUV pixel formats to `VideoPixelFormat` webidl to meet the changes in WebCodecs PR 766 [1]. [1] w3c/webcodecs#766 Differential Revision: https://phabricator.services.mozilla.com/D213637
This change adds the planar YUV formats described in issue #384, most of which are 10 or 12-bit. (P010/P012/P016/RGBAF16 are not included.)
Preview | Diff