| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 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 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 #define HAS_I422TOARGB1555ROW_SSSE3 | 113 #define HAS_I422TOARGB1555ROW_SSSE3 |
| 114 #define HAS_I422TOARGB4444ROW_SSSE3 | 114 #define HAS_I422TOARGB4444ROW_SSSE3 |
| 115 #define HAS_I422TOARGBROW_SSSE3 | 115 #define HAS_I422TOARGBROW_SSSE3 |
| 116 #define HAS_I422TOBGRAROW_SSSE3 | 116 #define HAS_I422TOBGRAROW_SSSE3 |
| 117 #define HAS_I422TORAWROW_SSSE3 | 117 #define HAS_I422TORAWROW_SSSE3 |
| 118 #define HAS_I422TORGB24ROW_SSSE3 | 118 #define HAS_I422TORGB24ROW_SSSE3 |
| 119 #define HAS_I422TORGB565ROW_SSSE3 | 119 #define HAS_I422TORGB565ROW_SSSE3 |
| 120 #define HAS_I422TORGBAROW_SSSE3 | 120 #define HAS_I422TORGBAROW_SSSE3 |
| 121 #define HAS_I422TOUYVYROW_SSE2 | 121 #define HAS_I422TOUYVYROW_SSE2 |
| 122 #define HAS_I422TOYUY2ROW_SSE2 | 122 #define HAS_I422TOYUY2ROW_SSE2 |
| 123 #define HAS_I444TOABGRROW_SSSE3 | |
| 124 #define HAS_I444TOARGBROW_SSSE3 | 123 #define HAS_I444TOARGBROW_SSSE3 |
| 125 #define HAS_J400TOARGBROW_SSE2 | 124 #define HAS_J400TOARGBROW_SSE2 |
| 126 #define HAS_J422TOABGRROW_SSSE3 | 125 #define HAS_J422TOABGRROW_SSSE3 |
| 127 #define HAS_J422TOARGBROW_SSSE3 | 126 #define HAS_J422TOARGBROW_SSSE3 |
| 128 #define HAS_MERGEUVROW_SSE2 | 127 #define HAS_MERGEUVROW_SSE2 |
| 129 #define HAS_MIRRORROW_SSSE3 | 128 #define HAS_MIRRORROW_SSSE3 |
| 130 #define HAS_MIRRORROW_UV_SSSE3 | 129 #define HAS_MIRRORROW_UV_SSSE3 |
| 131 #define HAS_MIRRORUVROW_SSSE3 | 130 #define HAS_MIRRORUVROW_SSSE3 |
| 132 #define HAS_NV12TOARGBROW_SSSE3 | 131 #define HAS_NV12TOARGBROW_SSSE3 |
| 133 #define HAS_NV12TORGB565ROW_SSSE3 | 132 #define HAS_NV12TORGB565ROW_SSSE3 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) | 238 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) |
| 240 #define HAS_ARGB1555TOARGBROW_AVX2 | 239 #define HAS_ARGB1555TOARGBROW_AVX2 |
| 241 #define HAS_ARGB4444TOARGBROW_AVX2 | 240 #define HAS_ARGB4444TOARGBROW_AVX2 |
| 242 #define HAS_ARGBTOARGB1555ROW_AVX2 | 241 #define HAS_ARGBTOARGB1555ROW_AVX2 |
| 243 #define HAS_ARGBTOARGB4444ROW_AVX2 | 242 #define HAS_ARGBTOARGB4444ROW_AVX2 |
| 244 #define HAS_ARGBTORGB565ROW_AVX2 | 243 #define HAS_ARGBTORGB565ROW_AVX2 |
| 245 #define HAS_I411TOARGBROW_AVX2 | 244 #define HAS_I411TOARGBROW_AVX2 |
| 246 #define HAS_I422TOARGB1555ROW_AVX2 | 245 #define HAS_I422TOARGB1555ROW_AVX2 |
| 247 #define HAS_I422TOARGB4444ROW_AVX2 | 246 #define HAS_I422TOARGB4444ROW_AVX2 |
| 248 #define HAS_I422TORGB565ROW_AVX2 | 247 #define HAS_I422TORGB565ROW_AVX2 |
| 249 #define HAS_I444TOABGRROW_AVX2 | |
| 250 #define HAS_I444TOARGBROW_AVX2 | 248 #define HAS_I444TOARGBROW_AVX2 |
| 251 #define HAS_J400TOARGBROW_AVX2 | 249 #define HAS_J400TOARGBROW_AVX2 |
| 252 #define HAS_NV12TORGB565ROW_AVX2 | 250 #define HAS_NV12TORGB565ROW_AVX2 |
| 253 #define HAS_RGB565TOARGBROW_AVX2 | 251 #define HAS_RGB565TOARGBROW_AVX2 |
| 254 #endif | 252 #endif |
| 255 | 253 |
| 256 // The following are also available on x64 Visual C. | 254 // The following are also available on x64 Visual C. |
| 257 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && \ | 255 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && \ |
| 258 (!defined(__clang__) || defined(__SSSE3__)) | 256 (!defined(__clang__) || defined(__SSSE3__)) |
| 259 #define HAS_I422ALPHATOABGRROW_SSSE3 | 257 #define HAS_I422ALPHATOABGRROW_SSSE3 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 #define KUVTOR 64 | 451 #define KUVTOR 64 |
| 454 #define KUVBIASB 96 | 452 #define KUVBIASB 96 |
| 455 #define KUVBIASG 128 | 453 #define KUVBIASG 128 |
| 456 #define KUVBIASR 160 | 454 #define KUVBIASR 160 |
| 457 #define KYTORGB 192 | 455 #define KYTORGB 192 |
| 458 #endif | 456 #endif |
| 459 | 457 |
| 460 extern const struct YuvConstants kYuvIConstants; // BT.601 | 458 extern const struct YuvConstants kYuvIConstants; // BT.601 |
| 461 extern const struct YuvConstants kYuvJConstants; // JPeg color space | 459 extern const struct YuvConstants kYuvJConstants; // JPeg color space |
| 462 extern const struct YuvConstants kYuvHConstants; // BT.709 | 460 extern const struct YuvConstants kYuvHConstants; // BT.709 |
| 461 extern const struct YuvConstants kYvuIConstants; // YVU to BGR BT.601 |
| 463 | 462 |
| 464 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) | 463 #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) |
| 465 #define OMITFP | 464 #define OMITFP |
| 466 #else | 465 #else |
| 467 #define OMITFP __attribute__((optimize("omit-frame-pointer"))) | 466 #define OMITFP __attribute__((optimize("omit-frame-pointer"))) |
| 468 #endif | 467 #endif |
| 469 | 468 |
| 470 // NaCL macros for GCC x86 and x64. | 469 // NaCL macros for GCC x86 and x64. |
| 471 #if defined(__native_client__) | 470 #if defined(__native_client__) |
| 472 #define LABELALIGN ".p2align 5\n" | 471 #define LABELALIGN ".p2align 5\n" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); | 1027 void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); |
| 1029 void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); | 1028 void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); |
| 1030 void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); | 1029 void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); |
| 1031 | 1030 |
| 1032 void I444ToARGBRow_C(const uint8* src_y, | 1031 void I444ToARGBRow_C(const uint8* src_y, |
| 1033 const uint8* src_u, | 1032 const uint8* src_u, |
| 1034 const uint8* src_v, | 1033 const uint8* src_v, |
| 1035 uint8* dst_argb, | 1034 uint8* dst_argb, |
| 1036 const struct YuvConstants* yuvconstants, | 1035 const struct YuvConstants* yuvconstants, |
| 1037 int width); | 1036 int width); |
| 1038 void I444ToABGRRow_C(const uint8* src_y, | |
| 1039 const uint8* src_u, | |
| 1040 const uint8* src_v, | |
| 1041 uint8* dst_argb, | |
| 1042 const struct YuvConstants* yuvconstants, | |
| 1043 int width); | |
| 1044 void I422ToARGBRow_C(const uint8* src_y, | 1037 void I422ToARGBRow_C(const uint8* src_y, |
| 1045 const uint8* src_u, | 1038 const uint8* src_u, |
| 1046 const uint8* src_v, | 1039 const uint8* src_v, |
| 1047 uint8* dst_argb, | 1040 uint8* dst_argb, |
| 1048 const struct YuvConstants* yuvconstants, | 1041 const struct YuvConstants* yuvconstants, |
| 1049 int width); | 1042 int width); |
| 1050 void I422ToARGBRow_C(const uint8* src_y, | 1043 void I422ToARGBRow_C(const uint8* src_y, |
| 1051 const uint8* src_u, | 1044 const uint8* src_u, |
| 1052 const uint8* src_v, | 1045 const uint8* src_v, |
| 1053 uint8* dst_argb, | 1046 uint8* dst_argb, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 const uint8* src_v, | 1196 const uint8* src_v, |
| 1204 uint8* dst_argb, | 1197 uint8* dst_argb, |
| 1205 const struct YuvConstants* yuvconstants, | 1198 const struct YuvConstants* yuvconstants, |
| 1206 int width); | 1199 int width); |
| 1207 void I444ToARGBRow_AVX2(const uint8* src_y, | 1200 void I444ToARGBRow_AVX2(const uint8* src_y, |
| 1208 const uint8* src_u, | 1201 const uint8* src_u, |
| 1209 const uint8* src_v, | 1202 const uint8* src_v, |
| 1210 uint8* dst_argb, | 1203 uint8* dst_argb, |
| 1211 const struct YuvConstants* yuvconstants, | 1204 const struct YuvConstants* yuvconstants, |
| 1212 int width); | 1205 int width); |
| 1213 void I444ToABGRRow_SSSE3(const uint8* src_y, | |
| 1214 const uint8* src_u, | |
| 1215 const uint8* src_v, | |
| 1216 uint8* dst_abgr, | |
| 1217 const struct YuvConstants* yuvconstants, | |
| 1218 int width); | |
| 1219 void I444ToABGRRow_AVX2(const uint8* src_y, | |
| 1220 const uint8* src_u, | |
| 1221 const uint8* src_v, | |
| 1222 uint8* dst_abgr, | |
| 1223 const struct YuvConstants* yuvconstants, | |
| 1224 int width); | |
| 1225 void I444ToABGRRow_SSSE3(const uint8* src_y, | |
| 1226 const uint8* src_u, | |
| 1227 const uint8* src_v, | |
| 1228 uint8* dst_abgr, | |
| 1229 const struct YuvConstants* yuvconstants, | |
| 1230 int width); | |
| 1231 void I444ToABGRRow_AVX2(const uint8* src_y, | |
| 1232 const uint8* src_u, | |
| 1233 const uint8* src_v, | |
| 1234 uint8* dst_abgr, | |
| 1235 const struct YuvConstants* yuvconstants, | |
| 1236 int width); | |
| 1237 void I422ToARGBRow_SSSE3(const uint8* src_y, | 1206 void I422ToARGBRow_SSSE3(const uint8* src_y, |
| 1238 const uint8* src_u, | 1207 const uint8* src_u, |
| 1239 const uint8* src_v, | 1208 const uint8* src_v, |
| 1240 uint8* dst_argb, | 1209 uint8* dst_argb, |
| 1241 const struct YuvConstants* yuvconstants, | 1210 const struct YuvConstants* yuvconstants, |
| 1242 int width); | 1211 int width); |
| 1243 void I422AlphaToARGBRow_SSSE3(const uint8* y_buf, | 1212 void I422AlphaToARGBRow_SSSE3(const uint8* y_buf, |
| 1244 const uint8* u_buf, | 1213 const uint8* u_buf, |
| 1245 const uint8* v_buf, | 1214 const uint8* v_buf, |
| 1246 const uint8* a_buf, | 1215 const uint8* a_buf, |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 const uint8* src_v, | 1414 const uint8* src_v, |
| 1446 uint8* dst_argb, | 1415 uint8* dst_argb, |
| 1447 const struct YuvConstants* yuvconstants, | 1416 const struct YuvConstants* yuvconstants, |
| 1448 int width); | 1417 int width); |
| 1449 void I444ToARGBRow_Any_AVX2(const uint8* src_y, | 1418 void I444ToARGBRow_Any_AVX2(const uint8* src_y, |
| 1450 const uint8* src_u, | 1419 const uint8* src_u, |
| 1451 const uint8* src_v, | 1420 const uint8* src_v, |
| 1452 uint8* dst_argb, | 1421 uint8* dst_argb, |
| 1453 const struct YuvConstants* yuvconstants, | 1422 const struct YuvConstants* yuvconstants, |
| 1454 int width); | 1423 int width); |
| 1455 void I444ToABGRRow_Any_SSSE3(const uint8* src_y, | |
| 1456 const uint8* src_u, | |
| 1457 const uint8* src_v, | |
| 1458 uint8* dst_abgr, | |
| 1459 const struct YuvConstants* yuvconstants, | |
| 1460 int width); | |
| 1461 void I444ToABGRRow_Any_AVX2(const uint8* src_y, | |
| 1462 const uint8* src_u, | |
| 1463 const uint8* src_v, | |
| 1464 uint8* dst_abgr, | |
| 1465 const struct YuvConstants* yuvconstants, | |
| 1466 int width); | |
| 1467 void I422ToARGBRow_Any_SSSE3(const uint8* src_y, | 1424 void I422ToARGBRow_Any_SSSE3(const uint8* src_y, |
| 1468 const uint8* src_u, | 1425 const uint8* src_u, |
| 1469 const uint8* src_v, | 1426 const uint8* src_v, |
| 1470 uint8* dst_argb, | 1427 uint8* dst_argb, |
| 1471 const struct YuvConstants* yuvconstants, | 1428 const struct YuvConstants* yuvconstants, |
| 1472 int width); | 1429 int width); |
| 1473 void I422AlphaToARGBRow_Any_SSSE3(const uint8* y_buf, | 1430 void I422AlphaToARGBRow_Any_SSSE3(const uint8* y_buf, |
| 1474 const uint8* u_buf, | 1431 const uint8* u_buf, |
| 1475 const uint8* v_buf, | 1432 const uint8* v_buf, |
| 1476 const uint8* a_buf, | 1433 const uint8* a_buf, |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2149 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, | 2106 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, |
| 2150 int width, | 2107 int width, |
| 2151 const uint8* luma, uint32 lumacoeff); | 2108 const uint8* luma, uint32 lumacoeff); |
| 2152 | 2109 |
| 2153 #ifdef __cplusplus | 2110 #ifdef __cplusplus |
| 2154 } // extern "C" | 2111 } // extern "C" |
| 2155 } // namespace libyuv | 2112 } // namespace libyuv |
| 2156 #endif | 2113 #endif |
| 2157 | 2114 |
| 2158 #endif // INCLUDE_LIBYUV_ROW_H_ NOLINT | 2115 #endif // INCLUDE_LIBYUV_ROW_H_ NOLINT |
| OLD | NEW |