 Chromium Code Reviews
 Chromium Code Reviews Issue 2067103002:
  Avoid unnecessary HW video encoder reconfiguration  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@master
    
  
    Issue 2067103002:
  Avoid unnecessary HW video encoder reconfiguration  (Closed) 
  Base URL: https://chromium.googlesource.com/external/webrtc.git@master| OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 320 video_codec.width = std::max(video_codec.width, | 320 video_codec.width = std::max(video_codec.width, | 
| 321 static_cast<uint16_t>(streams[i].width)); | 321 static_cast<uint16_t>(streams[i].width)); | 
| 322 video_codec.height = std::max( | 322 video_codec.height = std::max( | 
| 323 video_codec.height, static_cast<uint16_t>(streams[i].height)); | 323 video_codec.height, static_cast<uint16_t>(streams[i].height)); | 
| 324 video_codec.minBitrate = | 324 video_codec.minBitrate = | 
| 325 std::min(static_cast<uint16_t>(video_codec.minBitrate), | 325 std::min(static_cast<uint16_t>(video_codec.minBitrate), | 
| 326 static_cast<uint16_t>(streams[i].min_bitrate_bps / 1000)); | 326 static_cast<uint16_t>(streams[i].min_bitrate_bps / 1000)); | 
| 327 video_codec.maxBitrate += streams[i].max_bitrate_bps / 1000; | 327 video_codec.maxBitrate += streams[i].max_bitrate_bps / 1000; | 
| 328 video_codec.qpMax = std::max(video_codec.qpMax, | 328 video_codec.qpMax = std::max(video_codec.qpMax, | 
| 329 static_cast<unsigned int>(streams[i].max_qp)); | 329 static_cast<unsigned int>(streams[i].max_qp)); | 
| 330 video_codec.encodeFromTexture |= streams[i].encode_from_texture; | |
| 
perkj_webrtc
2016/06/15 11:31:29
hum- streams[i].encode_from_texture ? Should not b
 
skvlad
2016/06/15 19:44:34
Moved to VideoEncoderConfig as you suggested.
 | |
| 330 } | 331 } | 
| 331 | 332 | 
| 332 if (video_codec.maxBitrate == 0) { | 333 if (video_codec.maxBitrate == 0) { | 
| 333 // Unset max bitrate -> cap to one bit per pixel. | 334 // Unset max bitrate -> cap to one bit per pixel. | 
| 334 video_codec.maxBitrate = | 335 video_codec.maxBitrate = | 
| 335 (video_codec.width * video_codec.height * video_codec.maxFramerate) / | 336 (video_codec.width * video_codec.height * video_codec.maxFramerate) / | 
| 336 1000; | 337 1000; | 
| 337 } | 338 } | 
| 338 if (video_codec.maxBitrate < kEncoderMinBitrateKbps) | 339 if (video_codec.maxBitrate < kEncoderMinBitrateKbps) | 
| 339 video_codec.maxBitrate = kEncoderMinBitrateKbps; | 340 video_codec.maxBitrate = kEncoderMinBitrateKbps; | 
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 821 &module_nack_rate); | 822 &module_nack_rate); | 
| 822 *sent_video_rate_bps += module_video_rate; | 823 *sent_video_rate_bps += module_video_rate; | 
| 823 *sent_nack_rate_bps += module_nack_rate; | 824 *sent_nack_rate_bps += module_nack_rate; | 
| 824 *sent_fec_rate_bps += module_fec_rate; | 825 *sent_fec_rate_bps += module_fec_rate; | 
| 825 } | 826 } | 
| 826 return 0; | 827 return 0; | 
| 827 } | 828 } | 
| 828 | 829 | 
| 829 } // namespace internal | 830 } // namespace internal | 
| 830 } // namespace webrtc | 831 } // namespace webrtc | 
| OLD | NEW |