-
Notifications
You must be signed in to change notification settings - Fork 143
Add definitions / diagrams for subtle video frame concepts #166
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
Comments
Adding VideoFrame as a CanvasImageSource allows drawImage(), createImageBitmap(), and texImage() to interoperate with VideoFrames. VideoFrames are effectively the same as the existing point-in-time capture done for HTMLVideoElement on each of these interfaces. This adds a non-normative reference on the WebCodecs spec for the VideoFrame interface and associated properties to accomplish this. Bug: w3c/webcodecs#158
Triage note: marking 'editorial', as there is broad consensus on what these terms / concepts mean, this issue merely tracks the need to document that better. |
I agree, from a high-level POV, but this needs to be precisely specified, because we all know small details matter when shipping APIs on the Web. That said, it's not hard to spec I assume, granted we use the commonly accepted definitions, an attempt below: The coded width is the size of a horizontal pixel line, that is bigger or equal to the stride. The coded height is the size of a vertical pixel line, that is bigger or equal to the height of the picture (but is that useful ?). The coded height x the coded width allows knowing how much memory an image occupies in practice. Then this memory interpreted by the metadata found on It can well be that the type of scaling needs to be specified, maybe by using https://html.spec.whatwg.org/#resizequality ? |
Thanks @padenot. I think those definitions match my expectation. @sandersdan to double check. One small nit
I think this should be <= to the stride. Re: display scaling, I defer to @sandersdan. |
There is no inherent relationship because What is always true is that There is still some discussion happening re: display size in #94. The current proposal is to treat the display size as a display aspect ratio, and then apply the usual 'scale up in exactly one dimension to match' approach that (Perhaps in the future we would add a |
We can only work on this after #165 then. Thanks for the comment outlining my mistake. I'll work on a PR to add this precisely with all the comments taken into account. |
Including coded size, crop size, display size, stride...
The text was updated successfully, but these errors were encountered: