Closed Bug 1733766 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 30991 - webcodecs: Render video frames according to their display size

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 30991 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/30991
Details from upstream follow.

Eugene Zemtsov <eugene@chromium.org> wrote:

webcodecs: Render video frames according to their display size

  1. Special handling for VideoFrames in base_rendering_context_2d.cc
    It allows to avoid double scaling when frame has display size
    and resized by drawImage()

  2. Caching canvas resource provider between frame render calls.

  3. Accurate handling of color spaces in VideoImageGenerator.

Bug: 1244034
Change-Id: I61f547d90cec0dfdccb609fd52ed8ad3d8f648f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3099249
Reviewed-by: Aaron Krajeski \<aaronhk@chromium.org>
Reviewed-by: Dan Sanders \<sandersd@chromium.org>
Reviewed-by: Jeremy Roman \<jbroman@chromium.org>
Commit-Queue: Eugene Zemtsov \<eugene@chromium.org>
Cr-Commit-Position: refs/heads/main@{#926475}

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 10 tests and 8 subtests

Status Summary

Firefox

OK : 10
FAIL: 113

Chrome

OK : 10
PASS: 109
FAIL: 4

Safari

OK : 10
FAIL: 113

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/webcodecs/image-decoder-image-orientation-none.https.html
Test JPEG w/ EXIF orientation top-left on canvas w/o orientation: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation top-right on canvas w/o orientation.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation bottom-right on canvas w/o orientation.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation bottom-left on canvas w/o orientation.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation left-top on canvas w/o orientation.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation right-top on canvas w/o orientation.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation right-bottom on canvas w/o orientation.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation left-bottom on canvas w/o orientation.: FAIL (Chrome: PASS, Safari: FAIL)
/webcodecs/image-decoder.crossOriginIsolated.https.any.html
Test ImageDecoder decoding with a SharedArrayBuffer source: FAIL (Chrome: PASS, Safari: FAIL)
Test ImageDecoder decoding with a Uint8Array(SharedArrayBuffer) source: FAIL (Chrome: PASS, Safari: FAIL)
/webcodecs/image-decoder.crossOriginIsolated.https.any.worker.html
Test ImageDecoder decoding with a SharedArrayBuffer source: FAIL (Chrome: PASS, Safari: FAIL)
Test ImageDecoder decoding with a Uint8Array(SharedArrayBuffer) source: FAIL (Chrome: PASS, Safari: FAIL)
/webcodecs/image-decoder.https.any.html
Test JPEG image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation top-left.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation top-right.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation bottom-right.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation bottom-left.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation left-top.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation right-top.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation right-bottom.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation left-bottom.: FAIL (Chrome: PASS, Safari: FAIL)
Test PNG image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test AVIF image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test high bit depth HDR AVIF image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test multi-track AVIF image decoding w/ preferAnimation=false.: FAIL (Chrome: PASS, Safari: FAIL)
Test multi-track AVIF image decoding w/ preferAnimation=true.: FAIL (Chrome: PASS, Safari: FAIL)
Test WEBP image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test GIF image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG image YUV 4:2:0 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test AVIF image YUV 4:2:0 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test AVIF image YUV 4:2:2 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test AVIF image YUV 4:4:4 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test WEBP image YUV 4:2:0 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test invalid mime type rejects decode() requests: FAIL (Chrome: PASS, Safari: FAIL)
Test invalid mime type rejects decodeMetadata() requests: FAIL (Chrome: PASS, Safari: FAIL)
Test out of range index returns RangeError: FAIL (Chrome: PASS, Safari: FAIL)
Test partial decoding without a frame results in an error: FAIL (Chrome: PASS, Safari: FAIL)
Test completed property on fully buffered decode: FAIL (Chrome: PASS, Safari: FAIL)
Test decode, decodeMetadata after no track selected.: FAIL (Chrome: PASS, Safari: FAIL)
Test track selection in multi track image.: FAIL (Chrome: PASS, Safari: FAIL)
Test ReadableStream of gif: FAIL (Chrome: PASS, Safari: FAIL)
Test that decode requests are serialized.: FAIL (Chrome: PASS, Safari: FAIL)
Test ReadableStream aborts promises on track change: FAIL (Chrome: PASS, Safari: FAIL)
Test ReadableStream aborts completed on close: FAIL (Chrome: PASS, Safari: FAIL)
Test ReadableStream resolves completed: FAIL (Chrome: PASS, Safari: FAIL)
/webcodecs/image-decoder.https.any.worker.html
Test JPEG image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation top-left.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation top-right.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation bottom-right.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation bottom-left.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation left-top.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation right-top.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation right-bottom.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG w/ EXIF orientation left-bottom.: FAIL (Chrome: PASS, Safari: FAIL)
Test PNG image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test AVIF image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test high bit depth HDR AVIF image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test multi-track AVIF image decoding w/ preferAnimation=false.: FAIL (Chrome: PASS, Safari: FAIL)
Test multi-track AVIF image decoding w/ preferAnimation=true.: FAIL (Chrome: PASS, Safari: FAIL)
Test WEBP image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test GIF image decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test JPEG image YUV 4:2:0 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test AVIF image YUV 4:2:0 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test AVIF image YUV 4:2:2 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test AVIF image YUV 4:4:4 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test WEBP image YUV 4:2:0 decoding.: FAIL (Chrome: PASS, Safari: FAIL)
Test invalid mime type rejects decode() requests: FAIL (Chrome: PASS, Safari: FAIL)
Test invalid mime type rejects decodeMetadata() requests: FAIL (Chrome: PASS, Safari: FAIL)
Test out of range index returns RangeError: FAIL (Chrome: PASS, Safari: FAIL)
Test partial decoding without a frame results in an error: FAIL (Chrome: PASS, Safari: FAIL)
Test completed property on fully buffered decode: FAIL (Chrome: PASS, Safari: FAIL)
Test decode, decodeMetadata after no track selected.: FAIL (Chrome: PASS, Safari: FAIL)
Test track selection in multi track image.: FAIL (Chrome: PASS, Safari: FAIL)
Test ReadableStream of gif: FAIL (Chrome: PASS, Safari: FAIL)
Test that decode requests are serialized.: FAIL (Chrome: PASS, Safari: FAIL)
Test ReadableStream aborts promises on track change: FAIL (Chrome: PASS, Safari: FAIL)
Test ReadableStream aborts completed on close: FAIL (Chrome: PASS, Safari: FAIL)
Test ReadableStream resolves completed: FAIL (Chrome: PASS, Safari: FAIL)
/webcodecs/videoFrame-canvasImageSource.html
<video> and VideoFrame constructed VideoFrame: FAIL (Chrome: PASS, Safari: FAIL)
CSSImageValue constructed VideoFrame: FAIL (Chrome: PASS, Safari: FAIL)
Image element constructed VideoFrame: FAIL (Chrome: PASS, Safari: FAIL)
SVGImageElement constructed VideoFrame: FAIL (Chrome: PASS, Safari: FAIL)
Canvas element constructed VideoFrame: FAIL (Chrome: PASS, Safari: FAIL)
/webcodecs/videoFrame-createImageBitmap.any.worker.html
ImageBitmap<->VideoFrame with canvas(48x36 srgb uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(480x360 srgb uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(48x36 display-p3 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(480x360 display-p3 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(48x36 rec2020 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(480x360 rec2020 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
createImageBitmap uses frame display size: FAIL (Chrome: FAIL, Safari: FAIL)
/webcodecs/videoFrame-createImageBitmap.any.html
ImageBitmap<->VideoFrame with canvas(48x36 srgb uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(480x360 srgb uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(48x36 display-p3 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(480x360 display-p3 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(48x36 rec2020 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
ImageBitmap<->VideoFrame with canvas(480x360 rec2020 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
createImageBitmap uses frame display size: FAIL (Chrome: FAIL, Safari: FAIL)
/webcodecs/videoFrame-drawImage.any.html
drawImage(VideoFrame) with canvas(48x36 srgb uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage(VideoFrame) with canvas(480x360 srgb uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage(VideoFrame) with canvas(48x36 display-p3 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage(VideoFrame) with canvas(480x360 display-p3 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage(VideoFrame) with canvas(48x36 rec2020 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage on a closed VideoFrame throws InvalidStateError.: FAIL (Chrome: PASS, Safari: FAIL)
drawImage of nested frame works properly: FAIL (Chrome: PASS, Safari: FAIL)
drawImage with display size != visible size: FAIL (Chrome: FAIL, Safari: FAIL)
/webcodecs/videoFrame-drawImage.any.worker.html
drawImage(VideoFrame) with canvas(48x36 srgb uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage(VideoFrame) with canvas(480x360 srgb uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage(VideoFrame) with canvas(48x36 display-p3 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage(VideoFrame) with canvas(480x360 display-p3 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage(VideoFrame) with canvas(48x36 rec2020 uint8).: FAIL (Chrome: PASS, Safari: FAIL)
drawImage on a closed VideoFrame throws InvalidStateError.: FAIL (Chrome: PASS, Safari: FAIL)
drawImage of nested frame works properly: FAIL (Chrome: PASS, Safari: FAIL)
drawImage with display size != visible size: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eb944250167b
[wpt PR 30991] - webcodecs: Render video frames according to their display size, a=testonly
https://hg.mozilla.org/integration/autoland/rev/7926b0241676
[wpt PR 30991] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.