| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2015 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 | 12 |
| 13 #include "libyuv/convert.h" | 13 #include "libyuv/convert.h" |
| 14 #include "libyuv/convert_argb.h" | 14 #include "libyuv/convert_argb.h" |
| 15 #include "libyuv/convert_from.h" | 15 #include "libyuv/convert_from.h" |
| 16 #include "libyuv/convert_from_argb.h" | 16 #include "libyuv/convert_from_argb.h" |
| 17 #include "libyuv/cpu_id.h" | 17 #include "libyuv/cpu_id.h" |
| 18 #include "libyuv/row.h" // For Sobel | 18 #include "libyuv/row.h" // For Sobel |
| 19 #include "../unit_test/unit_test.h" | 19 #include "../unit_test/unit_test.h" |
| 20 | 20 |
| 21 namespace libyuv { | 21 namespace libyuv { |
| 22 | 22 |
| 23 // TODO(fbarchard): Port high accuracy YUV to RGB to Neon. | 23 // TODO(fbarchard): Port high accuracy YUV to RGB to Neon. |
| 24 #if !defined(LIBYUV_DISABLE_NEON) && \ | 24 #if !defined(LIBYUV_DISABLE_NEON) && \ |
| 25 (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)) | 25 (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)) |
| 26 #define ERROR_R 1 | 26 #define ERROR_R 1 |
| 27 #define ERROR_G 1 | 27 #define ERROR_G 1 |
| 28 #define ERROR_B 3 | 28 #define ERROR_B 3 |
| 29 #define ERROR_FULL 6 | 29 #define ERROR_FULL 6 |
| 30 #define ERROR_J420 4 | 30 #define ERROR_J420 5 |
| 31 #else | 31 #else |
| 32 #define ERROR_R 1 | 32 #define ERROR_R 1 |
| 33 #define ERROR_G 1 | 33 #define ERROR_G 1 |
| 34 #define ERROR_B 3 | 34 #define ERROR_B 3 |
| 35 #define ERROR_FULL 5 | 35 #define ERROR_FULL 5 |
| 36 #define ERROR_J420 3 | 36 #define ERROR_J420 3 |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 #define TESTCS(TESTNAME, YUVTOARGB, ARGBTOYUV, HS1, HS, HN, DIFF) \ | 39 #define TESTCS(TESTNAME, YUVTOARGB, ARGBTOYUV, HS1, HS, HN, DIFF) \ |
| 40 TEST_F(LibYUVColorTest, TESTNAME) {
\ | 40 TEST_F(LibYUVColorTest, TESTNAME) {
\ |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 EXPECT_EQ(r0, r1); | 549 EXPECT_EQ(r0, r1); |
| 550 EXPECT_EQ(g0, g1); | 550 EXPECT_EQ(g0, g1); |
| 551 EXPECT_EQ(b0, b1); | 551 EXPECT_EQ(b0, b1); |
| 552 EXPECT_EQ(r0, r2); | 552 EXPECT_EQ(r0, r2); |
| 553 EXPECT_EQ(g0, g2); | 553 EXPECT_EQ(g0, g2); |
| 554 EXPECT_EQ(b0, b2); | 554 EXPECT_EQ(b0, b2); |
| 555 } | 555 } |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace libyuv | 558 } // namespace libyuv |
| OLD | NEW |