Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: source/row_neon64.cc

Issue 1388273002: Reimplement NV21ToARGB to allow different color matrix. (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: include scale_row.h for scaling macros Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/row_neon.cc ('k') | source/row_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 "+r"(dst_argb), // %2 569 "+r"(dst_argb), // %2
570 "+r"(width) // %3 570 "+r"(width) // %3
571 : [kUVBiasBGR]"r"(&kYuvConstants.kUVBiasBGR), 571 : [kUVBiasBGR]"r"(&kYuvConstants.kUVBiasBGR),
572 [kYToRgb]"r"(&kYuvConstants.kYToRgb) 572 [kYToRgb]"r"(&kYuvConstants.kYToRgb)
573 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20", 573 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
574 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" 574 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
575 ); 575 );
576 } 576 }
577 #endif // HAS_NV12TOARGBROW_NEON 577 #endif // HAS_NV12TOARGBROW_NEON
578 578
579 #ifdef HAS_NV12TOARGBROW_NEON
580 void NV21ToARGBRow_NEON(const uint8* src_y,
581 const uint8* src_vu,
582 uint8* dst_argb,
583 struct YuvConstants* yuvconstants,
584 int width) {
585 asm volatile (
586 YUVTORGB_SETUP
587 "1: \n"
588 READNV21
589 YUVTORGB(v22, v21, v20)
590 "subs %w3, %w3, #8 \n"
591 "movi v23.8b, #255 \n"
592 MEMACCESS(2)
593 "st4 {v20.8b,v21.8b,v22.8b,v23.8b}, [%2], #32 \n"
594 "b.gt 1b \n"
595 : "+r"(src_y), // %0
596 "+r"(src_vu), // %1
597 "+r"(dst_argb), // %2
598 "+r"(width) // %3
599 : [kUVBiasBGR]"r"(&kYuvConstants.kUVBiasBGR),
600 [kYToRgb]"r"(&kYuvConstants.kYToRgb)
601 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v20",
602 "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
603 );
604 }
605 #endif // HAS_NV12TOARGBROW_NEON
606
579 #ifdef HAS_NV12TORGB565ROW_NEON 607 #ifdef HAS_NV12TORGB565ROW_NEON
580 void NV12ToRGB565Row_NEON(const uint8* src_y, 608 void NV12ToRGB565Row_NEON(const uint8* src_y,
581 const uint8* src_uv, 609 const uint8* src_uv,
582 uint8* dst_rgb565, 610 uint8* dst_rgb565,
583 struct YuvConstants* yuvconstants, 611 struct YuvConstants* yuvconstants,
584 int width) { 612 int width) {
585 asm volatile ( 613 asm volatile (
586 YUVTORGB_SETUP 614 YUVTORGB_SETUP
587 "1: \n" 615 "1: \n"
588 READNV12 616 READNV12
(...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after
3013 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List 3041 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List
3014 ); 3042 );
3015 } 3043 }
3016 #endif // HAS_SOBELYROW_NEON 3044 #endif // HAS_SOBELYROW_NEON
3017 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) 3045 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
3018 3046
3019 #ifdef __cplusplus 3047 #ifdef __cplusplus
3020 } // extern "C" 3048 } // extern "C"
3021 } // namespace libyuv 3049 } // namespace libyuv
3022 #endif 3050 #endif
OLDNEW
« no previous file with comments | « source/row_neon.cc ('k') | source/row_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698