-
Notifications
You must be signed in to change notification settings - Fork 140
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
Define importing VideoFrame into WebGPU #412
Conversation
Tangentially related, an open question came up a while ago when trying to decide how applications would actually use VideoFrame with WebGPU: |
763a1c2
to
e9ba23b
Compare
It's also likely we would want to later be able to import individual VideoFrame planes into WebGPU. This doesn't tackle that yet. See gpuweb/gpuweb#1380. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm satisfied that this design is compatible with WebCodec's lifetime/ownership model.
I've taken this PR out of Draft since the WebGPU group has agreed on hosting this interaction in WebCodecs. Members reiterated that trying to define these interactions in the WebGPU spec was unpalatable because (unlike the rest of WebGPU) there would be no alternate implementations available to validate the design. (Lifetime design in particular - note specific concerns about wired memory on Apple platform(s).) |
(This is ready to review, and land whenever WebCodecs editors are happy with it!) |
Sorry for the delay. I'll put it on the agenda for tomorrow's call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me.
(Lifetime design in particular - note specific concerns about wired memory on Apple platform(s).)
Do any concerns remain after considering Dale's points in gpuweb/gpuweb#2124 (comment)
Any tips for building this locally? I'm using bikeshed 3.3.2.
|
Never mind, of course as soon as I posted that I realized I could just manually invoke bikeshed (rather than using the makefile) without |
... hm, that didn't catch my |
FYI I verified the fixes above by building with #419 included and checking the generated HTML output. Marked comments as addressed (and I think this should be OK to land).
I don't think so. WebGPU doesn't add any more ways to hold onto video frames than WebCodecs does by itself. |
Conceptually this probably looks alright (from a Web Codecs perspective, after reading the various discussions in WebGPU issues), but it isn't clear to me why this change is in the Web Codecs specification. Monkey patching specifications is a bad practice, and we shouldn't do it. This PR changes the semantics of a dict member and a method, both defined in WebGPU, and doesn't change anything about Web Codecs, it merely uses an object that can be created using an API defined in the Web Codecs specification. If the extension points needed for specifying the intended behavior of |
My understanding (and @kainino0x can expand) is that there are two reasons why this needs a change in the WebCodec specification:
|
I understand this, but monkey patching is not ok. Would it be OK to state that The alternative is to have a way to signal to the
It's fine not to implement a specification in its entirety, it's fairly common. That said, speaking for Mozilla, we're definitely implementing Web Codecs, so there's no concern from us here. At the end of the day, this modifies the behaviour of the WebGPU API, it needs to go into the WebGPU spec. |
Agree with Paul that WebCodecs is probably not the best place to land this. This seems related to the all-GPU pipeline discussion in Issue webmachinelearning/webnn#226 |
Thank you all, I'll bring this feedback back to WebGPU and see where it goes. gpuweb/gpuweb#2124 (comment) |
The WebGPU community group is so far unable to reach consensus on adding support for WebCodecs interop, because WebCodecs is not agreed upon by the community group members. It has been tentatively proposed to define WebGPU-WebCodecs interop in WebCodecs instead.
Draft for discussion.
Issue: gpuweb/gpuweb#2124
Preview | Diff