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

Unified Diff: remoting/codec/video_encoder_vpx.cc

Issue 421793003: Switch VP9 lossy encode to CPUUSED=7 and use it by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/video_encoder_vpx.cc
diff --git a/remoting/codec/video_encoder_vpx.cc b/remoting/codec/video_encoder_vpx.cc
index 62abc4a363fd1c0efbeea5d3efda17fd5a0f5b8e..75b6d4eb363e2fdd6287d6b17d170b50300f9940 100644
--- a/remoting/codec/video_encoder_vpx.cc
+++ b/remoting/codec/video_encoder_vpx.cc
@@ -133,9 +133,11 @@ ScopedVpxCodec CreateVP9Codec(const webrtc::DesktopSize& size,
if (vpx_codec_enc_init(codec.get(), algo, &config, 0))
return ScopedVpxCodec();
- // Request the lowest-CPU encode feature-set that VP9 supports.
+ // Request the lowest-CPU usage that VP9 supports, which depends on whether
+ // we are encoding lossy or lossless.
// Note that this is configured via the same parameter as for VP8.
- if (vpx_codec_control(codec.get(), VP8E_SET_CPUUSED, 5))
+ int cpu_used = lossless_encode ? 5 : 7;
+ if (vpx_codec_control(codec.get(), VP8E_SET_CPUUSED, cpu_used))
return ScopedVpxCodec();
// Use the lowest level of noise sensitivity so as to spend less time
@@ -334,9 +336,6 @@ VideoEncoderVpx::VideoEncoderVpx(bool use_vp9)
active_map_width_(0),
active_map_height_(0) {
if (use_vp9_) {
- // Use lossless encoding mode by default.
- SetLosslessEncode(true);
-
// Use I444 colour space, by default, if specified on the command-line.
if (CommandLine::ForCurrentProcess()->HasSwitch(kEnableI444SwitchName)) {
SetLosslessColor(true);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698