| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 "+r"(width) // %4 | 217 "+r"(width) // %4 |
| 218 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | 218 : [kUVToRB]"r"(&yuvconstants->kUVToRB), |
| 219 [kUVToG]"r"(&yuvconstants->kUVToG), | 219 [kUVToG]"r"(&yuvconstants->kUVToG), |
| 220 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | 220 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), |
| 221 [kYToRgb]"r"(&yuvconstants->kYToRgb) | 221 [kYToRgb]"r"(&yuvconstants->kYToRgb) |
| 222 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", | 222 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", |
| 223 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" | 223 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" |
| 224 ); | 224 ); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void I422ToBGRARow_NEON(const uint8* src_y, | |
| 228 const uint8* src_u, | |
| 229 const uint8* src_v, | |
| 230 uint8* dst_bgra, | |
| 231 const struct YuvConstants* yuvconstants, | |
| 232 int width) { | |
| 233 asm volatile ( | |
| 234 YUVTORGB_SETUP | |
| 235 "1: \n" | |
| 236 READYUV422 | |
| 237 YUVTORGB | |
| 238 "subs %4, %4, #8 \n" | |
| 239 "vswp.u8 d20, d22 \n" | |
| 240 "vmov.u8 d19, #255 \n" | |
| 241 MEMACCESS(3) | |
| 242 "vst4.8 {d19, d20, d21, d22}, [%3]! \n" | |
| 243 "bgt 1b \n" | |
| 244 : "+r"(src_y), // %0 | |
| 245 "+r"(src_u), // %1 | |
| 246 "+r"(src_v), // %2 | |
| 247 "+r"(dst_bgra), // %3 | |
| 248 "+r"(width) // %4 | |
| 249 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | |
| 250 [kUVToG]"r"(&yuvconstants->kUVToG), | |
| 251 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | |
| 252 [kYToRgb]"r"(&yuvconstants->kYToRgb) | |
| 253 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", | |
| 254 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" | |
| 255 ); | |
| 256 } | |
| 257 | |
| 258 void I422ToRGBARow_NEON(const uint8* src_y, | 227 void I422ToRGBARow_NEON(const uint8* src_y, |
| 259 const uint8* src_u, | 228 const uint8* src_u, |
| 260 const uint8* src_v, | 229 const uint8* src_v, |
| 261 uint8* dst_rgba, | 230 uint8* dst_rgba, |
| 262 const struct YuvConstants* yuvconstants, | 231 const struct YuvConstants* yuvconstants, |
| 263 int width) { | 232 int width) { |
| 264 asm volatile ( | 233 asm volatile ( |
| 265 YUVTORGB_SETUP | 234 YUVTORGB_SETUP |
| 266 "1: \n" | 235 "1: \n" |
| 267 READYUV422 | 236 READYUV422 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 "+r"(width) // %4 | 276 "+r"(width) // %4 |
| 308 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | 277 : [kUVToRB]"r"(&yuvconstants->kUVToRB), |
| 309 [kUVToG]"r"(&yuvconstants->kUVToG), | 278 [kUVToG]"r"(&yuvconstants->kUVToG), |
| 310 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | 279 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), |
| 311 [kYToRgb]"r"(&yuvconstants->kYToRgb) | 280 [kYToRgb]"r"(&yuvconstants->kYToRgb) |
| 312 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", | 281 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", |
| 313 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" | 282 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" |
| 314 ); | 283 ); |
| 315 } | 284 } |
| 316 | 285 |
| 317 void I422ToRAWRow_NEON(const uint8* src_y, | |
| 318 const uint8* src_u, | |
| 319 const uint8* src_v, | |
| 320 uint8* dst_raw, | |
| 321 const struct YuvConstants* yuvconstants, | |
| 322 int width) { | |
| 323 asm volatile ( | |
| 324 YUVTORGB_SETUP | |
| 325 "1: \n" | |
| 326 READYUV422 | |
| 327 YUVTORGB | |
| 328 "subs %4, %4, #8 \n" | |
| 329 "vswp.u8 d20, d22 \n" | |
| 330 MEMACCESS(3) | |
| 331 "vst3.8 {d20, d21, d22}, [%3]! \n" | |
| 332 "bgt 1b \n" | |
| 333 : "+r"(src_y), // %0 | |
| 334 "+r"(src_u), // %1 | |
| 335 "+r"(src_v), // %2 | |
| 336 "+r"(dst_raw), // %3 | |
| 337 "+r"(width) // %4 | |
| 338 : [kUVToRB]"r"(&yuvconstants->kUVToRB), | |
| 339 [kUVToG]"r"(&yuvconstants->kUVToG), | |
| 340 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), | |
| 341 [kYToRgb]"r"(&yuvconstants->kYToRgb) | |
| 342 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", | |
| 343 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" | |
| 344 ); | |
| 345 } | |
| 346 | |
| 347 #define ARGBTORGB565 \ | 286 #define ARGBTORGB565 \ |
| 348 "vshr.u8 d20, d20, #3 \n" /* B */ \ | 287 "vshr.u8 d20, d20, #3 \n" /* B */ \ |
| 349 "vshr.u8 d21, d21, #2 \n" /* G */ \ | 288 "vshr.u8 d21, d21, #2 \n" /* G */ \ |
| 350 "vshr.u8 d22, d22, #3 \n" /* R */ \ | 289 "vshr.u8 d22, d22, #3 \n" /* R */ \ |
| 351 "vmovl.u8 q8, d20 \n" /* B */ \ | 290 "vmovl.u8 q8, d20 \n" /* B */ \ |
| 352 "vmovl.u8 q9, d21 \n" /* G */ \ | 291 "vmovl.u8 q9, d21 \n" /* G */ \ |
| 353 "vmovl.u8 q10, d22 \n" /* R */ \ | 292 "vmovl.u8 q10, d22 \n" /* R */ \ |
| 354 "vshl.u16 q9, q9, #5 \n" /* G */ \ | 293 "vshl.u16 q9, q9, #5 \n" /* G */ \ |
| 355 "vshl.u16 q10, q10, #11 \n" /* R */ \ | 294 "vshl.u16 q10, q10, #11 \n" /* R */ \ |
| 356 "vorr q0, q8, q9 \n" /* BG */ \ | 295 "vorr q0, q8, q9 \n" /* BG */ \ |
| (...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2920 "r"(6) // %5 | 2859 "r"(6) // %5 |
| 2921 : "cc", "memory", "q0", "q1" // Clobber List | 2860 : "cc", "memory", "q0", "q1" // Clobber List |
| 2922 ); | 2861 ); |
| 2923 } | 2862 } |
| 2924 #endif // defined(__ARM_NEON__) && !defined(__aarch64__) | 2863 #endif // defined(__ARM_NEON__) && !defined(__aarch64__) |
| 2925 | 2864 |
| 2926 #ifdef __cplusplus | 2865 #ifdef __cplusplus |
| 2927 } // extern "C" | 2866 } // extern "C" |
| 2928 } // namespace libyuv | 2867 } // namespace libyuv |
| 2929 #endif | 2868 #endif |
| OLD | NEW |