Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e81c8894421d4dce51dad86e5406085b06c3837f
https://github.com/WebKit/WebKit/commit/e81c8894421d4dce51dad86e5406085b06c3837f
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/fast/webgpu/nocrash/fuzz-283943-expected.txt
M LayoutTests/fast/webgpu/nocrash/fuzz-284326-expected.txt
A
LayoutTests/http/wpt/webcodecs/2d-drawImage-videoFrame-I420-SMPTE240M-expected.txt
A LayoutTests/http/wpt/webcodecs/2d-drawImage-videoFrame-I420-SMPTE240M.html
M LayoutTests/http/wpt/webcodecs/resources/videoframe-utilities.js
A
LayoutTests/http/wpt/webcodecs/webgl-texImage2D-videoFrame-I420-expected.txt
A LayoutTests/http/wpt/webcodecs/webgl-texImage2D-videoFrame-I420.html
A
LayoutTests/http/wpt/webcodecs/webgpu-importExternalTexture-videoFrame-I420-expected.txt
A
LayoutTests/http/wpt/webcodecs/webgpu-importExternalTexture-videoFrame-I420.html
M LayoutTests/platform/glib/TestExpectations
A
LayoutTests/platform/glib/http/wpt/webcodecs/2d-drawImage-videoFrame-I420-SMPTE240M-expected.txt
A
LayoutTests/platform/glib/http/wpt/webcodecs/webgl-texImage2D-videoFrame-I420-expected.txt
M LayoutTests/platform/ios/TestExpectations
A
LayoutTests/platform/ios/http/wpt/webcodecs/2d-drawImage-videoFrame-I420-SMPTE240M-expected.txt
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WebGPU/WebGPU/BindGroup.mm
Log Message:
-----------
WebGPU: GPU process asserts when importing a SMPTE 240M video frame as a
GPUExternalTexture
https://bugs.webkit.org/show_bug.cgi?id=325505
rdar://188593644
Reviewed by Mike Wyrzykowski.
A VideoFrame with VideoColorSpace matrix "smpte240m" gets the
kCVImageBufferYCbCrMatrix_SMPTE_240M_1995 attachment. WebGPU's
YCbCr-to-RGB conversion matrix lookup handled only the BT.709,
BT.601 and BT.2020 matrices, so importing such a frame with
importExternalTexture() hit ASSERT_NOT_REACHED in the GPU process.
Release builds decoded the frame with the BT.709 matrix, which is
off by up to about 5 in a channel.
Add the SMPTE 240M matrices for full and video range. They are
derived from Kr = 0.212 and Kb = 0.087 in the same way as the
existing matrices. WebGL already handles SMPTE 240M.
The WebGPU and WebGL tests draw I420 frames of each matrix and
compare the result to a JS reference conversion. The 2D canvas test
records the current failures: drawImage() still decodes SMPTE 240M
with the BT.709 matrix.
The fast/webgpu/nocrash/fuzz-283943.html and fuzz-284326.html tests
hit the same assertion.
Tests: http/wpt/webcodecs/2d-drawImage-videoFrame-I420-SMPTE240M.html
http/wpt/webcodecs/webgl-texImage2D-videoFrame-I420.html
http/wpt/webcodecs/webgpu-importExternalTexture-videoFrame-I420.html
*
LayoutTests/http/wpt/webcodecs/2d-drawImage-videoFrame-I420-SMPTE240M-expected.txt:
Added.
* LayoutTests/http/wpt/webcodecs/2d-drawImage-videoFrame-I420-SMPTE240M.html:
Added.
* LayoutTests/http/wpt/webcodecs/resources/videoframe-utilities.js:
(lumaCoefficients):
(sRGBToTransferGamma):
(sRGBImageDataToI420BT709):
(I420ToSRGB):
(I420BT709ToSRGB):
(BT709ToSRGBGamma): Deleted.
(createTestImageData): Deleted.
Generalize the I420 conversions from BT.709 to the matrix and transfer
function of a VideoColorSpaceInit, and add createVideoFrame().
* LayoutTests/http/wpt/webcodecs/webgl-texImage2D-videoFrame-I420-expected.txt:
Added.
* LayoutTests/http/wpt/webcodecs/webgl-texImage2D-videoFrame-I420.html: Added.
*
LayoutTests/http/wpt/webcodecs/webgpu-importExternalTexture-videoFrame-I420-expected.txt:
Added.
*
LayoutTests/http/wpt/webcodecs/webgpu-importExternalTexture-videoFrame-I420.html:
Added.
* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::transferFunctionFromString):
(WebGPU::colorSpaceConversionMatrixForPixelBuffer):
* LayoutTests/TestExpectations:
* LayoutTests/fast/webgpu/nocrash/fuzz-283943-expected.txt:
* LayoutTests/fast/webgpu/nocrash/fuzz-284326-expected.txt:
* LayoutTests/platform/ios/TestExpectations:
*
LayoutTests/platform/ios/http/wpt/webcodecs/2d-drawImage-videoFrame-I420-SMPTE240M-expected.txt:
Added.
* LayoutTests/platform/mac-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/322357@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications