| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2014 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | 258 : [kUVToRB]"r"(&yuvconstants->kUVToRB), |
| 259 [kUVToG]"r"(&yuvconstants->kUVToG), | 259 [kUVToG]"r"(&yuvconstants->kUVToG), |
| 260 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | 260 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), |
| 261 [kYToRgb]"r"(&yuvconstants->kYToRgb) | 261 [kYToRgb]"r"(&yuvconstants->kYToRgb) |
| 262 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", | 262 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", |
| 263 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" | 263 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" |
| 264 ); | 264 ); |
| 265 } | 265 } |
| 266 #endif // HAS_I422TOBGRAROW_NEON | 266 #endif // HAS_I422TOBGRAROW_NEON |
| 267 | 267 |
| 268 // TODO(fbarchard): Switch to Matrix version of this function. | |
| 269 #ifdef HAS_I422TOABGRROW_NEON | |
| 270 void I422ToABGRRow_NEON(const uint8* src_y, | |
| 271 const uint8* src_u, | |
| 272 const uint8* src_v, | |
| 273 uint8* dst_abgr, | |
| 274 const struct YuvConstants* yuvconstants, | |
| 275 int width) { | |
| 276 asm volatile ( | |
| 277 YUVTORGB_SETUP | |
| 278 "1: \n" | |
| 279 READYUV422 | |
| 280 YUVTORGB(v20, v21, v22) | |
| 281 "subs %w4, %w4, #8 \n" | |
| 282 "movi v23.8b, #255 \n" /* A */ | |
| 283 MEMACCESS(3) | |
| 284 "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%3], #32 \n" | |
| 285 "b.gt 1b \n" | |
| 286 : "+r"(src_y), // %0 | |
| 287 "+r"(src_u), // %1 | |
| 288 "+r"(src_v), // %2 | |
| 289 "+r"(dst_abgr), // %3 | |
| 290 "+r"(width) // %4 | |
| 291 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | |
| 292 [kUVToG]"r"(&yuvconstants->kUVToG), | |
| 293 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | |
| 294 [kYToRgb]"r"(&yuvconstants->kYToRgb) | |
| 295 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", | |
| 296 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" | |
| 297 ); | |
| 298 } | |
| 299 #endif // HAS_I422TOABGRROW_NEON | |
| 300 | |
| 301 #ifdef HAS_I422TORGBAROW_NEON | 268 #ifdef HAS_I422TORGBAROW_NEON |
| 302 void I422ToRGBARow_NEON(const uint8* src_y, | 269 void I422ToRGBARow_NEON(const uint8* src_y, |
| 303 const uint8* src_u, | 270 const uint8* src_u, |
| 304 const uint8* src_v, | 271 const uint8* src_v, |
| 305 uint8* dst_rgba, | 272 uint8* dst_rgba, |
| 306 const struct YuvConstants* yuvconstants, | 273 const struct YuvConstants* yuvconstants, |
| 307 int width) { | 274 int width) { |
| 308 asm volatile ( | 275 asm volatile ( |
| 309 YUVTORGB_SETUP | 276 YUVTORGB_SETUP |
| 310 "1: \n" | 277 "1: \n" |
| (...skipping 2761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3072 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List | 3039 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List |
| 3073 ); | 3040 ); |
| 3074 } | 3041 } |
| 3075 #endif // HAS_SOBELYROW_NEON | 3042 #endif // HAS_SOBELYROW_NEON |
| 3076 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) | 3043 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) |
| 3077 | 3044 |
| 3078 #ifdef __cplusplus | 3045 #ifdef __cplusplus |
| 3079 } // extern "C" | 3046 } // extern "C" |
| 3080 } // namespace libyuv | 3047 } // namespace libyuv |
| 3081 #endif | 3048 #endif |
| OLD | NEW |