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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 VP9EncoderImpl::EncoderOutputCodedPacketCallback, | 442 VP9EncoderImpl::EncoderOutputCodedPacketCallback, |
443 reinterpret_cast<void*>(this)}; | 443 reinterpret_cast<void*>(this)}; |
444 vpx_codec_control(encoder_, VP9E_REGISTER_CX_CALLBACK, | 444 vpx_codec_control(encoder_, VP9E_REGISTER_CX_CALLBACK, |
445 reinterpret_cast<void*>(&cbp)); | 445 reinterpret_cast<void*>(&cbp)); |
446 | 446 |
447 // Control function to set the number of column tiles in encoding a frame, in | 447 // Control function to set the number of column tiles in encoding a frame, in |
448 // log2 unit: e.g., 0 = 1 tile column, 1 = 2 tile columns, 2 = 4 tile columns. | 448 // log2 unit: e.g., 0 = 1 tile column, 1 = 2 tile columns, 2 = 4 tile columns. |
449 // The number tile columns will be capped by the encoder based on image size | 449 // The number tile columns will be capped by the encoder based on image size |
450 // (minimum width of tile column is 256 pixels, maximum is 4096). | 450 // (minimum width of tile column is 256 pixels, maximum is 4096). |
451 vpx_codec_control(encoder_, VP9E_SET_TILE_COLUMNS, (config_->g_threads >> 1)); | 451 vpx_codec_control(encoder_, VP9E_SET_TILE_COLUMNS, (config_->g_threads >> 1)); |
| 452 |
| 453 // Turn on row-based multithreading. |
| 454 vpx_codec_control(encoder_, VP9E_SET_ROW_MT, 1); |
452 #if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \ | 455 #if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \ |
453 !defined(ANDROID) | 456 !defined(ANDROID) |
454 // Note denoiser is still off by default until further testing/optimization, | 457 // Note denoiser is still off by default until further testing/optimization, |
455 // i.e., VP9().denoisingOn == 0. | 458 // i.e., VP9().denoisingOn == 0. |
456 vpx_codec_control(encoder_, VP9E_SET_NOISE_SENSITIVITY, | 459 vpx_codec_control(encoder_, VP9E_SET_NOISE_SENSITIVITY, |
457 inst->VP9().denoisingOn ? 1 : 0); | 460 inst->VP9().denoisingOn ? 1 : 0); |
458 #endif | 461 #endif |
459 if (codec_.mode == kScreensharing) { | 462 if (codec_.mode == kScreensharing) { |
460 // Adjust internal parameters to screen content. | 463 // Adjust internal parameters to screen content. |
461 vpx_codec_control(encoder_, VP9E_SET_TUNE_CONTENT, 1); | 464 vpx_codec_control(encoder_, VP9E_SET_TUNE_CONTENT, 1); |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 frame_buffer_pool_.ClearPool(); | 1005 frame_buffer_pool_.ClearPool(); |
1003 inited_ = false; | 1006 inited_ = false; |
1004 return WEBRTC_VIDEO_CODEC_OK; | 1007 return WEBRTC_VIDEO_CODEC_OK; |
1005 } | 1008 } |
1006 | 1009 |
1007 const char* VP9DecoderImpl::ImplementationName() const { | 1010 const char* VP9DecoderImpl::ImplementationName() const { |
1008 return "libvpx"; | 1011 return "libvpx"; |
1009 } | 1012 } |
1010 | 1013 |
1011 } // namespace webrtc | 1014 } // namespace webrtc |
OLD | NEW |