Calling configure on WebCodecs Video Encoder triggers a new key frame each time even if the configuration is only changing the bitrate
c2c3eedb8d201a9fd6da3207279cd9e75a501687
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 NOBODY (OOPS!). 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. * Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp: (WebCore::isSameConfigurationExceptBitrateAndFramerate): (WebCore::WebCodecsVideoEncoder::updateRates): (WebCore::WebCodecsVideoEncoder::configure): * Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h: * 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:
https://github.com/WebKit/WebKit/commit/13e81c02da2e01337c2eb8ab165a2ed2a00f2a11
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/c2c3eedb8d201a9fd6da3207279cd9e75a501687)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/9a423655dfc2ec9c95cb2b9f6b7b00187ad5a812)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/2440b071949662a8f6fbe340a2e783367ed8371e)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/4c9425f9126b167b3fb0d7b75e4a7f973e17ab5a)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/13e81c02da2e01337c2eb8ab165a2ed2a00f2a11)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/560bb0d89f73fa92770fd763eebb042d6ba22059)
Commit message contains (OOPS!), blocking PR #21499
Commit message contains (OOPS!), blocking PR #21499
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/b089cc27f1bf6f0f034fb4eaed233a930909145a)
EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/2838a5253fdec93e0e0b5852529d817616732e57)
Committed 280771@main (37dfb4fa3c73): https://commits.webkit.org/280771@main
Reviewed commits have been landed. Closing PR #21499 and removing active labels.