diff options
author | wez <wez@chromium.org> | 2014-08-29 12:22:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-29 19:26:14 +0000 |
commit | b7a2c273f108608748d6b126088e7aa7b78b205b (patch) | |
tree | aaab9364355f0075eb5a27954ef759f7b7e59cd4 /remoting/codec/video_encoder_vpx.cc | |
parent | 53187d291f75b10d1dfa4770f27c2b0f1d8ea1c0 (diff) | |
download | chromium_src-b7a2c273f108608748d6b126088e7aa7b78b205b.zip chromium_src-b7a2c273f108608748d6b126088e7aa7b78b205b.tar.gz chromium_src-b7a2c273f108608748d6b126088e7aa7b78b205b.tar.bz2 |
Switch VP9 lossy encode to CPUUSED=7 and use it by default.
Lossy encoding is now reliable enough to be enabled by default when running with VP9.
BUG=260879
Review URL: https://codereview.chromium.org/421793003
Cr-Commit-Position: refs/heads/master@{#292680}
Diffstat (limited to 'remoting/codec/video_encoder_vpx.cc')
-rw-r--r-- | remoting/codec/video_encoder_vpx.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/remoting/codec/video_encoder_vpx.cc b/remoting/codec/video_encoder_vpx.cc index 62abc4a..75b6d4e 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); |