Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 |
| 11 #include "webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest .h" | 11 #include "webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest .h" |
| 12 | 12 |
| 13 namespace webrtc { | 13 namespace webrtc { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 // Codec settings. | 17 // Codec settings. |
| 18 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; | 18 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; |
| 19 const int kFps[] = {30}; | 19 const int kFps[] = {30}; |
| 20 const bool kErrorConcealmentOn = false; | 20 const bool kErrorConcealmentOn = false; |
| 21 const bool kDenoisingOn = false; | 21 const bool kDenoisingOn = false; |
| 22 const bool kFrameDropperOn = true; | 22 const bool kFrameDropperOn = true; |
| 23 const bool kSpatialResizeOn = false; | 23 const bool kSpatialResizeOn = false; |
| 24 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; | 24 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; |
| 25 const bool kHwCodec = false; | 25 const bool kHwCodec = false; |
| 26 const bool kUseSingleCore = true; | 26 const bool kUseSingleCore = true; |
| 27 | 27 |
| 28 // Test settings. | 28 // Test settings. |
| 29 const bool kCorrectnessMode = false; | |
| 29 const bool kBatchMode = true; | 30 const bool kBatchMode = true; |
| 30 | 31 |
| 31 // Packet loss probability [0.0, 1.0]. | 32 // Packet loss probability [0.0, 1.0]. |
| 32 const float kPacketLoss = 0.0f; | 33 const float kPacketLoss = 0.0f; |
| 33 | 34 |
| 34 const VisualizationParams kVisualizationParams = { | 35 const VisualizationParams kVisualizationParams = { |
| 35 false, // save_source_y4m | 36 false, // save_source_y4m |
| 36 false, // save_encoded_ivf | 37 false, // save_encoded_ivf |
| 37 false, // save_decoded_y4m | 38 false, // save_decoded_y4m |
| 38 }; | 39 }; |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 62 0); // frame_index_rate_update | 63 0); // frame_index_rate_update |
| 63 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; | 64 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; |
| 64 rate_profile.num_frames = kNumFramesLong; | 65 rate_profile.num_frames = kNumFramesLong; |
| 65 // Codec/network settings. | 66 // Codec/network settings. |
| 66 CodecParams process_settings; | 67 CodecParams process_settings; |
| 67 SetCodecParams( | 68 SetCodecParams( |
| 68 &process_settings, codec_type_, kHwCodec, kUseSingleCore, kPacketLoss, | 69 &process_settings, codec_type_, kHwCodec, kUseSingleCore, kPacketLoss, |
| 69 -1, // key_frame_interval | 70 -1, // key_frame_interval |
| 70 1, // num_temporal_layers | 71 1, // num_temporal_layers |
| 71 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, kSpatialResizeOn, | 72 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, kSpatialResizeOn, |
| 72 width, height, filename, kVerboseLogging, kBatchMode); | 73 width, height, filename, kVerboseLogging, kCorrectnessMode, kBatchMode); |
| 73 // Thresholds for expected quality (PSNR avg, PSNR min, SSIM avg, SSIM min). | 74 // Thresholds for expected quality (PSNR avg, PSNR min, SSIM avg, SSIM min). |
| 74 QualityThresholds quality_thresholds; | 75 QualityThresholds quality_thresholds; |
| 75 SetQualityThresholds(&quality_thresholds, 15.0, 10.0, 0.2, 0.1); | 76 SetQualityThresholds(&quality_thresholds, 15.0, 10.0, 0.2, 0.1); |
|
åsapersson
2017/03/09 11:48:57
Maybe the thresholds could be configured to some v
brandtr
2017/03/09 12:07:02
Yes, I considered that. But I would still have to
åsapersson
2017/03/09 12:46:47
Sounds good to me.
| |
| 76 // Thresholds for rate control. | 77 // Thresholds for rate control. |
| 77 RateControlThresholds rc_thresholds[1]; | 78 RateControlThresholds rc_thresholds[1]; |
| 78 SetRateControlThresholds(rc_thresholds, | 79 SetRateControlThresholds(rc_thresholds, |
| 79 0, // update_index | 80 0, // update_index |
| 80 300, // max_num_dropped_frames, | 81 300, // max_num_dropped_frames, |
| 81 400, // max_key_frame_size_mismatch | 82 400, // max_key_frame_size_mismatch |
| 82 200, // max_delta_frame_size_mismatch | 83 200, // max_delta_frame_size_mismatch |
| 83 100, // max_encoding_rate_mismatch | 84 100, // max_encoding_rate_mismatch |
| 84 300, // max_time_hit_target | 85 300, // max_time_hit_target |
| 85 0, // num_spatial_resizes | 86 0, // num_spatial_resizes |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 114 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { | 115 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { |
| 115 RunTest(320, 240, "foreman_320x240"); | 116 RunTest(320, 240, "foreman_320x240"); |
| 116 } | 117 } |
| 117 | 118 |
| 118 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { | 119 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { |
| 119 RunTest(352, 288, "foreman_cif"); | 120 RunTest(352, 288, "foreman_cif"); |
| 120 } | 121 } |
| 121 | 122 |
| 122 } // namespace test | 123 } // namespace test |
| 123 } // namespace webrtc | 124 } // namespace webrtc |
| OLD | NEW |