OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2013 The LibYuv 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 <stdlib.h> | 11 #include <stdlib.h> |
12 #include <string.h> | 12 #include <string.h> |
13 #include <time.h> | 13 #include <time.h> |
14 | 14 |
15 #include "libyuv/basic_types.h" | 15 #include "libyuv/basic_types.h" |
16 #include "libyuv/cpu_id.h" | 16 #include "libyuv/cpu_id.h" |
17 #include "libyuv/row.h" | |
18 #include "libyuv/scale.h" | 17 #include "libyuv/scale.h" |
19 #include "libyuv/scale_row.h" | 18 #include "libyuv/scale_row.h" |
20 #include "../unit_test/unit_test.h" | 19 #include "../unit_test/unit_test.h" |
21 | 20 |
22 namespace libyuv { | 21 namespace libyuv { |
23 | 22 |
24 TEST_F(LibYUVBaseTest, TestFixedDiv) { | 23 TEST_F(LibYUVBaseTest, TestFixedDiv) { |
25 int num[1280]; | 24 int num[1280]; |
26 int div[1280]; | 25 int div[1280]; |
27 int result_opt[1280]; | 26 int result_opt[1280]; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 146 } |
148 } | 147 } |
149 } | 148 } |
150 for (int j = 0; j < 1280; ++j) { | 149 for (int j = 0; j < 1280; ++j) { |
151 result_c[j] = libyuv::FixedDiv1_C(num[j], div[j]); | 150 result_c[j] = libyuv::FixedDiv1_C(num[j], div[j]); |
152 EXPECT_NEAR(result_c[j], result_opt[j], 1); | 151 EXPECT_NEAR(result_c[j], result_opt[j], 1); |
153 } | 152 } |
154 } | 153 } |
155 | 154 |
156 } // namespace libyuv | 155 } // namespace libyuv |
OLD | NEW |