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

Side by Side Diff: source/row_any.cc

Issue 1995293002: Add ARGBExtractAlpha function (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 4 years, 7 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') | source/row_common.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 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } \ 509 } \
510 memcpy(temp, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \ 510 memcpy(temp, src_ptr + (n >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \
511 memcpy(temp + 128, dst_ptr + n * BPP, r * BPP); \ 511 memcpy(temp + 128, dst_ptr + n * BPP, r * BPP); \
512 ANY_SIMD(temp, temp + 128, MASK + 1); \ 512 ANY_SIMD(temp, temp + 128, MASK + 1); \
513 memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \ 513 memcpy(dst_ptr + n * BPP, temp + 128, r * BPP); \
514 } 514 }
515 515
516 #ifdef HAS_ARGBCOPYALPHAROW_AVX2 516 #ifdef HAS_ARGBCOPYALPHAROW_AVX2
517 ANY11B(ARGBCopyAlphaRow_Any_AVX2, ARGBCopyAlphaRow_AVX2, 0, 4, 4, 15) 517 ANY11B(ARGBCopyAlphaRow_Any_AVX2, ARGBCopyAlphaRow_AVX2, 0, 4, 4, 15)
518 #endif 518 #endif
519 #ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2 519 #ifdef HAS_ARGBCOPYALPHAROW_SSE2
fbarchard1 2016/05/25 01:45:11 good catch!
520 ANY11B(ARGBCopyAlphaRow_Any_SSE2, ARGBCopyAlphaRow_SSE2, 0, 4, 4, 7) 520 ANY11B(ARGBCopyAlphaRow_Any_SSE2, ARGBCopyAlphaRow_SSE2, 0, 4, 4, 7)
521 #endif 521 #endif
522 #ifdef HAS_ARGBEXTRACTALPHAROW_SSE2
523 ANY11B(ARGBExtractAlphaRow_Any_SSE2, ARGBExtractAlphaRow_SSE2, 0, 4, 1, 7)
fbarchard1 2016/05/25 01:45:11 I think ANY11B is the wrong function to use. Thes
magjed_chromium 2016/05/25 08:19:46 I see. Changed to ANY11 instead.
524 #endif
525 #ifdef HAS_ARGBEXTRACTALPHAROW_NEON
526 ANY11B(ARGBExtractAlphaRow_Any_NEON, ARGBExtractAlphaRow_NEON, 0, 4, 1, 7)
527 #endif
522 #ifdef HAS_ARGBCOPYYTOALPHAROW_AVX2 528 #ifdef HAS_ARGBCOPYYTOALPHAROW_AVX2
523 ANY11B(ARGBCopyYToAlphaRow_Any_AVX2, ARGBCopyYToAlphaRow_AVX2, 0, 1, 4, 15) 529 ANY11B(ARGBCopyYToAlphaRow_Any_AVX2, ARGBCopyYToAlphaRow_AVX2, 0, 1, 4, 15)
524 #endif 530 #endif
525 #ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2 531 #ifdef HAS_ARGBCOPYYTOALPHAROW_SSE2
526 ANY11B(ARGBCopyYToAlphaRow_Any_SSE2, ARGBCopyYToAlphaRow_SSE2, 0, 1, 4, 7) 532 ANY11B(ARGBCopyYToAlphaRow_Any_SSE2, ARGBCopyYToAlphaRow_SSE2, 0, 1, 4, 7)
527 #endif 533 #endif
528 #undef ANY11B 534 #undef ANY11B
529 535
530 // Any 1 to 1 with parameter. 536 // Any 1 to 1 with parameter.
531 #define ANY11P(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK) \ 537 #define ANY11P(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK) \
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 #endif 815 #endif
810 #ifdef HAS_UYVYTOUVROW_NEON 816 #ifdef HAS_UYVYTOUVROW_NEON
811 ANY12S(UYVYToUVRow_Any_NEON, UYVYToUVRow_NEON, 1, 4, 15) 817 ANY12S(UYVYToUVRow_Any_NEON, UYVYToUVRow_NEON, 1, 4, 15)
812 #endif 818 #endif
813 #undef ANY12S 819 #undef ANY12S
814 820
815 #ifdef __cplusplus 821 #ifdef __cplusplus
816 } // extern "C" 822 } // extern "C"
817 } // namespace libyuv 823 } // namespace libyuv
818 #endif 824 #endif
OLDNEW
« no previous file with comments | « source/planar_functions.cc ('k') | source/row_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698