Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc

Issue 2789283002: vp9: Enable vp9 denoiser by default in standalone webrtc. (Closed)
Patch Set: address comments. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/video_coding/codec_database.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codec_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698