Remove QualityScaler framerate reduction.
Framerate-reduction code is disabled on all platforms, and this code adds complexity. It's necessary to react fast, especially on mobile platforms or other bad network conditions and framerate reduction adds another step between HD and QVGA. BUG=webrtc:5678, webrtc:5830 R=jackychen@webrtc.org, mflodman@webrtc.org Review URL: https://codereview.webrtc.org/1885893002 . Cr-Commit-Position: refs/heads/master@{#12503}
This commit is contained in:
@ -494,10 +494,6 @@ void SimulcastEncoderAdapter::OnDroppedFrame() {
|
||||
streaminfos_[0].encoder->OnDroppedFrame();
|
||||
}
|
||||
|
||||
int SimulcastEncoderAdapter::GetTargetFramerate() {
|
||||
return streaminfos_[0].encoder->GetTargetFramerate();
|
||||
}
|
||||
|
||||
bool SimulcastEncoderAdapter::SupportsNativeHandle() const {
|
||||
// We should not be calling this method before streaminfos_ are configured.
|
||||
RTC_DCHECK(!streaminfos_.empty());
|
||||
|
||||
@ -58,7 +58,6 @@ class SimulcastEncoderAdapter : public VP8Encoder {
|
||||
|
||||
void OnDroppedFrame() override;
|
||||
|
||||
int GetTargetFramerate() override;
|
||||
bool SupportsNativeHandle() const override;
|
||||
const char* ImplementationName() const override;
|
||||
|
||||
|
||||
@ -598,15 +598,13 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
|
||||
}
|
||||
|
||||
rps_.Init();
|
||||
// Disable both high-QP limits and framedropping. Both are handled by libvpx
|
||||
// internally.
|
||||
// QP thresholds are chosen to be high enough to be hit in practice when
|
||||
// quality is good, but also low enough to not cause a flip-flop behavior
|
||||
// (e.g. going up in resolution shouldn't give so bad quality that we should
|
||||
// go back down).
|
||||
const int kLowQpThreshold = 29;
|
||||
const int kDisabledBadQpThreshold = 100;
|
||||
quality_scaler_.Init(kLowQpThreshold, kDisabledBadQpThreshold, false,
|
||||
const int kBadQpThreshold = 100;
|
||||
quality_scaler_.Init(kLowQpThreshold, kBadQpThreshold,
|
||||
codec_.startBitrate, codec_.width, codec_.height,
|
||||
codec_.maxFramerate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user