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

Impact of colorspace on WebCodecs #7

Open
tidoust opened this issue Aug 25, 2020 · 5 comments
Open

Impact of colorspace on WebCodecs #7

tidoust opened this issue Aug 25, 2020 · 5 comments

Comments

@tidoust
Copy link
Member

tidoust commented Aug 25, 2020

The WebCodecs proposal is actively being developed in the WICG. It defines an API for encoding and decoding audio and video. The HTML draft is outdated for now, the latest version of the API is actually being discussed in a Google doc.

The API exposes decoded video frames. The // TODO: color space metadata comment suggests that the color space will be exposed somehow.

@palemieux
Copy link
Contributor

palemieux commented Jan 11, 2021

The WebCodecs CG report is at https://wicg.github.io/web-codecs/. The Pixel Format section only references Planar 4:2:0 YUV.

@palemieux palemieux changed the title WebCodecs, WCG and HDR Impact of colorspace on WebCodecs Jan 11, 2021
@palemieux
Copy link
Contributor

@chcunningham Any input on how WebCodecs plans to handle WCG/HDR?

@chcunningham
Copy link

In chromium, under the hood the decoders already support these formats (same pipeline from <video>). But we're missing a number of things in the WebCodecs spec. At a glance:

  • I think we'll need to include something like this VideoColorSpace structure found in chromium code. This would then be set on the VideoDecoderConfig and VideoFrame objects and we also need to update rendering code paths to use that for color-correct rendering.
  • We'll also need to add additional pixel formats.

Timing-wise, SDR is our current focus.

@jyrkialakuijala
Copy link

jyrkialakuijala commented May 17, 2022

Absolute color XYB colorspace (used internally in JPEG XL) would allow SDR and HDR use the same colorspace, possibly making it more straightforward to compose graphics from SDR and HDR sources and other graphics primitives.

@chrisn
Copy link
Member

chrisn commented Jun 29, 2022

There's now a proposal for HDR support in WebCodecs - see w3c/webcodecs#384.

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

No branches or pull requests

5 participants