Drop frames until specified bitrate is achieved.

This CL fixes a regression introduced with the new quality scaler
where the video would no longer start in a scaled mode. This CL adds
code that compares incoming captured frames to the target bitrate,
and if they are found to be too large, they are dropped and sinkWants
set to a lower resolution. The number of dropped frames should be low
(0-4 in most cases) and should not introduce a noticeable delay, or
at least should be preferrable to having the first 2-4 seconds of video
have very low quality.

BUG=webrtc:6953

Review-Url: https://codereview.webrtc.org/2630333002
Cr-Commit-Position: refs/heads/master@{#16391}
This commit is contained in:
kthelgason
2017-02-01 01:31:52 -08:00
committed by Commit bot
parent fdd9b85652
commit 83399caec5
7 changed files with 151 additions and 32 deletions

View File

@ -35,7 +35,6 @@ BitrateAllocation DefaultVideoBitrateAllocator::GetAllocation(
} else {
allocation.SetBitrate(0, 0, total_bitrate_bps);
}
return allocation;
}