Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(732)

Unified Diff: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc

Issue 2309743002: Move the QP scaling thresholds to the relevant encoders (Closed)
Patch Set: fix namespace issue in videoToolbox encoder Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index bba30a3ca81acc368b9a13365f54ed06b1c94cd1..a3274c19197355e017084cd589c57949a9d81abb 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -26,6 +26,8 @@ namespace webrtc {
namespace {
+const int kLowH264QpThreshold = 24;
pbos-webrtc 2016/09/12 19:51:49 I want these to be declared in one place for this
+const int kHighH264QpThreshold = 37;
const bool kOpenH264EncoderDetailedLogging = false;
// Used by histograms. Values of entries should not be changed.
@@ -213,8 +215,8 @@ int32_t H264EncoderImpl::InitEncode(const VideoCodec* codec_settings,
return WEBRTC_VIDEO_CODEC_ERROR;
}
// TODO(pbos): Base init params on these values before submitting.
- quality_scaler_.Init(QualityScaler::kLowH264QpThreshold,
- QualityScaler::kBadH264QpThreshold,
+ quality_scaler_.Init(kLowH264QpThreshold,
+ kHighH264QpThreshold,
codec_settings_.startBitrate, codec_settings_.width,
codec_settings_.height, codec_settings_.maxFramerate);
int video_format = EVideoFormatType::videoFormatI420;

Powered by Google App Engine
This is Rietveld 408576698