Chromium Code Reviews| 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..b9a04e76469dd9ce469ef46ab22b7ddf24a76daa 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 |
| @@ -98,9 +98,10 @@ void SetVp9CodecParameters(vpx_codec_enc_cfg_t* config, |
| config->rc_min_quantizer = 0; |
| config->rc_max_quantizer = 0; |
| } 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; |
| + config->rc_target_bitrate = 500; |
|
Wez
2015/04/18 00:00:23
nit: Please add a comment to indicate that we are
aconverse
2015/04/20 17:12:26
Done.
|
| } |
| } |