Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f33b8d6144a591f1142eaad35d4dd115bc4f0338
https://github.com/WebKit/WebKit/commit/f33b8d6144a591f1142eaad35d4dd115bc4f0338
Author: Ahmad Saleem <[email protected]>
Date: 2026-06-24 (Wed, 24 Jun 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any.js
M
LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any.worker-expected.txt
M Source/WebCore/platform/graphics/cv/VideoFrameCV.mm
M Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp
Log Message:
-----------
ArrayBuffer-backed I420/NV12 VideoFrame with codedHeight larger than
visibleRect.height renders chroma offset
https://bugs.webkit.org/show_bug.cgi?id=317524
rdar://180202939
Reviewed by Youenn Fablet and Philippe Normand.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
A buffer-backed VideoFrame is laid out for its coded size, with visibleRect only
cropping the output. But createI420/createI420A/createNV12 derived each chroma
plane's offset from the visible output height instead of the coded plane height,
so a frame whose codedHeight exceeds visibleRect.height (e.g. coded 1920x1088
shown as 1920x1080, or 320x196 shown as 320x180) read the bottom Y rows as
chroma,
producing a chroma offset. Use the coded plane height (sourceHeight /
destinationOffset) for the offsets; the output size and crop are unchanged
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any.js:
(promise_test.async t):
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any.worker-expected.txt:
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
(WebCore::VideoFrame::createNV12):
(WebCore::VideoFrame::createI420):
(WebCore::VideoFrame::createI420A):
* Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp:
(WebCore::VideoFrame::createI420):
(WebCore::VideoFrame::createI420A):
Canonical link: https://commits.webkit.org/315742@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications