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

Side by Side Diff: source/row_any.cc

Issue 2399143002: YUY2ToI422_Any_Neon clean up to not require 16 pixels (Closed)
Patch Set: Created 4 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/planar_functions.cc ('k') | no next file » | 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 2012 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2012 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 #define ANY12(NAMEANY, ANY_SIMD, UVSHIFT, BPP, DUVSHIFT, MASK) \ 707 #define ANY12(NAMEANY, ANY_SIMD, UVSHIFT, BPP, DUVSHIFT, MASK) \
708 void NAMEANY(const uint8* src_ptr, uint8* dst_u, uint8* dst_v, int width) {\ 708 void NAMEANY(const uint8* src_ptr, uint8* dst_u, uint8* dst_v, int width) {\
709 SIMD_ALIGNED(uint8 temp[128 * 3]); \ 709 SIMD_ALIGNED(uint8 temp[128 * 3]); \
710 memset(temp, 0, 128); /* for msan */ \ 710 memset(temp, 0, 128); /* for msan */ \
711 int r = width & MASK; \ 711 int r = width & MASK; \
712 int n = width & ~MASK; \ 712 int n = width & ~MASK; \
713 if (n > 0) { \ 713 if (n > 0) { \
714 ANY_SIMD(src_ptr, dst_u, dst_v, n); \ 714 ANY_SIMD(src_ptr, dst_u, dst_v, n); \
715 } \ 715 } \
716 memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \ 716 memcpy(temp, src_ptr + (n >> UVSHIFT) * BPP, SS(r, UVSHIFT) * BPP); \
717 /* repeat last 4 bytes for 422 subsampler */ \
718 if ((width & 1) && BPP == 4 && DUVSHIFT == 1) { \
719 memcpy(temp + SS(r, UVSHIFT) * BPP, \
720 temp + SS(r, UVSHIFT) * BPP - BPP, BPP); \
721 } \
722 /* repeat last 4 - 12 bytes for 411 subsampler */ \ 717 /* repeat last 4 - 12 bytes for 411 subsampler */ \
723 if (((width & 3) == 1) && BPP == 4 && DUVSHIFT == 2) { \ 718 if (((width & 3) == 1) && BPP == 4 && DUVSHIFT == 2) { \
724 memcpy(temp + SS(r, UVSHIFT) * BPP, \ 719 memcpy(temp + SS(r, UVSHIFT) * BPP, \
725 temp + SS(r, UVSHIFT) * BPP - BPP, BPP); \ 720 temp + SS(r, UVSHIFT) * BPP - BPP, BPP); \
726 memcpy(temp + SS(r, UVSHIFT) * BPP + BPP, \ 721 memcpy(temp + SS(r, UVSHIFT) * BPP + BPP, \
727 temp + SS(r, UVSHIFT) * BPP - BPP, BPP * 2); \ 722 temp + SS(r, UVSHIFT) * BPP - BPP, BPP * 2); \
728 } \ 723 } \
729 if (((width & 3) == 2) && BPP == 4 && DUVSHIFT == 2) { \ 724 if (((width & 3) == 2) && BPP == 4 && DUVSHIFT == 2) { \
730 memcpy(temp + SS(r, UVSHIFT) * BPP, \ 725 memcpy(temp + SS(r, UVSHIFT) * BPP, \
731 temp + SS(r, UVSHIFT) * BPP - BPP * 2, BPP * 2); \ 726 temp + SS(r, UVSHIFT) * BPP - BPP * 2, BPP * 2); \
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 #endif 847 #endif
853 #ifdef HAS_UYVYTOUVROW_NEON 848 #ifdef HAS_UYVYTOUVROW_NEON
854 ANY12S(UYVYToUVRow_Any_NEON, UYVYToUVRow_NEON, 1, 4, 15) 849 ANY12S(UYVYToUVRow_Any_NEON, UYVYToUVRow_NEON, 1, 4, 15)
855 #endif 850 #endif
856 #undef ANY12S 851 #undef ANY12S
857 852
858 #ifdef __cplusplus 853 #ifdef __cplusplus
859 } // extern "C" 854 } // extern "C"
860 } // namespace libyuv 855 } // namespace libyuv
861 #endif 856 #endif
OLDNEW
« no previous file with comments | « source/planar_functions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698