Index: webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm |
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm |
index 2d1e2a1416d350e02da3db3a17f7ec00a085c206..81638239e4684a780a10337d641b27ac3915829e 100644 |
--- a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm |
+++ b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm |
@@ -33,6 +33,8 @@ namespace internal { |
// kVTCompressionPropertyKey_AverageBitRate. The data rate limit is set higher |
// than the average bit rate to avoid undershooting the target. |
const float kLimitToAverageBitRateFactor = 1.5f; |
+const int kLowH264QpThreshold = 28; |
pbos-webrtc
2016/09/12 19:51:49
Can you add a comment here + rename to explicitly
|
+const int kHighH264QpThreshold = 39; |
// Convenience function for creating a dictionary. |
inline CFDictionaryRef CreateCFDictionary(CFTypeRef* keys, |
@@ -232,8 +234,8 @@ int H264VideoToolboxEncoder::InitEncode(const VideoCodec* codec_settings, |
RTC_DCHECK_EQ(codec_settings->codecType, kVideoCodecH264); |
{ |
rtc::CritScope lock(&quality_scaler_crit_); |
- quality_scaler_.Init(QualityScaler::kLowH264QpThreshold, |
- QualityScaler::kBadH264QpThreshold, |
+ quality_scaler_.Init(internal::kLowH264QpThreshold, |
+ internal::kHighH264QpThreshold, |
codec_settings->startBitrate, codec_settings->width, |
codec_settings->height, codec_settings->maxFramerate); |
QualityScaler::Resolution res = quality_scaler_.GetScaledResolution(); |