OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 <stdio.h> | 10 #include <stdio.h> |
11 | 11 |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "webrtc/video/video_quality_test.h" | 13 #include "webrtc/video/video_quality_test.h" |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 | 16 |
17 static const int kFullStackTestDurationSecs = 60; | 17 static const int kFullStackTestDurationSecs = 60; |
18 | 18 |
19 class FullStackTest : public VideoQualityTest { | 19 class FullStackTest : public VideoQualityTest { |
20 public: | 20 public: |
21 void RunTest(const VideoQualityTest::Params ¶ms) { | 21 void RunTest(const VideoQualityTest::Params ¶ms) { |
22 RunWithAnalyzer(params); | 22 RunWithAnalyzer(params); |
23 } | 23 } |
24 | 24 |
25 void ForemanCifWithoutPacketLoss(const std::string& video_codec) { | 25 void ForemanCifWithoutPacketLoss(const std::string& video_codec) { |
26 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. | 26 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. |
27 VideoQualityTest::Params foreman_cif = { | 27 VideoQualityTest::Params foreman_cif = { |
28 {352, 288, 30, 700000, 700000, 700000, video_codec, 1}, | 28 {352, 288, 30, 700000, 700000, 700000, false, video_codec, 1}, |
29 {"foreman_cif"}, | 29 {"foreman_cif"}, |
30 {}, | 30 {}, |
31 {"foreman_cif_net_delay_0_0_plr_0_" + video_codec, 0.0, 0.0, | 31 {"foreman_cif_net_delay_0_0_plr_0_" + video_codec, 0.0, 0.0, |
32 kFullStackTestDurationSecs}}; | 32 kFullStackTestDurationSecs}}; |
33 RunTest(foreman_cif); | 33 RunTest(foreman_cif); |
34 } | 34 } |
35 | 35 |
36 void ForemanCifPlr5(const std::string& video_codec) { | 36 void ForemanCifPlr5(const std::string& video_codec) { |
37 VideoQualityTest::Params foreman_cif = { | 37 VideoQualityTest::Params foreman_cif = { |
38 {352, 288, 30, 30000, 500000, 2000000, video_codec, 1}, | 38 {352, 288, 30, 30000, 500000, 2000000, false, video_codec, 1}, |
39 {"foreman_cif"}, | 39 {"foreman_cif"}, |
40 {}, | 40 {}, |
41 {"foreman_cif_delay_50_0_plr_5_" + video_codec, 0.0, 0.0, | 41 {"foreman_cif_delay_50_0_plr_5_" + video_codec, 0.0, 0.0, |
42 kFullStackTestDurationSecs}}; | 42 kFullStackTestDurationSecs}}; |
43 foreman_cif.pipe.loss_percent = 5; | 43 foreman_cif.pipe.loss_percent = 5; |
44 foreman_cif.pipe.queue_delay_ms = 50; | 44 foreman_cif.pipe.queue_delay_ms = 50; |
45 RunTest(foreman_cif); | 45 RunTest(foreman_cif); |
46 } | 46 } |
47 }; | 47 }; |
48 | 48 |
(...skipping 12 matching lines...) Expand all Loading... |
61 ForemanCifWithoutPacketLoss("VP9"); | 61 ForemanCifWithoutPacketLoss("VP9"); |
62 } | 62 } |
63 | 63 |
64 TEST_F(FullStackTest, ForemanCifPlr5Vp9) { | 64 TEST_F(FullStackTest, ForemanCifPlr5Vp9) { |
65 ForemanCifPlr5("VP9"); | 65 ForemanCifPlr5("VP9"); |
66 } | 66 } |
67 #endif // !defined(RTC_DISABLE_VP9) | 67 #endif // !defined(RTC_DISABLE_VP9) |
68 | 68 |
69 TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) { | 69 TEST_F(FullStackTest, ParisQcifWithoutPacketLoss) { |
70 VideoQualityTest::Params paris_qcif = { | 70 VideoQualityTest::Params paris_qcif = { |
71 {176, 144, 30, 300000, 300000, 300000, "VP8", 1}, | 71 {176, 144, 30, 300000, 300000, 300000, false, "VP8", 1}, |
72 {"paris_qcif"}, | 72 {"paris_qcif"}, |
73 {}, | 73 {}, |
74 {"net_delay_0_0_plr_0", 36.0, 0.96, kFullStackTestDurationSecs}}; | 74 {"net_delay_0_0_plr_0", 36.0, 0.96, kFullStackTestDurationSecs}}; |
75 RunTest(paris_qcif); | 75 RunTest(paris_qcif); |
76 } | 76 } |
77 | 77 |
78 TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) { | 78 TEST_F(FullStackTest, ForemanCifWithoutPacketLoss) { |
79 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. | 79 // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. |
80 VideoQualityTest::Params foreman_cif = { | 80 VideoQualityTest::Params foreman_cif = { |
81 {352, 288, 30, 700000, 700000, 700000, "VP8", 1}, | 81 {352, 288, 30, 700000, 700000, 700000, false, "VP8", 1}, |
82 {"foreman_cif"}, | 82 {"foreman_cif"}, |
83 {}, | 83 {}, |
84 {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0, kFullStackTestDurationSecs} | 84 {"foreman_cif_net_delay_0_0_plr_0", 0.0, 0.0, kFullStackTestDurationSecs} |
85 }; | 85 }; |
86 RunTest(foreman_cif); | 86 RunTest(foreman_cif); |
87 } | 87 } |
88 | 88 |
89 TEST_F(FullStackTest, ForemanCifPlr5) { | 89 TEST_F(FullStackTest, ForemanCifPlr5) { |
90 VideoQualityTest::Params foreman_cif = { | 90 VideoQualityTest::Params foreman_cif = { |
91 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 91 {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1}, |
92 {"foreman_cif"}, | 92 {"foreman_cif"}, |
93 {}, | 93 {}, |
94 {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0, kFullStackTestDurationSecs}}; | 94 {"foreman_cif_delay_50_0_plr_5", 0.0, 0.0, kFullStackTestDurationSecs}}; |
95 foreman_cif.pipe.loss_percent = 5; | 95 foreman_cif.pipe.loss_percent = 5; |
96 foreman_cif.pipe.queue_delay_ms = 50; | 96 foreman_cif.pipe.queue_delay_ms = 50; |
97 RunTest(foreman_cif); | 97 RunTest(foreman_cif); |
98 } | 98 } |
99 | 99 |
100 TEST_F(FullStackTest, ForemanCif500kbps) { | 100 TEST_F(FullStackTest, ForemanCif500kbps) { |
101 VideoQualityTest::Params foreman_cif = { | 101 VideoQualityTest::Params foreman_cif = { |
102 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 102 {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1}, |
103 {"foreman_cif"}, | 103 {"foreman_cif"}, |
104 {}, | 104 {}, |
105 {"foreman_cif_500kbps", 0.0, 0.0, kFullStackTestDurationSecs}}; | 105 {"foreman_cif_500kbps", 0.0, 0.0, kFullStackTestDurationSecs}}; |
106 foreman_cif.pipe.queue_length_packets = 0; | 106 foreman_cif.pipe.queue_length_packets = 0; |
107 foreman_cif.pipe.queue_delay_ms = 0; | 107 foreman_cif.pipe.queue_delay_ms = 0; |
108 foreman_cif.pipe.link_capacity_kbps = 500; | 108 foreman_cif.pipe.link_capacity_kbps = 500; |
109 RunTest(foreman_cif); | 109 RunTest(foreman_cif); |
110 } | 110 } |
111 | 111 |
112 TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) { | 112 TEST_F(FullStackTest, ForemanCif500kbpsLimitedQueue) { |
113 VideoQualityTest::Params foreman_cif = { | 113 VideoQualityTest::Params foreman_cif = { |
114 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 114 {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1}, |
115 {"foreman_cif"}, | 115 {"foreman_cif"}, |
116 {}, | 116 {}, |
117 {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0, kFullStackTestDurationSecs} | 117 {"foreman_cif_500kbps_32pkts_queue", 0.0, 0.0, kFullStackTestDurationSecs} |
118 }; | 118 }; |
119 foreman_cif.pipe.queue_length_packets = 32; | 119 foreman_cif.pipe.queue_length_packets = 32; |
120 foreman_cif.pipe.queue_delay_ms = 0; | 120 foreman_cif.pipe.queue_delay_ms = 0; |
121 foreman_cif.pipe.link_capacity_kbps = 500; | 121 foreman_cif.pipe.link_capacity_kbps = 500; |
122 RunTest(foreman_cif); | 122 RunTest(foreman_cif); |
123 } | 123 } |
124 | 124 |
125 TEST_F(FullStackTest, ForemanCif500kbps100ms) { | 125 TEST_F(FullStackTest, ForemanCif500kbps100ms) { |
126 VideoQualityTest::Params foreman_cif = { | 126 VideoQualityTest::Params foreman_cif = { |
127 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 127 {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1}, |
128 {"foreman_cif"}, | 128 {"foreman_cif"}, |
129 {}, | 129 {}, |
130 {"foreman_cif_500kbps_100ms", 0.0, 0.0, kFullStackTestDurationSecs}}; | 130 {"foreman_cif_500kbps_100ms", 0.0, 0.0, kFullStackTestDurationSecs}}; |
131 foreman_cif.pipe.queue_length_packets = 0; | 131 foreman_cif.pipe.queue_length_packets = 0; |
132 foreman_cif.pipe.queue_delay_ms = 100; | 132 foreman_cif.pipe.queue_delay_ms = 100; |
133 foreman_cif.pipe.link_capacity_kbps = 500; | 133 foreman_cif.pipe.link_capacity_kbps = 500; |
134 RunTest(foreman_cif); | 134 RunTest(foreman_cif); |
135 } | 135 } |
136 | 136 |
137 TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) { | 137 TEST_F(FullStackTest, ForemanCif500kbps100msLimitedQueue) { |
138 VideoQualityTest::Params foreman_cif = { | 138 VideoQualityTest::Params foreman_cif = { |
139 {352, 288, 30, 30000, 500000, 2000000, "VP8", 1}, | 139 {352, 288, 30, 30000, 500000, 2000000, false, "VP8", 1}, |
140 {"foreman_cif"}, | 140 {"foreman_cif"}, |
141 {}, | 141 {}, |
142 {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0, | 142 {"foreman_cif_500kbps_100ms_32pkts_queue", 0.0, 0.0, |
143 kFullStackTestDurationSecs}}; | 143 kFullStackTestDurationSecs}}; |
144 foreman_cif.pipe.queue_length_packets = 32; | 144 foreman_cif.pipe.queue_length_packets = 32; |
145 foreman_cif.pipe.queue_delay_ms = 100; | 145 foreman_cif.pipe.queue_delay_ms = 100; |
146 foreman_cif.pipe.link_capacity_kbps = 500; | 146 foreman_cif.pipe.link_capacity_kbps = 500; |
147 RunTest(foreman_cif); | 147 RunTest(foreman_cif); |
148 } | 148 } |
149 | 149 |
150 TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) { | 150 TEST_F(FullStackTest, ForemanCif1000kbps100msLimitedQueue) { |
151 VideoQualityTest::Params foreman_cif = { | 151 VideoQualityTest::Params foreman_cif = { |
152 {352, 288, 30, 30000, 2000000, 2000000, "VP8", 1}, | 152 {352, 288, 30, 30000, 2000000, 2000000, false, "VP8", 1}, |
153 {"foreman_cif"}, | 153 {"foreman_cif"}, |
154 {}, | 154 {}, |
155 {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0, | 155 {"foreman_cif_1000kbps_100ms_32pkts_queue", 0.0, 0.0, |
156 kFullStackTestDurationSecs}}; | 156 kFullStackTestDurationSecs}}; |
157 foreman_cif.pipe.queue_length_packets = 32; | 157 foreman_cif.pipe.queue_length_packets = 32; |
158 foreman_cif.pipe.queue_delay_ms = 100; | 158 foreman_cif.pipe.queue_delay_ms = 100; |
159 foreman_cif.pipe.link_capacity_kbps = 1000; | 159 foreman_cif.pipe.link_capacity_kbps = 1000; |
160 RunTest(foreman_cif); | 160 RunTest(foreman_cif); |
161 } | 161 } |
162 | 162 |
163 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL) { | 163 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL) { |
164 VideoQualityTest::Params screenshare = { | 164 VideoQualityTest::Params screenshare = { |
165 {1850, 1110, 5, 50000, 200000, 2000000, "VP8", 2, 1, 400000}, | 165 {1850, 1110, 5, 50000, 200000, 2000000, false, "VP8", 2, 1, 400000}, |
166 {}, | 166 {}, |
167 {true, 10}, | 167 {true, 10}, |
168 {"screenshare_slides", 0.0, 0.0, kFullStackTestDurationSecs}}; | 168 {"screenshare_slides", 0.0, 0.0, kFullStackTestDurationSecs}}; |
169 RunTest(screenshare); | 169 RunTest(screenshare); |
170 } | 170 } |
171 | 171 |
172 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) { | 172 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_Scroll) { |
173 VideoQualityTest::Params config = { | 173 VideoQualityTest::Params config = { |
174 {1850, 1110 / 2, 5, 50000, 200000, 2000000, "VP8", 2, 1, 400000}, | 174 {1850, 1110 / 2, 5, 50000, 200000, 2000000, false, "VP8", 2, 1, 400000}, |
175 {}, | 175 {}, |
176 {true, 10, 2}, | 176 {true, 10, 2}, |
177 {"screenshare_slides_scrolling", 0.0, 0.0, kFullStackTestDurationSecs}}; | 177 {"screenshare_slides_scrolling", 0.0, 0.0, kFullStackTestDurationSecs}}; |
178 RunTest(config); | 178 RunTest(config); |
179 } | 179 } |
180 | 180 |
181 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) { | 181 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_LossyNet) { |
182 VideoQualityTest::Params screenshare = { | 182 VideoQualityTest::Params screenshare = { |
183 {1850, 1110, 5, 50000, 200000, 2000000, "VP8", 2, 1, 400000}, | 183 {1850, 1110, 5, 50000, 200000, 2000000, false, "VP8", 2, 1, 400000}, |
184 {}, // Video-specific. | 184 {}, // Video-specific. |
185 {true, 10}, // Screenshare-specific. | 185 {true, 10}, // Screenshare-specific. |
186 {"screenshare_slides_lossy_net", 0.0, 0.0, kFullStackTestDurationSecs}}; | 186 {"screenshare_slides_lossy_net", 0.0, 0.0, kFullStackTestDurationSecs}}; |
187 screenshare.pipe.loss_percent = 5; | 187 screenshare.pipe.loss_percent = 5; |
188 screenshare.pipe.queue_delay_ms = 200; | 188 screenshare.pipe.queue_delay_ms = 200; |
189 screenshare.pipe.link_capacity_kbps = 500; | 189 screenshare.pipe.link_capacity_kbps = 500; |
190 RunTest(screenshare); | 190 RunTest(screenshare); |
191 } | 191 } |
192 | 192 |
193 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) { | 193 TEST_F(FullStackTest, ScreenshareSlidesVP8_2TL_VeryLossyNet) { |
194 VideoQualityTest::Params screenshare = { | 194 VideoQualityTest::Params screenshare = { |
195 {1850, 1110, 5, 50000, 200000, 2000000, "VP8", 2, 1, 400000}, | 195 {1850, 1110, 5, 50000, 200000, 2000000, false, "VP8", 2, 1, 400000}, |
196 {}, // Video-specific. | 196 {}, // Video-specific. |
197 {true, 10}, // Screenshare-specific. | 197 {true, 10}, // Screenshare-specific. |
198 {"screenshare_slides_very_lossy", 0.0, 0.0, kFullStackTestDurationSecs}}; | 198 {"screenshare_slides_very_lossy", 0.0, 0.0, kFullStackTestDurationSecs}}; |
199 screenshare.pipe.loss_percent = 10; | 199 screenshare.pipe.loss_percent = 10; |
200 screenshare.pipe.queue_delay_ms = 200; | 200 screenshare.pipe.queue_delay_ms = 200; |
201 screenshare.pipe.link_capacity_kbps = 500; | 201 screenshare.pipe.link_capacity_kbps = 500; |
202 RunTest(screenshare); | 202 RunTest(screenshare); |
203 } | 203 } |
204 | 204 |
205 #if !defined(RTC_DISABLE_VP9) | 205 #if !defined(RTC_DISABLE_VP9) |
206 TEST_F(FullStackTest, ScreenshareSlidesVP9_2SL) { | 206 TEST_F(FullStackTest, ScreenshareSlidesVP9_2SL) { |
207 VideoQualityTest::Params screenshare = { | 207 VideoQualityTest::Params screenshare = { |
208 {1850, 1110, 5, 50000, 200000, 2000000, "VP9", 1, 0, 400000}, | 208 {1850, 1110, 5, 50000, 200000, 2000000, false, "VP9", 1, 0, 400000}, |
209 {}, | 209 {}, |
210 {true, 10}, | 210 {true, 10}, |
211 {"screenshare_slides_vp9_2sl", 0.0, 0.0, kFullStackTestDurationSecs}, | 211 {"screenshare_slides_vp9_2sl", 0.0, 0.0, kFullStackTestDurationSecs}, |
212 {}, | 212 {}, |
213 false, | 213 false, |
214 {std::vector<VideoStream>(), 0, 2, 1}}; | 214 {std::vector<VideoStream>(), 0, 2, 1}}; |
215 RunTest(screenshare); | 215 RunTest(screenshare); |
216 } | 216 } |
217 #endif // !defined(RTC_DISABLE_VP9) | 217 #endif // !defined(RTC_DISABLE_VP9) |
218 } // namespace webrtc | 218 } // namespace webrtc |
OLD | NEW |