[webkit-changes] [WebKit/WebKit] 13105f: Implement WebCodecs VideoFrame copyTo

youennf noreply at github.com
Wed Oct 12 06:44:19 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 13105f5f6a4520b29b20c7f2ac44e892b29ba61e
      https://github.com/WebKit/WebKit/commit/13105f5f6a4520b29b20c7f2ac44e892b29ba61e
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2022-10-12 (Wed, 12 Oct 2022)

  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 LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.crossOriginIsolated.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.crossOriginIsolated.https.any.worker-expected.txt
    M Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp
    M Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp
    M Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
    M Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h
    M Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrameAlgorithms.cpp
    M Source/WebCore/platform/graphics/cv/VideoFrameCV.mm

  Log Message:
  -----------
  Implement WebCodecs VideoFrame copyTo
https://bugs.webkit.org/show_bug.cgi?id=246210
rdar://problem/100893780

Reviewed by Eric Carlson.

Add support for copyTo for RGB, NV12 and I420 formats for macOS/iOS ports.
Make use of libyuv for I420 and direct copy for RGB and NV12.

* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any.js:
(makeNV12_4x2):
(promise_test.async t):
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.crossOriginIsolated.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-copyTo.crossOriginIsolated.https.any.worker-expected.txt:
* Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp:
* Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp:
* Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp:
* Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.h:
* Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitUtilities.mm:
(webrtc::copyI420BufferToPixelBuffer):
(webrtc::pixelBufferFromI420Buffer):
(webrtc::copyPixelBufferInI420Buffer):
(webrtc::copyBufferToPixelBuffer): Deleted.
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrameAlgorithms.cpp:
(WebCore::sampleCountPerPixel):
(WebCore::computeLayoutAndAllocationSize):
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
(WebCore::VideoFrame::createRGBA):
(WebCore::VideoFrame::createI420):
(WebCore::copyRGBData):
(WebCore::copyNV12):
(WebCore::VideoFrame::copyTo):

Canonical link: https://commits.webkit.org/255429@main




More information about the webkit-changes mailing list