aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
diff options
context:
space:
mode:
authorfbarchard@google.com <fbarchard@google.com@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-06-18 22:06:42 +0000
committerfbarchard@google.com <fbarchard@google.com@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-06-18 22:06:42 +0000
commitd7148c86c5b020f4add340e68185335f761743fd (patch)
treef58a098776a96e5e052c61db44586665aa260c36 /webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
parent30fb7b83d5aab123b0d1fd0bd18a225a5040d7b0 (diff)
downloadwebrtc-d7148c86c5b020f4add340e68185335f761743fd.tar.gz
Use 3 threads for higher than 720p resolutions
BUG=1893 TEST=untested R=ajm@google.com, andrew@webrtc.org, dingkai@google.com, marpan@google.com, marpan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1684004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4243 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc')
-rw-r--r--webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
index 8aa76d0cda..488d951c85 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -211,7 +211,9 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
}
config_->g_lag_in_frames = 0; // 0- no frame lagging
- if (codec_.width * codec_.height > 640 * 480 && number_of_cores >= 2) {
+ if (codec_.width * codec_.height > 1280 * 960 && number_of_cores >= 6) {
+ config_->g_threads = 3; // 3 threads for 1080p.
+ } else if (codec_.width * codec_.height > 640 * 480 && number_of_cores >= 3) {
config_->g_threads = 2; // 2 threads for qHD/HD.
} else {
config_->g_threads = 1; // 1 thread for VGA or less