OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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/utility/include/quality_scaler.h" | 11 #include "webrtc/modules/video_coding/utility/quality_scaler.h" |
12 | 12 |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 namespace { | 16 namespace { |
17 static const int kNumSeconds = 10; | 17 static const int kNumSeconds = 10; |
18 static const int kWidth = 1920; | 18 static const int kWidth = 1920; |
19 static const int kHalfWidth = kWidth / 2; | 19 static const int kHalfWidth = kWidth / 2; |
20 static const int kHeight = 1080; | 20 static const int kHeight = 1080; |
21 static const int kFramerate = 30; | 21 static const int kFramerate = 30; |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 DownscaleEndsAt(1600, 800, 200, 100); | 410 DownscaleEndsAt(1600, 800, 200, 100); |
411 } | 411 } |
412 | 412 |
413 TEST_F(QualityScalerTest, RespectsMinResolutionHeight) { | 413 TEST_F(QualityScalerTest, RespectsMinResolutionHeight) { |
414 // Should end at 100x200, as height can't go lower. | 414 // Should end at 100x200, as height can't go lower. |
415 qs_.SetMinResolution(10, 200); | 415 qs_.SetMinResolution(10, 200); |
416 DownscaleEndsAt(800, 1600, 100, 200); | 416 DownscaleEndsAt(800, 1600, 100, 200); |
417 } | 417 } |
418 | 418 |
419 } // namespace webrtc | 419 } // namespace webrtc |
OLD | NEW |