| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 * | 9 * |
| 10 */ | 10 */ |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 | 420 |
| 421 if (vpx_codec_enc_init(encoder_, vpx_codec_vp9_cx(), config_, 0)) { | 421 if (vpx_codec_enc_init(encoder_, vpx_codec_vp9_cx(), config_, 0)) { |
| 422 return WEBRTC_VIDEO_CODEC_UNINITIALIZED; | 422 return WEBRTC_VIDEO_CODEC_UNINITIALIZED; |
| 423 } | 423 } |
| 424 vpx_codec_control(encoder_, VP8E_SET_CPUUSED, cpu_speed_); | 424 vpx_codec_control(encoder_, VP8E_SET_CPUUSED, cpu_speed_); |
| 425 vpx_codec_control(encoder_, VP8E_SET_MAX_INTRA_BITRATE_PCT, | 425 vpx_codec_control(encoder_, VP8E_SET_MAX_INTRA_BITRATE_PCT, |
| 426 rc_max_intra_target_); | 426 rc_max_intra_target_); |
| 427 vpx_codec_control(encoder_, VP9E_SET_AQ_MODE, | 427 vpx_codec_control(encoder_, VP9E_SET_AQ_MODE, |
| 428 inst->VP9().adaptiveQpMode ? 3 : 0); | 428 inst->VP9().adaptiveQpMode ? 3 : 0); |
| 429 | 429 |
| 430 vpx_codec_control(encoder_, VP9E_SET_FRAME_PARALLEL_DECODING, 0); |
| 430 vpx_codec_control( | 431 vpx_codec_control( |
| 431 encoder_, VP9E_SET_SVC, | 432 encoder_, VP9E_SET_SVC, |
| 432 (num_temporal_layers_ > 1 || num_spatial_layers_ > 1) ? 1 : 0); | 433 (num_temporal_layers_ > 1 || num_spatial_layers_ > 1) ? 1 : 0); |
| 433 if (num_temporal_layers_ > 1 || num_spatial_layers_ > 1) { | 434 if (num_temporal_layers_ > 1 || num_spatial_layers_ > 1) { |
| 434 vpx_codec_control(encoder_, VP9E_SET_SVC_PARAMETERS, | 435 vpx_codec_control(encoder_, VP9E_SET_SVC_PARAMETERS, |
| 435 &svc_params_); | 436 &svc_params_); |
| 436 } | 437 } |
| 437 // Register callback for getting each spatial layer. | 438 // Register callback for getting each spatial layer. |
| 438 vpx_codec_priv_output_cx_pkt_cb_pair_t cbp = { | 439 vpx_codec_priv_output_cx_pkt_cb_pair_t cbp = { |
| 439 VP9EncoderImpl::EncoderOutputCodedPacketCallback, | 440 VP9EncoderImpl::EncoderOutputCodedPacketCallback, |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 frame_buffer_pool_.ClearPool(); | 1009 frame_buffer_pool_.ClearPool(); |
| 1009 inited_ = false; | 1010 inited_ = false; |
| 1010 return WEBRTC_VIDEO_CODEC_OK; | 1011 return WEBRTC_VIDEO_CODEC_OK; |
| 1011 } | 1012 } |
| 1012 | 1013 |
| 1013 const char* VP9DecoderImpl::ImplementationName() const { | 1014 const char* VP9DecoderImpl::ImplementationName() const { |
| 1014 return "libvpx"; | 1015 return "libvpx"; |
| 1015 } | 1016 } |
| 1016 | 1017 |
| 1017 } // namespace webrtc | 1018 } // namespace webrtc |
| OLD | NEW |