Throttle frame-rate In VP8 encoder in steady state for screenshare
If minQP is reached and encoder undershoot consistently, we consider the quality good enough and throttle encode frame rate. Bug: webrtc:10310 Change-Id: Ifd07280040dd67ef6e544efdd4619d47bff951e8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125461 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27003}
This commit is contained in:

committed by
Commit Bot

parent
2ecc8c8be2
commit
7b41225156
@ -86,6 +86,7 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
kDefaultOutlierFrameSizePercent};
|
||||
RTC_DCHECK_LE(streams.size(), kMaxSimulcastStreams);
|
||||
|
||||
int max_framerate = 0;
|
||||
for (size_t i = 0; i < streams.size(); ++i) {
|
||||
SimulcastStream* sim_stream = &video_codec.simulcastStream[i];
|
||||
RTC_DCHECK_GT(streams[i].width, 0);
|
||||
@ -105,6 +106,7 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
sim_stream->width = static_cast<uint16_t>(streams[i].width);
|
||||
sim_stream->height = static_cast<uint16_t>(streams[i].height);
|
||||
sim_stream->maxFramerate = streams[i].max_framerate;
|
||||
max_framerate = std::max(max_framerate, streams[i].max_framerate);
|
||||
sim_stream->minBitrate = streams[i].min_bitrate_bps / 1000;
|
||||
sim_stream->targetBitrate = streams[i].target_bitrate_bps / 1000;
|
||||
sim_stream->maxBitrate = streams[i].max_bitrate_bps / 1000;
|
||||
@ -134,8 +136,8 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
if (video_codec.maxBitrate < kEncoderMinBitrateKbps)
|
||||
video_codec.maxBitrate = kEncoderMinBitrateKbps;
|
||||
|
||||
RTC_DCHECK_GT(streams[0].max_framerate, 0);
|
||||
video_codec.maxFramerate = streams[0].max_framerate;
|
||||
RTC_DCHECK_GT(max_framerate, 0);
|
||||
video_codec.maxFramerate = max_framerate;
|
||||
|
||||
// Set codec specific options
|
||||
if (config.encoder_specific_settings)
|
||||
|
Reference in New Issue
Block a user