Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 37dfb4fa3c73132a0d3b5d90aa0cb6253cad64bb
https://github.com/WebKit/WebKit/commit/37dfb4fa3c73132a0d3b5d90aa0cb6253cad64bb
Author: Youenn Fablet <[email protected]>
Date: 2024-07-09 (Tue, 09 Jul 2024)
Changed paths:
A LayoutTests/http/wpt/webcodecs/encode-bitrate-change-expected.txt
A LayoutTests/http/wpt/webcodecs/encode-bitrate-change.html
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoderConfig.h
M Source/WebCore/platform/VideoEncoder.h
M Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.cpp
M Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.h
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:
-----------
Calling configure on WebCodecs Video Encoder triggers a new key frame each
time even if the configuration is only changing the bitrate
https://bugs.webkit.org/show_bug.cgi?id=261402
rdar://115482127
Reviewed by Jean-Yves Avenard.
Check the new configuration is the same as the new one, except for bitrate and
framerate.
If that is the case, we call setRate instead of recreating the encoder.
Implement setRate for VPX and remote encoders.
Covered by newly added test.
* LayoutTests/http/wpt/webcodecs/encode-bitrate-change-expected.txt: Added.
* LayoutTests/http/wpt/webcodecs/encode-bitrate-change.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:
(WebCore::WebCodecsVideoEncoder::updateRates):
(WebCore::WebCodecsVideoEncoder::configure):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoderConfig.h:
(WebCore::isSameConfigurationExceptBitrateAndFramerate):
* Source/WebCore/platform/VideoEncoder.h:
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.cpp:
(WebCore::LibWebRTCVPXVideoEncoder::setRates):
(WebCore::computeAllocation):
(WebCore::LibWebRTCVPXInternalVideoEncoder::initialize):
(WebCore::LibWebRTCVPXInternalVideoEncoder::encode):
(WebCore::LibWebRTCVPXInternalVideoEncoder::setRates):
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.h:
* Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp:
(WebKit::RemoteVideoEncoder::setRates):
(WebKit::RemoteVideoEncoder::flush):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::setEncodeRatesCallback):
(WebKit::LibWebRTCCodecs::setEncodeRates):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
Originally-landed-as: 4c9425f9126b. rdar://115482127
Canonical link: https://commits.webkit.org/280771@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes