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