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 namespace { | 16 namespace { |
16 // Codec settings. | 17 // Codec settings. |
17 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; | 18 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; |
18 const int kFps[] = {30}; | 19 const int kFps[] = {30}; |
19 const bool kErrorConcealmentOn = false; | 20 const bool kErrorConcealmentOn = false; |
20 const bool kDenoisingOn = false; | 21 const bool kDenoisingOn = false; |
21 const bool kFrameDropperOn = true; | 22 const bool kFrameDropperOn = true; |
22 const bool kSpatialResizeOn = false; | 23 const bool kSpatialResizeOn = false; |
23 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; | 24 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; |
24 const bool kHwCodec = false; | 25 const bool kHwCodec = false; |
25 const bool kUseSingleCore = true; | 26 const bool kUseSingleCore = true; |
26 | 27 |
27 // Packet loss probability [0.0, 1.0]. | 28 // Packet loss probability [0.0, 1.0]. |
28 const float kPacketLoss = 0.0f; | 29 const float kPacketLoss = 0.0f; |
29 | 30 |
| 31 const VisualizationParams kVisualizationParams = { |
| 32 false, // save_source_y4m |
| 33 false, // save_encoded_ivf |
| 34 false, // save_decoded_y4m |
| 35 }; |
| 36 |
30 const bool kVerboseLogging = true; | 37 const bool kVerboseLogging = true; |
31 } // namespace | 38 } // namespace |
32 | 39 |
33 // Tests for plotting statistics from logs. | 40 // Tests for plotting statistics from logs. |
34 class PlotVideoProcessorIntegrationTest | 41 class PlotVideoProcessorIntegrationTest |
35 : public VideoProcessorIntegrationTest, | 42 : public VideoProcessorIntegrationTest, |
36 public ::testing::WithParamInterface< | 43 public ::testing::WithParamInterface< |
37 ::testing::tuple<int, int, VideoCodecType>> { | 44 ::testing::tuple<int, int, VideoCodecType>> { |
38 protected: | 45 protected: |
39 PlotVideoProcessorIntegrationTest() | 46 PlotVideoProcessorIntegrationTest() |
(...skipping 28 matching lines...) Expand all Loading... |
68 SetRateControlMetrics(rc_metrics, | 75 SetRateControlMetrics(rc_metrics, |
69 0, // update_index | 76 0, // update_index |
70 300, // max_num_dropped_frames, | 77 300, // max_num_dropped_frames, |
71 400, // max_key_frame_size_mismatch | 78 400, // max_key_frame_size_mismatch |
72 200, // max_delta_frame_size_mismatch | 79 200, // max_delta_frame_size_mismatch |
73 100, // max_encoding_rate_mismatch | 80 100, // max_encoding_rate_mismatch |
74 300, // max_time_hit_target | 81 300, // max_time_hit_target |
75 0, // num_spatial_resizes | 82 0, // num_spatial_resizes |
76 1); // num_key_frames | 83 1); // num_key_frames |
77 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 84 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
78 rc_metrics); | 85 rc_metrics, &kVisualizationParams); |
79 } | 86 } |
80 const int bitrate_; | 87 const int bitrate_; |
81 const int framerate_; | 88 const int framerate_; |
82 const VideoCodecType codec_type_; | 89 const VideoCodecType codec_type_; |
83 }; | 90 }; |
84 | 91 |
85 INSTANTIATE_TEST_CASE_P( | 92 INSTANTIATE_TEST_CASE_P( |
86 CodecSettings, | 93 CodecSettings, |
87 PlotVideoProcessorIntegrationTest, | 94 PlotVideoProcessorIntegrationTest, |
88 ::testing::Combine(::testing::ValuesIn(kBitrates), | 95 ::testing::Combine(::testing::ValuesIn(kBitrates), |
(...skipping 15 matching lines...) Expand all Loading... |
104 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { | 111 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { |
105 RunTest(320, 240, "foreman_320x240"); | 112 RunTest(320, 240, "foreman_320x240"); |
106 } | 113 } |
107 | 114 |
108 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { | 115 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { |
109 RunTest(352, 288, "foreman_cif"); | 116 RunTest(352, 288, "foreman_cif"); |
110 } | 117 } |
111 | 118 |
112 } // namespace test | 119 } // namespace test |
113 } // namespace webrtc | 120 } // namespace webrtc |
OLD | NEW |