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