-
Notifications
You must be signed in to change notification settings - Fork 143
Add image encoder / decoder to proposed solutions section. #6
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
Conversation
explainer.md
Outdated
|
||
A **VideoDecoder** is a TransformStream from EncodedVideoFrame to DecodedVideoFrame. | ||
|
||
A **VideoTrackWriter** converts a WritableStream of DecodedVideoFrame into a MediaStreamTrack. | ||
|
||
An **ImageEncoder** is a TransformStream from [ImageData](http://go/mdn/API/ImageData) to EncodedImageData. |
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.
In the examples below the ImageEncoder/ImageDecoder aren't actually TransformStreams that work on multiple independent images but rather TransformStreams that support streaming decode (e.g., for JPEG progressive enhancement).
Worth discussing the merits of having a single ImageDecoder object that can decode multiple images. It's not quite as obvious as for audio/video where the decoders are stateful. Perhaps it's relevant for representing a hardware image decoder?
Hi Steve, I've updated the PR based on your feedback. I believe ImageEncoder / ImageDecoder may be stateful because the codec may be configured with codec specific parameters, for example, ImageEncoder({codec: "jpeg", quality: 0.9}). It also makes the API more consistent, because Image is presented to developers just like Audio or Video. And we are also exploring ways of integrating WebAssembly with codecs, so the object may be backed by a WebAssembly program to run the actual codec. What do you think? |
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.
lgtm
explainer.md
Outdated
|
||
A **VideoDecoder** is a TransformStream from EncodedVideoFrame to DecodedVideoFrame. | ||
|
||
A **VideoTrackWriter** converts a WritableStream of DecodedVideoFrame into a MediaStreamTrack. | ||
|
||
An **ImageEncoder** encodes a single image from [ImageData](http://go/mdn/API/ImageData) to EncodedImageData. |
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.
Link to the full url rather than a go link.
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.
Done.
I believe this request is out of date. ImageDecoder is currently being maintained externally (https://github.com/dalecurtis/image-decoder-api), but I do expect it will be merged here eventually. |
There doesn't seem to be anything for I did just open an issue https://github.com/dalecurtis/image-decoder-api/issues/7 . I'll try to follow up & find how we might pursue this. This would be so lovely to get. |
What is the status on ImageEncoder? The link above is now broken because issues has been disabled. |
#204 is the tracking issue, but no active plans for it at the moment since |
Hi Peter,
This fixes a few typos and adds image encoding / decoding to the proposed solutions section.
Thanks!
Jose