| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | 226 : [kUVToRB]"r"(&yuvconstants->kUVToRB), |
| 227 [kUVToG]"r"(&yuvconstants->kUVToG), | 227 [kUVToG]"r"(&yuvconstants->kUVToG), |
| 228 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | 228 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), |
| 229 [kYToRgb]"r"(&yuvconstants->kYToRgb) | 229 [kYToRgb]"r"(&yuvconstants->kYToRgb) |
| 230 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", | 230 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", |
| 231 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" | 231 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" |
| 232 ); | 232 ); |
| 233 } | 233 } |
| 234 #endif // HAS_I411TOARGBROW_NEON | 234 #endif // HAS_I411TOARGBROW_NEON |
| 235 | 235 |
| 236 #ifdef HAS_I422TOBGRAROW_NEON | |
| 237 void I422ToBGRARow_NEON(const uint8* src_y, | |
| 238 const uint8* src_u, | |
| 239 const uint8* src_v, | |
| 240 uint8* dst_bgra, | |
| 241 const struct YuvConstants* yuvconstants, | |
| 242 int width) { | |
| 243 asm volatile ( | |
| 244 YUVTORGB_SETUP | |
| 245 "1: \n" | |
| 246 READYUV422 | |
| 247 YUVTORGB(v21, v22, v23) | |
| 248 "subs %w4, %w4, #8 \n" | |
| 249 "movi v20.8b, #255 \n" /* A */ | |
| 250 MEMACCESS(3) | |
| 251 "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%3], #32 \n" | |
| 252 "b.gt 1b \n" | |
| 253 : "+r"(src_y), // %0 | |
| 254 "+r"(src_u), // %1 | |
| 255 "+r"(src_v), // %2 | |
| 256 "+r"(dst_bgra), // %3 | |
| 257 "+r"(width) // %4 | |
| 258 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | |
| 259 [kUVToG]"r"(&yuvconstants->kUVToG), | |
| 260 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | |
| 261 [kYToRgb]"r"(&yuvconstants->kYToRgb) | |
| 262 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", | |
| 263 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" | |
| 264 ); | |
| 265 } | |
| 266 #endif // HAS_I422TOBGRAROW_NEON | |
| 267 | |
| 268 #ifdef HAS_I422TORGBAROW_NEON | 236 #ifdef HAS_I422TORGBAROW_NEON |
| 269 void I422ToRGBARow_NEON(const uint8* src_y, | 237 void I422ToRGBARow_NEON(const uint8* src_y, |
| 270 const uint8* src_u, | 238 const uint8* src_u, |
| 271 const uint8* src_v, | 239 const uint8* src_v, |
| 272 uint8* dst_rgba, | 240 uint8* dst_rgba, |
| 273 const struct YuvConstants* yuvconstants, | 241 const struct YuvConstants* yuvconstants, |
| 274 int width) { | 242 int width) { |
| 275 asm volatile ( | 243 asm volatile ( |
| 276 YUVTORGB_SETUP | 244 YUVTORGB_SETUP |
| 277 "1: \n" | 245 "1: \n" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | 289 : [kUVToRB]"r"(&yuvconstants->kUVToRB), |
| 322 [kUVToG]"r"(&yuvconstants->kUVToG), | 290 [kUVToG]"r"(&yuvconstants->kUVToG), |
| 323 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | 291 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), |
| 324 [kYToRgb]"r"(&yuvconstants->kYToRgb) | 292 [kYToRgb]"r"(&yuvconstants->kYToRgb) |
| 325 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", | 293 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", |
| 326 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" | 294 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" |
| 327 ); | 295 ); |
| 328 } | 296 } |
| 329 #endif // HAS_I422TORGB24ROW_NEON | 297 #endif // HAS_I422TORGB24ROW_NEON |
| 330 | 298 |
| 331 #ifdef HAS_I422TORAWROW_NEON | |
| 332 void I422ToRAWRow_NEON(const uint8* src_y, | |
| 333 const uint8* src_u, | |
| 334 const uint8* src_v, | |
| 335 uint8* dst_raw, | |
| 336 const struct YuvConstants* yuvconstants, | |
| 337 int width) { | |
| 338 asm volatile ( | |
| 339 YUVTORGB_SETUP | |
| 340 "1: \n" | |
| 341 READYUV422 | |
| 342 YUVTORGB(v20, v21, v22) | |
| 343 "subs %w4, %w4, #8 \n" | |
| 344 MEMACCESS(3) | |
| 345 "st3 {v20.8b,v21.8b,v22.8b}, [%3], #24 \n" | |
| 346 "b.gt 1b \n" | |
| 347 : "+r"(src_y), // %0 | |
| 348 "+r"(src_u), // %1 | |
| 349 "+r"(src_v), // %2 | |
| 350 "+r"(dst_raw), // %3 | |
| 351 "+r"(width) // %4 | |
| 352 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | |
| 353 [kUVToG]"r"(&yuvconstants->kUVToG), | |
| 354 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | |
| 355 [kYToRgb]"r"(&yuvconstants->kYToRgb) | |
| 356 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", | |
| 357 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" | |
| 358 ); | |
| 359 } | |
| 360 #endif // HAS_I422TORAWROW_NEON | |
| 361 | |
| 362 #define ARGBTORGB565 \ | 299 #define ARGBTORGB565 \ |
| 363 "shll v0.8h, v22.8b, #8 \n" /* R */ \ | 300 "shll v0.8h, v22.8b, #8 \n" /* R */ \ |
| 364 "shll v20.8h, v20.8b, #8 \n" /* B */ \ | 301 "shll v20.8h, v20.8b, #8 \n" /* B */ \ |
| 365 "shll v21.8h, v21.8b, #8 \n" /* G */ \ | 302 "shll v21.8h, v21.8b, #8 \n" /* G */ \ |
| 366 "sri v0.8h, v21.8h, #5 \n" /* RG */ \ | 303 "sri v0.8h, v21.8h, #5 \n" /* RG */ \ |
| 367 "sri v0.8h, v20.8h, #11 \n" /* RGB */ | 304 "sri v0.8h, v20.8h, #11 \n" /* RGB */ |
| 368 | 305 |
| 369 #ifdef HAS_I422TORGB565ROW_NEON | 306 #ifdef HAS_I422TORGB565ROW_NEON |
| 370 void I422ToRGB565Row_NEON(const uint8* src_y, | 307 void I422ToRGB565Row_NEON(const uint8* src_y, |
| 371 const uint8* src_u, | 308 const uint8* src_u, |
| (...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3039 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List | 2976 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List |
| 3040 ); | 2977 ); |
| 3041 } | 2978 } |
| 3042 #endif // HAS_SOBELYROW_NEON | 2979 #endif // HAS_SOBELYROW_NEON |
| 3043 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) | 2980 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) |
| 3044 | 2981 |
| 3045 #ifdef __cplusplus | 2982 #ifdef __cplusplus |
| 3046 } // extern "C" | 2983 } // extern "C" |
| 3047 } // namespace libyuv | 2984 } // namespace libyuv |
| 3048 #endif | 2985 #endif |
| OLD | NEW |