| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 #include "webrtc/video/video_quality_test.h" | 10 #include "webrtc/video/video_quality_test.h" |
| (...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 stream.min_bitrate_bps = params.video.min_bitrate_bps; | 1290 stream.min_bitrate_bps = params.video.min_bitrate_bps; |
| 1291 stream.target_bitrate_bps = params.video.target_bitrate_bps; | 1291 stream.target_bitrate_bps = params.video.target_bitrate_bps; |
| 1292 stream.max_bitrate_bps = params.video.max_bitrate_bps; | 1292 stream.max_bitrate_bps = params.video.max_bitrate_bps; |
| 1293 stream.max_qp = kDefaultMaxQp; | 1293 stream.max_qp = kDefaultMaxQp; |
| 1294 // TODO(sprang): Can we make this less of a hack? | 1294 // TODO(sprang): Can we make this less of a hack? |
| 1295 if (params.video.num_temporal_layers == 2) { | 1295 if (params.video.num_temporal_layers == 2) { |
| 1296 stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps); | 1296 stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps); |
| 1297 } else if (params.video.num_temporal_layers == 3) { | 1297 } else if (params.video.num_temporal_layers == 3) { |
| 1298 stream.temporal_layer_thresholds_bps.push_back(stream.max_bitrate_bps / 4); | 1298 stream.temporal_layer_thresholds_bps.push_back(stream.max_bitrate_bps / 4); |
| 1299 stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps); | 1299 stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps); |
| 1300 } else { |
| 1301 RTC_CHECK_LE(params.video.num_temporal_layers, kMaxTemporalStreams); |
| 1302 for (int i = 0; i < params.video.num_temporal_layers - 1; ++i) { |
| 1303 stream.temporal_layer_thresholds_bps.push_back(static_cast<int>( |
| 1304 stream.max_bitrate_bps * kVp8LayerRateAlloction[0][i] + 0.5)); |
| 1305 } |
| 1300 } | 1306 } |
| 1301 return stream; | 1307 return stream; |
| 1302 } | 1308 } |
| 1303 | 1309 |
| 1304 // Static. | 1310 // Static. |
| 1305 VideoStream VideoQualityTest::DefaultThumbnailStream() { | 1311 VideoStream VideoQualityTest::DefaultThumbnailStream() { |
| 1306 VideoStream stream; | 1312 VideoStream stream; |
| 1307 stream.width = 320; | 1313 stream.width = 320; |
| 1308 stream.height = 180; | 1314 stream.height = 180; |
| 1309 stream.max_framerate = 7; | 1315 stream.max_framerate = 7; |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2156 if (!params_.logging.encoded_frame_base_path.empty()) { | 2162 if (!params_.logging.encoded_frame_base_path.empty()) { |
| 2157 std::ostringstream str; | 2163 std::ostringstream str; |
| 2158 str << receive_logs_++; | 2164 str << receive_logs_++; |
| 2159 std::string path = | 2165 std::string path = |
| 2160 params_.logging.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 2166 params_.logging.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
| 2161 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 2167 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
| 2162 100000000); | 2168 100000000); |
| 2163 } | 2169 } |
| 2164 } | 2170 } |
| 2165 } // namespace webrtc | 2171 } // namespace webrtc |
| OLD | NEW |