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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 | 452 |
453 // Turn on row-based multithreading. | 453 // Turn on row-based multithreading. |
454 vpx_codec_control(encoder_, VP9E_SET_ROW_MT, 1); | 454 vpx_codec_control(encoder_, VP9E_SET_ROW_MT, 1); |
455 | |
455 #if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \ | 456 #if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \ |
456 !defined(ANDROID) | 457 !defined(ANDROID) |
457 // Note denoiser is still off by default until further testing/optimization, | 458 // Turn off the denoiser on ARM since optimization is pending. |
brandtr
2017/05/29 07:14:35
Nit: "Do not enable the denoiser..."
(Since you a
jianj
2017/06/05 17:26:05
Done.
| |
458 // i.e., VP9().denoisingOn == 0. | 459 // Denoiser is on by default on other platforms. |
459 vpx_codec_control(encoder_, VP9E_SET_NOISE_SENSITIVITY, | 460 vpx_codec_control(encoder_, VP9E_SET_NOISE_SENSITIVITY, |
460 inst->VP9().denoisingOn ? 1 : 0); | 461 inst->VP9().denoisingOn ? 1 : 0); |
461 #endif | 462 #endif |
463 | |
462 if (codec_.mode == kScreensharing) { | 464 if (codec_.mode == kScreensharing) { |
463 // Adjust internal parameters to screen content. | 465 // Adjust internal parameters to screen content. |
464 vpx_codec_control(encoder_, VP9E_SET_TUNE_CONTENT, 1); | 466 vpx_codec_control(encoder_, VP9E_SET_TUNE_CONTENT, 1); |
465 } | 467 } |
466 // Enable encoder skip of static/low content blocks. | 468 // Enable encoder skip of static/low content blocks. |
467 vpx_codec_control(encoder_, VP8E_SET_STATIC_THRESHOLD, 1); | 469 vpx_codec_control(encoder_, VP8E_SET_STATIC_THRESHOLD, 1); |
468 inited_ = true; | 470 inited_ = true; |
469 return WEBRTC_VIDEO_CODEC_OK; | 471 return WEBRTC_VIDEO_CODEC_OK; |
470 } | 472 } |
471 | 473 |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1005 frame_buffer_pool_.ClearPool(); | 1007 frame_buffer_pool_.ClearPool(); |
1006 inited_ = false; | 1008 inited_ = false; |
1007 return WEBRTC_VIDEO_CODEC_OK; | 1009 return WEBRTC_VIDEO_CODEC_OK; |
1008 } | 1010 } |
1009 | 1011 |
1010 const char* VP9DecoderImpl::ImplementationName() const { | 1012 const char* VP9DecoderImpl::ImplementationName() const { |
1011 return "libvpx"; | 1013 return "libvpx"; |
1012 } | 1014 } |
1013 | 1015 |
1014 } // namespace webrtc | 1016 } // namespace webrtc |
OLD | NEW |