OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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/test/testsupport/metrics/video_metrics.h" | 11 #include "webrtc/test/testsupport/metrics/video_metrics.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 #include <stdio.h> | 14 #include <stdio.h> |
15 | 15 |
16 #include <algorithm> // min_element, max_element | 16 #include <algorithm> // min_element, max_element |
17 #include <memory> | 17 #include <memory> |
18 | 18 |
| 19 #include "webrtc/api/video/video_frame.h" |
| 20 #include "webrtc/common_video/include/video_frame_buffer.h" |
19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 21 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
20 #include "webrtc/test/frame_utils.h" | 22 #include "webrtc/test/frame_utils.h" |
21 #include "webrtc/video_frame.h" | |
22 #include "libyuv/convert.h" | 23 #include "libyuv/convert.h" |
23 | 24 |
24 namespace webrtc { | 25 namespace webrtc { |
25 namespace test { | 26 namespace test { |
26 | 27 |
27 // Copy here so our callers won't need to include libyuv for this constant. | 28 // Copy here so our callers won't need to include libyuv for this constant. |
28 double kMetricsPerfectPSNR = kPerfectPSNR; | 29 double kMetricsPerfectPSNR = kPerfectPSNR; |
29 | 30 |
30 // Used for calculating min and max values. | 31 // Used for calculating min and max values. |
31 static bool LessForFrameResultValue(const FrameResult& s1, | 32 static bool LessForFrameResultValue(const FrameResult& s1, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 int width, | 184 int width, |
184 int height, | 185 int height, |
185 QualityMetricsResult* result) { | 186 QualityMetricsResult* result) { |
186 assert(result != NULL); | 187 assert(result != NULL); |
187 return CalculateMetrics(kSSIM, ref_filename, test_filename, width, height, | 188 return CalculateMetrics(kSSIM, ref_filename, test_filename, width, height, |
188 NULL, result); | 189 NULL, result); |
189 } | 190 } |
190 | 191 |
191 } // namespace test | 192 } // namespace test |
192 } // namespace webrtc | 193 } // namespace webrtc |
OLD | NEW |