Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dav1d decoder instead of libaom decoder
https://bugs.webkit.org/show_bug.cgi?id=248523 rdar://problem/102804765 Reviewed by Jean-Yves Avenard. dav1d decoder is more efficient than libaom decoder so it is best to use dav1d. dav1d is a librarly linked in WebCore so we create a dav1d webrtc decoder in WebCore and not libwebrtc. We integrate this decoder at WebKit level. We have to export more headers, including libyuv from libwebrtc to be used in WebCore. We update xcconfig for that purpose. We link dav1d conditionnaly on ENABLE_WEB_RTC if it is not already linked through libavif. * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp: * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp: * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp: * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig: * Source/ThirdParty/libwebrtc/Configurations/libyuv.xcconfig: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitDecoder.h: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitDecoder.mm: (webrtc::RemoteVideoDecoder::RemoteVideoDecoder): (webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder): * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoDecoderFactory.m: (-[RTCDefaultVideoDecoderFactory supportedCodecs]): (-[RTCDefaultVideoDecoderFactory createDecoder:]): * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCDefaultVideoEncoderFactory.m: (+[RTCDefaultVideoEncoderFactory supportedCodecsWithH265:vp9Profile0:vp9Profile2:av1:]): (-[RTCDefaultVideoEncoderFactory createEncoder:]): * Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj: * Source/WebCore/PAL/libavif/dav1d/dav1d.xcodeproj/project.pbxproj: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCDav1dDecoder.cpp: Added. (WebCore::ScopedDav1dData::~ScopedDav1dData): (WebCore::ScopedDav1dData::Data): (WebCore::ScopedDav1dPicture::~ScopedDav1dPicture): (WebCore::ScopedDav1dPicture::Picture): (WebCore::NullFreeCallback): (WebCore::Dav1dDecoder::Dav1dDecoder): (WebCore::Dav1dDecoder::~Dav1dDecoder): (WebCore::Dav1dDecoder::Configure): (WebCore::Dav1dDecoder::RegisterDecodeCompleteCallback): (WebCore::Dav1dDecoder::Release): (WebCore::Dav1dDecoder::GetDecoderInfo const): (WebCore::Dav1dDecoder::ImplementationName const): (WebCore::Dav1dDecoder::Decode): (WebCore::createLibWebRTCDav1dDecoder): * Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCDav1dDecoder.h: Added. * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::createVideoDecoder): (WebKit::releaseVideoDecoder): (WebKit::decodeVideoFrame): (WebKit::registerDecodeCompleteCallback): Canonical link: https://commits.webkit.org/257283@main
- Loading branch information
Showing
18 changed files
with
534 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.