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

Unified Diff: remoting/codec/video_encoder_vpx.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 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 | « remoting/client/token_fetcher_proxy.cc ('k') | remoting/host/daemon_process.cc » ('j') | 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 e0d768b9eedfa13c6cc78a08457131df17fcf240..724fbecdabc1af853bfdd3227380cff58335dfbf 100644
--- a/remoting/codec/video_encoder_vpx.cc
+++ b/remoting/codec/video_encoder_vpx.cc
@@ -45,10 +45,6 @@ void SetCommonCodecParameters(vpx_codec_enc_cfg_t* config,
config->g_timebase.num = 1;
config->g_timebase.den = 1000;
- // Adjust default target bit-rate to account for actual desktop size.
- config->rc_target_bitrate = size.width() * size.height() *
- config->rc_target_bitrate / config->g_w / config->g_h;
-
config->g_w = size.width();
config->g_h = size.height();
config->g_pass = VPX_RC_ONE_PASS;
@@ -71,6 +67,10 @@ void SetCommonCodecParameters(vpx_codec_enc_cfg_t* config,
void SetVp8CodecParameters(vpx_codec_enc_cfg_t* config,
const webrtc::DesktopSize& size) {
+ // Adjust default target bit-rate to account for actual desktop size.
+ config->rc_target_bitrate = size.width() * size.height() *
+ config->rc_target_bitrate / config->g_w / config->g_h;
+
SetCommonCodecParameters(config, size);
// Value of 2 means using the real time profile. This is basically a
@@ -97,10 +97,14 @@ void SetVp9CodecParameters(vpx_codec_enc_cfg_t* config,
// Disable quantization entirely, putting the encoder in "lossless" mode.
config->rc_min_quantizer = 0;
config->rc_max_quantizer = 0;
+ config->rc_end_usage = VPX_VBR;
} else {
- // Lossy encode using the same settings as for VP8.
- config->rc_min_quantizer = 20;
+ config->rc_min_quantizer = 4;
config->rc_max_quantizer = 30;
+ config->rc_end_usage = VPX_CBR;
+ // In the absence of a good bandwidth estimator set the target bitrate to a
+ // conservative default.
+ config->rc_target_bitrate = 500;
}
}
« no previous file with comments | « remoting/client/token_fetcher_proxy.cc ('k') | remoting/host/daemon_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698