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

Side by Side Diff: source/row_neon.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_gcc.cc ('k') | source/row_neon64.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 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 "+r"(width) // %3 572 "+r"(width) // %3
573 : [kUVToRB]"r"(&yuvconstants->kUVToRB), 573 : [kUVToRB]"r"(&yuvconstants->kUVToRB),
574 [kUVToG]"r"(&yuvconstants->kUVToG), 574 [kUVToG]"r"(&yuvconstants->kUVToG),
575 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR), 575 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
576 [kYToRgb]"r"(&yuvconstants->kYToRgb) 576 [kYToRgb]"r"(&yuvconstants->kYToRgb)
577 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", 577 : "cc", "memory", "q0", "q1", "q2", "q3", "q4",
578 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" 578 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15"
579 ); 579 );
580 } 580 }
581 581
582 void NV21ToARGBRow_NEON(const uint8* src_y,
583 const uint8* src_vu,
584 uint8* dst_argb,
585 struct YuvConstants* yuvconstants,
586 int width) {
587 asm volatile (
588 YUVTORGB_SETUP
589 "1: \n"
590 READNV21
591 YUVTORGB
592 "subs %3, %3, #8 \n"
593 "vmov.u8 d23, #255 \n"
594 MEMACCESS(2)
595 "vst4.8 {d20, d21, d22, d23}, [%2]! \n"
596 "bgt 1b \n"
597 : "+r"(src_y), // %0
598 "+r"(src_vu), // %1
599 "+r"(dst_argb), // %2
600 "+r"(width) // %3
601 : [kUVToRB]"r"(&yuvconstants->kUVToRB),
602 [kUVToG]"r"(&yuvconstants->kUVToG),
603 [kUVBiasBGR]"r"(&yuvconstants->kUVBiasBGR),
604 [kYToRgb]"r"(&yuvconstants->kYToRgb)
605 : "cc", "memory", "q0", "q1", "q2", "q3", "q4",
606 "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15"
607 );
608 }
609
582 void NV12ToRGB565Row_NEON(const uint8* src_y, 610 void NV12ToRGB565Row_NEON(const uint8* src_y,
583 const uint8* src_uv, 611 const uint8* src_uv,
584 uint8* dst_rgb565, 612 uint8* dst_rgb565,
585 struct YuvConstants* yuvconstants, 613 struct YuvConstants* yuvconstants,
586 int width) { 614 int width) {
587 asm volatile ( 615 asm volatile (
588 YUVTORGB_SETUP 616 YUVTORGB_SETUP
589 "1: \n" 617 "1: \n"
590 READNV12 618 READNV12
591 YUVTORGB 619 YUVTORGB
(...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2923 "r"(6) // %5 2951 "r"(6) // %5
2924 : "cc", "memory", "q0", "q1" // Clobber List 2952 : "cc", "memory", "q0", "q1" // Clobber List
2925 ); 2953 );
2926 } 2954 }
2927 #endif // defined(__ARM_NEON__) && !defined(__aarch64__) 2955 #endif // defined(__ARM_NEON__) && !defined(__aarch64__)
2928 2956
2929 #ifdef __cplusplus 2957 #ifdef __cplusplus
2930 } // extern "C" 2958 } // extern "C"
2931 } // namespace libyuv 2959 } // namespace libyuv
2932 #endif 2960 #endif
OLDNEW
« no previous file with comments | « source/row_gcc.cc ('k') | source/row_neon64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698