mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 17:20:54 +00:00
Bug 1365090: use target bitrate instead of max for simulcast. r=bwc
MozReview-Commit-ID: GThcXHHnoCV --HG-- extra : rebase_source : 352a82ad81858782898a10440ff77b4891af6a60
This commit is contained in:
parent
4d8185fc04
commit
4dd7f2dc11
@ -426,7 +426,16 @@ bool VideoSendStream::ReconfigureVideoEncoder(
|
||||
video_codec.minBitrate =
|
||||
std::min(static_cast<uint16_t>(video_codec.minBitrate),
|
||||
static_cast<uint16_t>(streams[i].min_bitrate_bps / 1000));
|
||||
video_codec.maxBitrate += streams[i].max_bitrate_bps / 1000;
|
||||
// SimulcastEncoderAdapter::GetStreamBitrate() expects to give the target
|
||||
// rate to each of the lower layers and the remainder to the last layer.
|
||||
// Giving max to everything results in lower layer to consume too much
|
||||
// bandwidth and the top layer potentially not having enough bitrate left
|
||||
// for its minimum.
|
||||
if (i + 1 == streams.size()) {
|
||||
video_codec.maxBitrate += streams[i].max_bitrate_bps / 1000;
|
||||
} else {
|
||||
video_codec.maxBitrate += streams[i].target_bitrate_bps / 1000;
|
||||
}
|
||||
video_codec.qpMax = std::max(video_codec.qpMax,
|
||||
static_cast<unsigned int>(streams[i].max_qp));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user