Skip to content
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

Merged
merged 3 commits into from
Feb 29, 2024
Merged

Conversation

sandersdan
Copy link
Contributor

@sandersdan sandersdan commented Feb 15, 2024

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

Copy link
Collaborator

@padenot padenot left a 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.
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

index.src.html Outdated Show resolved Hide resolved
index.src.html Outdated Show resolved Hide resolved
index.src.html Outdated Show resolved Hide resolved
index.src.html Outdated Show resolved Hide resolved
index.src.html Outdated Show resolved Hide resolved
index.src.html Outdated Show resolved Hide resolved
index.src.html Outdated Show resolved Hide resolved
index.src.html Outdated Show resolved Hide resolved
index.src.html Outdated Show resolved Hide resolved
sandersdan and others added 2 commits February 20, 2024 12:03
Fix an -> and

Co-authored-by: Chris Needham <chrisn@users.noreply.github.com>
@Djuffin Djuffin merged commit d5a4ed2 into w3c:main Feb 29, 2024
17 checks passed
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 29, 2024
SHA: d5a4ed2
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to tguilbert-google/webcodecs that referenced this pull request Mar 5, 2024
SHA: d5a4ed2
Reason: push, by tguilbert-google

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ChunMinChang added a commit to ChunMinChang/gecko-dev that referenced this pull request Jun 13, 2024
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
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 15, 2024
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jun 16, 2024
…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
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jun 21, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants