w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
975 stars 137 forks source link

Add WCG color spaces. #566

Closed sandersdan closed 1 year ago

sandersdan commented 1 year ago

This implements the color spaces portion of #384, but does not add pixel formats or HDR metadata.


Preview | Diff

chrisn commented 1 year ago

Should we align these with Media Capabilities ColorGamut and TransferFunction? Are there cases where WebCodecs needs a different set of possible values than Media Capabilities?

sandersdan commented 1 year ago

Should we align these with Media Capabilities ColorGamut and TransferFunction?

The short answer is that we diverged with the first version of WebCodecs, which we decided was acceptable since WebCodecs does not integrate with MediaCapabilities. Some of the values I picked in this PR do match between the two, at least.

Perhaps more relevant is alignment with https://github.com/w3c/ColorWeb-CG/blob/master/hdr_html_canvas_element.md, but that is not yet finalized and also has a different technical interpretation.

dalecurtis commented 1 year ago

Any last comments on these names? It's been 3 weeks, so we'll go ahead and merge tomorrow otherwise.

dalecurtis commented 1 year ago

Thanks all. I think we have sufficient approval to merge now.