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