-
Notifications
You must be signed in to change notification settings - Fork 129
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
YCoCg matrix support #678
Comments
Color matrices are being added on-demand, based on usage where data is available. In H.273, this matrix is called YCgCo and has ID 8. I do not currently have usage data to share, but it is my understanding that YCgCo content is rare in practice. FFmpeg describes it as "used by Dirac / VC-2 and H.264 FRext". I expect that browsers already support this color matrix, so adding it to WebCodecs is probably trivial. |
Thanks for the explanation. Currently it is already possible to achieve more or less the wanted feature by either using a software implementation of webcodecs (tested just on Chrome), or using VideoFrame.copyTo and at that point one can have full control on the yuv planes and thus also the conversion to rgb. However, both solutions are typically slower than rather using the hardware implementation as in the first case decoding would be slower and with copyTo it is likely that copy from gpu to cpu would be slower as well. Most efficient path would be use the hardware implementation and process the generated frame within WebGL/WebGPU. Not checked on WebGPU actually, but at least with WebGL produced colors looks incorrect; that suggested me about the lack of internal YCoCg to RGB conversion when binding an external texture. |
Currently the
VideoColorSpace
:matrix
property supports the following values:Matrix coefficients used by sRGB.
Matrix coefficients used by BT.709.
Matrix coefficients used by BT.601 PAL.
Matrix coefficients used by BT.601 NTSC.
It is known that:
Are there any plans to support such color space?
Thanks,
Fabio
The text was updated successfully, but these errors were encountered: