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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 1383533002: Update VP8 settings to avoid spending bitrate on static areas. PERF NOTE (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 #endif 657 #endif
658 vpx_codec_control(&encoders_[0], VP8E_SET_NOISE_SENSITIVITY, 658 vpx_codec_control(&encoders_[0], VP8E_SET_NOISE_SENSITIVITY,
659 codec_.codecSpecific.VP8.denoisingOn ? 659 codec_.codecSpecific.VP8.denoisingOn ?
660 denoiser_state : kDenoiserOff); 660 denoiser_state : kDenoiserOff);
661 if (encoders_.size() > 2) { 661 if (encoders_.size() > 2) {
662 vpx_codec_control(&encoders_[1], VP8E_SET_NOISE_SENSITIVITY, 662 vpx_codec_control(&encoders_[1], VP8E_SET_NOISE_SENSITIVITY,
663 codec_.codecSpecific.VP8.denoisingOn ? 663 codec_.codecSpecific.VP8.denoisingOn ?
664 denoiser_state : kDenoiserOff); 664 denoiser_state : kDenoiserOff);
665 } 665 }
666 for (size_t i = 0; i < encoders_.size(); ++i) { 666 for (size_t i = 0; i < encoders_.size(); ++i) {
667 vpx_codec_control(&(encoders_[i]), VP8E_SET_STATIC_THRESHOLD, 1); 667 vpx_codec_control(&(encoders_[i]), VP8E_SET_STATIC_THRESHOLD, 300);
marpan 2015/09/30 15:45:30 condition this change only for screen_content_mode
sprang_webrtc 2015/10/01 11:17:03 Done.
668 vpx_codec_control(&(encoders_[i]), VP8E_SET_CPUUSED, cpu_speed_[i]); 668 vpx_codec_control(&(encoders_[i]), VP8E_SET_CPUUSED, cpu_speed_[i]);
669 vpx_codec_control(&(encoders_[i]), VP8E_SET_TOKEN_PARTITIONS, 669 vpx_codec_control(&(encoders_[i]), VP8E_SET_TOKEN_PARTITIONS,
670 static_cast<vp8e_token_partitions>(token_partitions_)); 670 static_cast<vp8e_token_partitions>(token_partitions_));
671 vpx_codec_control(&(encoders_[i]), VP8E_SET_MAX_INTRA_BITRATE_PCT, 671 vpx_codec_control(&(encoders_[i]), VP8E_SET_MAX_INTRA_BITRATE_PCT,
672 rc_max_intra_target_); 672 rc_max_intra_target_);
673 // VP8E_SET_SCREEN_CONTENT_MODE 2 = screen content with more aggressive 673 // VP8E_SET_SCREEN_CONTENT_MODE 2 = screen content with more aggressive
674 // rate control (drop frames on large target bitrate overshoot) 674 // rate control (drop frames on large target bitrate overshoot)
675 vpx_codec_control(&(encoders_[i]), VP8E_SET_SCREEN_CONTENT_MODE, 675 vpx_codec_control(&(encoders_[i]), VP8E_SET_SCREEN_CONTENT_MODE,
676 codec_.mode == kScreensharing ? 2 : 0); 676 codec_.mode == kScreensharing ? 2 : 0);
677 } 677 }
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 return -1; 1396 return -1;
1397 } 1397 }
1398 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) 1398 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_)
1399 != VPX_CODEC_OK) { 1399 != VPX_CODEC_OK) {
1400 return -1; 1400 return -1;
1401 } 1401 }
1402 return 0; 1402 return 0;
1403 } 1403 }
1404 1404
1405 } // namespace webrtc 1405 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698