Chromium Code Reviews| Index: content/renderer/pepper/video_encoder_shim.cc |
| diff --git a/content/renderer/pepper/video_encoder_shim.cc b/content/renderer/pepper/video_encoder_shim.cc |
| index 2684c89166ba82b80bd4de15d7e6dc222f074f81..2c7adc12660145f568034991f5de505ee2e2c11e 100644 |
| --- a/content/renderer/pepper/video_encoder_shim.cc |
| +++ b/content/renderer/pepper/video_encoder_shim.cc |
| @@ -74,7 +74,7 @@ void GetVpxCodecParameters(media::VideoCodecProfile codec, |
| *max_quantizer = kVp8DefaultMaxQuantizer; |
| *cpu_used = kVp8DefaultCpuUsed; |
| break; |
| - case media::VP9PROFILE_ANY: |
| + case media::VP9PROFILE_PROFILE0: |
|
ddorwin
2016/03/31 21:09:50
I wonder if we should have a comment here about wh
servolk
2016/03/31 21:26:38
Probably not worth adding the profiles 1-3 here ex
|
| *vpx_codec = vpx_codec_vp9_cx(); |
| *min_quantizer = kVp9DefaultMinQuantizer; |
| *max_quantizer = kVp9DefaultMaxQuantizer; |
| @@ -196,7 +196,7 @@ void VideoEncoderShim::EncoderImpl::Initialize( |
| // Use Q/CQ mode if no target bitrate is given. Note that in the VP8/CQ case |
| // the meaning of rc_target_bitrate changes to target maximum rate. |
| if (initial_bitrate == 0) { |
| - if (output_profile == media::VP9PROFILE_ANY) { |
| + if (output_profile == media::VP9PROFILE_PROFILE0) { |
| config_.rc_end_usage = VPX_Q; |
| } else if (output_profile == media::VP8PROFILE_ANY) { |
| config_.rc_end_usage = VPX_CQ; |
|
ddorwin
2016/03/31 21:09:50
DCHECK(not the other three profiles)?
Similar bel
servolk
2016/03/31 21:26:38
I've added some DCHECKs at the top of this method.
|
| @@ -223,7 +223,7 @@ void VideoEncoderShim::EncoderImpl::Initialize( |
| return; |
| } |
| - if (output_profile == media::VP9PROFILE_ANY) { |
| + if (output_profile == media::VP9PROFILE_PROFILE0) { |
| if (vpx_codec_control(&encoder_, VP9E_SET_AQ_MODE, |
| kVp9AqModeCyclicRefresh) != VPX_CODEC_OK) { |
| NotifyError(media::VideoEncodeAccelerator::kPlatformFailureError); |
| @@ -389,10 +389,10 @@ VideoEncoderShim::GetSupportedProfiles() { |
| ret = vpx_codec_enc_config_default(vpx_codec_vp9_cx(), &config, 0); |
| if (ret == VPX_CODEC_OK) { |
| media::VideoEncodeAccelerator::SupportedProfile profile; |
| - profile.profile = media::VP9PROFILE_ANY; |
| profile.max_resolution = gfx::Size(kMaxWidth, kMaxHeight); |
| profile.max_framerate_numerator = config.g_timebase.den; |
| profile.max_framerate_denominator = config.g_timebase.num; |
| + profile.profile = media::VP9PROFILE_PROFILE0; |
| profiles.push_back(profile); |
| } |
| @@ -412,7 +412,7 @@ bool VideoEncoderShim::Initialize( |
| return false; |
| if (output_profile != media::VP8PROFILE_ANY && |
| - output_profile != media::VP9PROFILE_ANY) |
| + output_profile != media::VP9PROFILE_PROFILE0) |
| return false; |
| media_task_runner_->PostTask( |