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

Unified Diff: media/cast/video_sender/codecs/vp8/vp8_encoder.cc

Issue 228313002: Cast: Use 2 threads for encoding on capable systems (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 years, 8 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
« no previous file with comments | « media/cast/test/sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/video_sender/codecs/vp8/vp8_encoder.cc
diff --git a/media/cast/video_sender/codecs/vp8/vp8_encoder.cc b/media/cast/video_sender/codecs/vp8/vp8_encoder.cc
index 8fb1695f3d52247ce37fbf33eeaa9cc53907718e..c2f06c5886f1ab11be31d1cf74c8ddf102ed7933 100644
--- a/media/cast/video_sender/codecs/vp8/vp8_encoder.cc
+++ b/media/cast/video_sender/codecs/vp8/vp8_encoder.cc
@@ -79,10 +79,10 @@ void Vp8Encoder::Initialize() {
acked_frame_buffers_[i] = true;
used_buffers_frame_id_[i] = kStartFrameId;
}
- InitEncode(cast_config_.number_of_cores);
+ InitEncode(cast_config_.number_of_encode_threads);
}
-void Vp8Encoder::InitEncode(int number_of_cores) {
+void Vp8Encoder::InitEncode(int number_of_encode_threads) {
DCHECK(thread_checker_.CalledOnValidThread());
// Populate encoder configuration with default values.
if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_.get(), 0)) {
@@ -102,13 +102,7 @@ void Vp8Encoder::InitEncode(int number_of_cores) {
// codec requirements.
config_->g_error_resilient = 1;
}
-
- if (cast_config_.width * cast_config_.height > 640 * 480 &&
- number_of_cores >= 2) {
- config_->g_threads = 2; // 2 threads for qHD/HD.
- } else {
- config_->g_threads = 1; // 1 thread for VGA or less.
- }
+ config_->g_threads = number_of_encode_threads;
// Rate control settings.
// TODO(pwestin): revisit these constants. Currently identical to webrtc.
« no previous file with comments | « media/cast/test/sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698