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

Side by Side Diff: source/row_any.cc

Issue 2559693002: Add MSA optimized ARGB Attenuate/RGB565/Shuffle/Shader/Gray/Sepia row functions (Closed)
Patch Set: Created 4 years 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
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 #endif 495 #endif
496 #ifdef HAS_ARGBATTENUATEROW_AVX2 496 #ifdef HAS_ARGBATTENUATEROW_AVX2
497 ANY11(ARGBAttenuateRow_Any_AVX2, ARGBAttenuateRow_AVX2, 0, 4, 4, 7) 497 ANY11(ARGBAttenuateRow_Any_AVX2, ARGBAttenuateRow_AVX2, 0, 4, 4, 7)
498 #endif 498 #endif
499 #ifdef HAS_ARGBUNATTENUATEROW_AVX2 499 #ifdef HAS_ARGBUNATTENUATEROW_AVX2
500 ANY11(ARGBUnattenuateRow_Any_AVX2, ARGBUnattenuateRow_AVX2, 0, 4, 4, 7) 500 ANY11(ARGBUnattenuateRow_Any_AVX2, ARGBUnattenuateRow_AVX2, 0, 4, 4, 7)
501 #endif 501 #endif
502 #ifdef HAS_ARGBATTENUATEROW_NEON 502 #ifdef HAS_ARGBATTENUATEROW_NEON
503 ANY11(ARGBAttenuateRow_Any_NEON, ARGBAttenuateRow_NEON, 0, 4, 4, 7) 503 ANY11(ARGBAttenuateRow_Any_NEON, ARGBAttenuateRow_NEON, 0, 4, 4, 7)
504 #endif 504 #endif
505 #ifdef HAS_ARGBATTENUATEROW_MSA
506 ANY11(ARGBAttenuateRow_Any_MSA, ARGBAttenuateRow_MSA, 0, 4, 4, 7)
507 #endif
505 #ifdef HAS_ARGBEXTRACTALPHAROW_SSE2 508 #ifdef HAS_ARGBEXTRACTALPHAROW_SSE2
506 ANY11(ARGBExtractAlphaRow_Any_SSE2, ARGBExtractAlphaRow_SSE2, 0, 4, 1, 7) 509 ANY11(ARGBExtractAlphaRow_Any_SSE2, ARGBExtractAlphaRow_SSE2, 0, 4, 1, 7)
507 #endif 510 #endif
508 #ifdef HAS_ARGBEXTRACTALPHAROW_AVX2 511 #ifdef HAS_ARGBEXTRACTALPHAROW_AVX2
509 ANY11(ARGBExtractAlphaRow_Any_AVX2, ARGBExtractAlphaRow_AVX2, 0, 4, 1, 32) 512 ANY11(ARGBExtractAlphaRow_Any_AVX2, ARGBExtractAlphaRow_AVX2, 0, 4, 1, 32)
510 #endif 513 #endif
511 #ifdef HAS_ARGBEXTRACTALPHAROW_NEON 514 #ifdef HAS_ARGBEXTRACTALPHAROW_NEON
512 ANY11(ARGBExtractAlphaRow_Any_NEON, ARGBExtractAlphaRow_NEON, 0, 4, 1, 15) 515 ANY11(ARGBExtractAlphaRow_Any_NEON, ARGBExtractAlphaRow_NEON, 0, 4, 1, 15)
513 #endif 516 #endif
514 #undef ANY11 517 #undef ANY11
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 7) 578 7)
576 #endif 579 #endif
577 #if defined(HAS_ARGBTORGB565DITHERROW_NEON) 580 #if defined(HAS_ARGBTORGB565DITHERROW_NEON)
578 ANY11P(ARGBToRGB565DitherRow_Any_NEON, 581 ANY11P(ARGBToRGB565DitherRow_Any_NEON,
579 ARGBToRGB565DitherRow_NEON, 582 ARGBToRGB565DitherRow_NEON,
580 const uint32, 583 const uint32,
581 4, 584 4,
582 2, 585 2,
583 7) 586 7)
584 #endif 587 #endif
588 #if defined(HAS_ARGBTORGB565DITHERROW_MSA)
589 ANY11P(ARGBToRGB565DitherRow_Any_MSA,
590 ARGBToRGB565DitherRow_MSA,
591 const uint32,
592 4,
593 2,
594 7)
595 #endif
585 #ifdef HAS_ARGBSHUFFLEROW_SSE2 596 #ifdef HAS_ARGBSHUFFLEROW_SSE2
586 ANY11P(ARGBShuffleRow_Any_SSE2, ARGBShuffleRow_SSE2, const uint8*, 4, 4, 3) 597 ANY11P(ARGBShuffleRow_Any_SSE2, ARGBShuffleRow_SSE2, const uint8*, 4, 4, 3)
587 #endif 598 #endif
588 #ifdef HAS_ARGBSHUFFLEROW_SSSE3 599 #ifdef HAS_ARGBSHUFFLEROW_SSSE3
589 ANY11P(ARGBShuffleRow_Any_SSSE3, ARGBShuffleRow_SSSE3, const uint8*, 4, 4, 7) 600 ANY11P(ARGBShuffleRow_Any_SSSE3, ARGBShuffleRow_SSSE3, const uint8*, 4, 4, 7)
590 #endif 601 #endif
591 #ifdef HAS_ARGBSHUFFLEROW_AVX2 602 #ifdef HAS_ARGBSHUFFLEROW_AVX2
592 ANY11P(ARGBShuffleRow_Any_AVX2, ARGBShuffleRow_AVX2, const uint8*, 4, 4, 15) 603 ANY11P(ARGBShuffleRow_Any_AVX2, ARGBShuffleRow_AVX2, const uint8*, 4, 4, 15)
593 #endif 604 #endif
594 #ifdef HAS_ARGBSHUFFLEROW_NEON 605 #ifdef HAS_ARGBSHUFFLEROW_NEON
595 ANY11P(ARGBShuffleRow_Any_NEON, ARGBShuffleRow_NEON, const uint8*, 4, 4, 3) 606 ANY11P(ARGBShuffleRow_Any_NEON, ARGBShuffleRow_NEON, const uint8*, 4, 4, 3)
596 #endif 607 #endif
608 #ifdef HAS_ARGBSHUFFLEROW_MSA
609 ANY11P(ARGBShuffleRow_Any_MSA, ARGBShuffleRow_MSA, const uint8*, 4, 4, 7)
610 #endif
597 #undef ANY11P 611 #undef ANY11P
598 612
599 // Any 1 to 1 with parameter and shorts. BPP measures in shorts. 613 // Any 1 to 1 with parameter and shorts. BPP measures in shorts.
600 #define ANY11P16(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK) \ 614 #define ANY11P16(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK) \
601 void NAMEANY(const uint16* src_ptr, uint16* dst_ptr, T shuffler, \ 615 void NAMEANY(const uint16* src_ptr, uint16* dst_ptr, T shuffler, \
602 int width) { \ 616 int width) { \
603 SIMD_ALIGNED(uint16 temp[32 * 2]); \ 617 SIMD_ALIGNED(uint16 temp[32 * 2]); \
604 memset(temp, 0, 64); /* for msan */ \ 618 memset(temp, 0, 64); /* for msan */ \
605 int r = width & MASK; \ 619 int r = width & MASK; \
606 int n = width & ~MASK; \ 620 int n = width & ~MASK; \
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 #endif 909 #endif
896 #ifdef HAS_UYVYTOUVROW_MSA 910 #ifdef HAS_UYVYTOUVROW_MSA
897 ANY12S(UYVYToUVRow_Any_MSA, UYVYToUVRow_MSA, 1, 4, 31) 911 ANY12S(UYVYToUVRow_Any_MSA, UYVYToUVRow_MSA, 1, 4, 31)
898 #endif 912 #endif
899 #undef ANY12S 913 #undef ANY12S
900 914
901 #ifdef __cplusplus 915 #ifdef __cplusplus
902 } // extern "C" 916 } // extern "C"
903 } // namespace libyuv 917 } // namespace libyuv
904 #endif 918 #endif
OLDNEW
« no previous file with comments | « source/planar_functions.cc ('k') | source/row_msa.cc » ('j') | source/row_msa.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698