[webkit-changes] [WebKit/WebKit] 60db1b: Implement WebCodecs VideoFrame allocationSize

youennf noreply at github.com
Sat Oct 8 08:17:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 60db1be1b9161f6c34aa7eb03c2198f5d19f9c49
      https://github.com/WebKit/WebKit/commit/60db1be1b9161f6c34aa7eb03c2198f5d19f9c49
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2022-10-08 (Sat, 08 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.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/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.h
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrameAlgorithms.cpp
    M Source/WebCore/platform/graphics/cv/VideoFrameCV.mm

  Log Message:
  -----------
  Implement WebCodecs VideoFrame allocationSize
https://bugs.webkit.org/show_bug.cgi?id=246209
rdar://problem/100893685

Reviewed by Eric Carlson.

Make CopyToOptions optionals so that they work with current algorithms.
Implement allocationSize by calling existing parseVideoFrameCopyToOptions function.
Update the allocation size to account for RGB formats which have 4 samples per pixel.

* 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:
* 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/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp:
(WebCore::WebCodecsVideoFrame::allocationSize):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.h:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrameAlgorithms.cpp:
(WebCore::parseVisibleRect):
(WebCore::sampleCountPerPixel):
(WebCore::computeLayoutAndAllocationSize):
(WebCore::parseVideoFrameCopyToOptions):
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
(WebCore::VideoFrame::copyTo):

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




More information about the webkit-changes mailing list