Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4ae8b7a5ac87b39f6b697188a5399669639e6dcd
      
https://github.com/WebKit/WebKit/commit/4ae8b7a5ac87b39f6b697188a5399669639e6dcd
  Author: Youenn Fablet <[email protected]>
  Date:   2026-10-06 (Tue, 06 Oct 2026)

  Changed paths:
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/platform/TrackInfo.h
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.h
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.mm
    M Source/WebCore/platform/graphics/cocoa/H264UtilitiesCocoa.mm
    M Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm
    M Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h
    M Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm
    M Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoder.h
    M Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoder.mm
    M Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTB.h
    M Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTB.mm
    R Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBAV1.h
    R Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBAV1.mm
    R Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBH264.h
    R Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBH264.mm
    R Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBH265.h
    R Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBH265.mm
    R Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBVP9.h
    R Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBVP9.mm
    M Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h
    M Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in
    M Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h

  Log Message:
  -----------
  Move annexB parsing and AVC/HVCC parsing from GPUProcess to WebProcess
rdar://188572538
https://bugs.webkit.org/show_bug.cgi?id=325478

Reviewed by Jean-Yves Avenard.

Instead of doing parsing in GPUVideoDecoder subclasses, we are now doing 
bitstream parsing in WebProcess (LibWebRTCCodecs for now).
This improves the safety of GPUProcess.

We transform annexb streams into AVC/HVCC streams.
We parse the reorder window size as well, which is now stored in VideoInfo.

We update IPC to pass VideoInfo to GPUVideoDecoderVTB.
GPUVideoDecoderVTB can then directly use the VideoInfo to set up the decoder 
and the decoder reorder queue.

With these changes, we can remove GPUVideoDecoderVTB subclasses and keep only 
GPUVideoDecoderVTB.

Covered by existing tests.

* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h:
* Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:
(WebCore::createVideoInfoFromVP9Stream):
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoder.h:
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoder.mm:
(WebCore::GPUVideoDecoder::create):
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTB.h:
(WebCore::GPUVideoDecoderVTB::WTF_REQUIRES_CAPABILITY): Deleted.
(WebCore::GPUVideoDecoderVTB::queue const): Deleted.
(WebCore::GPUVideoDecoderVTB::shouldOverrideColorSpaceAttachments const): 
Deleted.
(WebCore::GPUVideoDecoderVTB::WTF_GUARDED_BY_CAPABILITY): Deleted.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTB.mm:
(WebCore::GPUVideoDecoderVTB::GPUVideoDecoderVTB):
(WebCore::GPUVideoDecoderVTB::decodeFrameInternal):
(WebCore::GPUVideoDecoderVTB::setFormat):
(WebCore::GPUVideoDecoderVTB::decodeFrame):
(WebCore::GPUVideoDecoderVTB::setVideoInfo):
(WebCore::GPUVideoDecoderVTBQueue::create):
(WebCore::GPUVideoDecoderVTBQueue::GPUVideoDecoderVTBQueue):
(WebCore::createMultiImageCallback):
(WebCore::GPUVideoDecoderVTBQueue::reorderQueueMaxSize const):
(WebCore::GPUVideoDecoderVTBQueue::setReorderQueueMaxSize):
(WebCore::GPUVideoDecoderVTBQueue::reorderSize const): Deleted.
(WebCore::GPUVideoDecoderVTBQueue::setReorderSize): Deleted.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBAV1.h: Removed.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBAV1.mm: Removed.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBH264.h: Removed.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBH264.mm: Removed.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBH265.h: Removed.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBH265.mm: Removed.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBVP9.h: Removed.
* Source/WebCore/platform/video-codecs/cocoa/GPUVideoDecoderVTBVP9.mm: Removed.
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
(WebKit::LibWebRTCCodecsProxy::setDecoderFormatDescription):
* Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp:
(WebKit::RemoteVideoCodecFactory::createDecoder):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::createVideoDecoder):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::LibWebRTCCodecs::createDecoderAndWaitUntilReady):
(WebKit::LibWebRTCCodecs::createDecoderInternal):
(WebKit::videoInfoFromFormatDescription):
(WebKit::LibWebRTCCodecs::setDecoderFormatDescription):
(WebKit::videoInfoFromAnnexBFrame):
(WebKit::convertAnnexBFrameToLengthPrefixed):
(WebKit::LibWebRTCCodecs::sendFrameToDecode):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
(WebKit::LibWebRTCCodecs::Decoder::Decoder):
* Source/WebCore/platform/TrackInfo.h:
(WebCore::VideoInfo::reorderSize const):
(WebCore::VideoInfo::reorderQueueMaxSize const):
* Source/WebCore/platform/graphics/cocoa/CMUtilities.h:
(WebCore::createVideoInfoFromFormatDescription):
* Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:
(WebCore::createVideoInfoFromFormatDescription):
* Source/WebCore/platform/graphics/cocoa/H264UtilitiesCocoa.mm:
(WebCore::createVideoInfoFromAVCC):
(WebCore::createVideoInfoFromAVCAnnexBStream):
* Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
(WebCore::createVideoInfoFromHEVCAnnexBStream):
(WebCore::createVideoInfoFromHVCC):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to