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

Side by Side Diff: source/convert_argb.cc

Issue 1677633002: rename MIPS_DSPR2 to DSPR2 for consistency (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: git cl try Created 4 years, 10 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/convert.cc ('k') | source/convert_from.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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 #endif 86 #endif
87 #if defined(HAS_I422TOARGBROW_NEON) 87 #if defined(HAS_I422TOARGBROW_NEON)
88 if (TestCpuFlag(kCpuHasNEON)) { 88 if (TestCpuFlag(kCpuHasNEON)) {
89 I422ToARGBRow = I422ToARGBRow_Any_NEON; 89 I422ToARGBRow = I422ToARGBRow_Any_NEON;
90 if (IS_ALIGNED(width, 8)) { 90 if (IS_ALIGNED(width, 8)) {
91 I422ToARGBRow = I422ToARGBRow_NEON; 91 I422ToARGBRow = I422ToARGBRow_NEON;
92 } 92 }
93 } 93 }
94 #endif 94 #endif
95 #if defined(HAS_I422TOARGBROW_MIPS_DSPR2) 95 #if defined(HAS_I422TOARGBROW_DSPR2)
96 if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) && 96 if (TestCpuFlag(kCpuHasDSPR2) && IS_ALIGNED(width, 4) &&
97 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) && 97 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
98 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) && 98 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
99 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) && 99 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
100 IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) { 100 IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {
101 I422ToARGBRow = I422ToARGBRow_MIPS_DSPR2; 101 I422ToARGBRow = I422ToARGBRow_DSPR2;
102 } 102 }
103 #endif 103 #endif
104 104
105 for (y = 0; y < height; ++y) { 105 for (y = 0; y < height; ++y) {
106 I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); 106 I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
107 dst_argb += dst_stride_argb; 107 dst_argb += dst_stride_argb;
108 src_y += src_stride_y; 108 src_y += src_stride_y;
109 if (y & 1) { 109 if (y & 1) {
110 src_u += src_stride_u; 110 src_u += src_stride_u;
111 src_v += src_stride_v; 111 src_v += src_stride_v;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 255 }
256 #endif 256 #endif
257 #if defined(HAS_I422TOARGBROW_NEON) 257 #if defined(HAS_I422TOARGBROW_NEON)
258 if (TestCpuFlag(kCpuHasNEON)) { 258 if (TestCpuFlag(kCpuHasNEON)) {
259 I422ToARGBRow = I422ToARGBRow_Any_NEON; 259 I422ToARGBRow = I422ToARGBRow_Any_NEON;
260 if (IS_ALIGNED(width, 8)) { 260 if (IS_ALIGNED(width, 8)) {
261 I422ToARGBRow = I422ToARGBRow_NEON; 261 I422ToARGBRow = I422ToARGBRow_NEON;
262 } 262 }
263 } 263 }
264 #endif 264 #endif
265 #if defined(HAS_I422TOARGBROW_MIPS_DSPR2) 265 #if defined(HAS_I422TOARGBROW_DSPR2)
266 if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) && 266 if (TestCpuFlag(kCpuHasDSPR2) && IS_ALIGNED(width, 4) &&
267 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) && 267 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
268 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) && 268 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
269 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) && 269 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
270 IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) { 270 IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {
271 I422ToARGBRow = I422ToARGBRow_MIPS_DSPR2; 271 I422ToARGBRow = I422ToARGBRow_DSPR2;
272 } 272 }
273 #endif 273 #endif
274 274
275 for (y = 0; y < height; ++y) { 275 for (y = 0; y < height; ++y) {
276 I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width); 276 I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
277 dst_argb += dst_stride_argb; 277 dst_argb += dst_stride_argb;
278 src_y += src_stride_y; 278 src_y += src_stride_y;
279 src_u += src_stride_u; 279 src_u += src_stride_u;
280 src_v += src_stride_v; 280 src_v += src_stride_v;
281 } 281 }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } 600 }
601 #endif 601 #endif
602 #if defined(HAS_I422ALPHATOARGBROW_NEON) 602 #if defined(HAS_I422ALPHATOARGBROW_NEON)
603 if (TestCpuFlag(kCpuHasNEON)) { 603 if (TestCpuFlag(kCpuHasNEON)) {
604 I422AlphaToARGBRow = I422AlphaToARGBRow_Any_NEON; 604 I422AlphaToARGBRow = I422AlphaToARGBRow_Any_NEON;
605 if (IS_ALIGNED(width, 8)) { 605 if (IS_ALIGNED(width, 8)) {
606 I422AlphaToARGBRow = I422AlphaToARGBRow_NEON; 606 I422AlphaToARGBRow = I422AlphaToARGBRow_NEON;
607 } 607 }
608 } 608 }
609 #endif 609 #endif
610 #if defined(HAS_I422ALPHATOARGBROW_MIPS_DSPR2) 610 #if defined(HAS_I422ALPHATOARGBROW_DSPR2)
611 if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) && 611 if (TestCpuFlag(kCpuHasDSPR2) && IS_ALIGNED(width, 4) &&
612 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) && 612 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
613 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) && 613 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
614 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) && 614 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
615 IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) { 615 IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {
616 I422AlphaToARGBRow = I422AlphaToARGBRow_MIPS_DSPR2; 616 I422AlphaToARGBRow = I422AlphaToARGBRow_DSPR2;
617 } 617 }
618 #endif 618 #endif
619 #if defined(HAS_ARGBATTENUATEROW_SSSE3) 619 #if defined(HAS_ARGBATTENUATEROW_SSSE3)
620 if (TestCpuFlag(kCpuHasSSSE3)) { 620 if (TestCpuFlag(kCpuHasSSSE3)) {
621 ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3; 621 ARGBAttenuateRow = ARGBAttenuateRow_Any_SSSE3;
622 if (IS_ALIGNED(width, 4)) { 622 if (IS_ALIGNED(width, 4)) {
623 ARGBAttenuateRow = ARGBAttenuateRow_SSSE3; 623 ARGBAttenuateRow = ARGBAttenuateRow_SSSE3;
624 } 624 }
625 } 625 }
626 #endif 626 #endif
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 src_uyvy += src_stride_uyvy; 1446 src_uyvy += src_stride_uyvy;
1447 dst_argb += dst_stride_argb; 1447 dst_argb += dst_stride_argb;
1448 } 1448 }
1449 return 0; 1449 return 0;
1450 } 1450 }
1451 1451
1452 #ifdef __cplusplus 1452 #ifdef __cplusplus
1453 } // extern "C" 1453 } // extern "C"
1454 } // namespace libyuv 1454 } // namespace libyuv
1455 #endif 1455 #endif
OLDNEW
« no previous file with comments | « source/convert.cc ('k') | source/convert_from.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698