OLD | NEW |
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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 } | 546 } |
547 #endif | 547 #endif |
548 #if defined(HAS_I422TOYUY2ROW_NEON) | 548 #if defined(HAS_I422TOYUY2ROW_NEON) |
549 if (TestCpuFlag(kCpuHasNEON)) { | 549 if (TestCpuFlag(kCpuHasNEON)) { |
550 I422ToYUY2Row = I422ToYUY2Row_Any_NEON; | 550 I422ToYUY2Row = I422ToYUY2Row_Any_NEON; |
551 if (IS_ALIGNED(width, 16)) { | 551 if (IS_ALIGNED(width, 16)) { |
552 I422ToYUY2Row = I422ToYUY2Row_NEON; | 552 I422ToYUY2Row = I422ToYUY2Row_NEON; |
553 } | 553 } |
554 } | 554 } |
555 #endif | 555 #endif |
| 556 #if defined(HAS_I422TOYUY2ROW_MSA) |
| 557 if (TestCpuFlag(kCpuHasMSA)) { |
| 558 I422ToYUY2Row = I422ToYUY2Row_Any_MSA; |
| 559 if (IS_ALIGNED(width, 32)) { |
| 560 I422ToYUY2Row = I422ToYUY2Row_MSA; |
| 561 } |
| 562 } |
| 563 #endif |
556 | 564 |
557 { | 565 { |
558 // Allocate a rows of yuv. | 566 // Allocate a rows of yuv. |
559 align_buffer_64(row_y, ((width + 63) & ~63) * 2); | 567 align_buffer_64(row_y, ((width + 63) & ~63) * 2); |
560 uint8* row_u = row_y + ((width + 63) & ~63); | 568 uint8* row_u = row_y + ((width + 63) & ~63); |
561 uint8* row_v = row_u + ((width + 63) & ~63) / 2; | 569 uint8* row_v = row_u + ((width + 63) & ~63) / 2; |
562 | 570 |
563 for (y = 0; y < height; ++y) { | 571 for (y = 0; y < height; ++y) { |
564 ARGBToUVRow(src_argb, 0, row_u, row_v, width); | 572 ARGBToUVRow(src_argb, 0, row_u, row_v, width); |
565 ARGBToYRow(src_argb, row_y, width); | 573 ARGBToYRow(src_argb, row_y, width); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 } | 656 } |
649 #endif | 657 #endif |
650 #if defined(HAS_I422TOUYVYROW_NEON) | 658 #if defined(HAS_I422TOUYVYROW_NEON) |
651 if (TestCpuFlag(kCpuHasNEON)) { | 659 if (TestCpuFlag(kCpuHasNEON)) { |
652 I422ToUYVYRow = I422ToUYVYRow_Any_NEON; | 660 I422ToUYVYRow = I422ToUYVYRow_Any_NEON; |
653 if (IS_ALIGNED(width, 16)) { | 661 if (IS_ALIGNED(width, 16)) { |
654 I422ToUYVYRow = I422ToUYVYRow_NEON; | 662 I422ToUYVYRow = I422ToUYVYRow_NEON; |
655 } | 663 } |
656 } | 664 } |
657 #endif | 665 #endif |
| 666 #if defined(HAS_I422TOUYVYROW_MSA) |
| 667 if (TestCpuFlag(kCpuHasMSA)) { |
| 668 I422ToUYVYRow = I422ToUYVYRow_Any_MSA; |
| 669 if (IS_ALIGNED(width, 32)) { |
| 670 I422ToUYVYRow = I422ToUYVYRow_MSA; |
| 671 } |
| 672 } |
| 673 #endif |
658 | 674 |
659 { | 675 { |
660 // Allocate a rows of yuv. | 676 // Allocate a rows of yuv. |
661 align_buffer_64(row_y, ((width + 63) & ~63) * 2); | 677 align_buffer_64(row_y, ((width + 63) & ~63) * 2); |
662 uint8* row_u = row_y + ((width + 63) & ~63); | 678 uint8* row_u = row_y + ((width + 63) & ~63); |
663 uint8* row_v = row_u + ((width + 63) & ~63) / 2; | 679 uint8* row_v = row_u + ((width + 63) & ~63) / 2; |
664 | 680 |
665 for (y = 0; y < height; ++y) { | 681 for (y = 0; y < height; ++y) { |
666 ARGBToUVRow(src_argb, 0, row_u, row_v, width); | 682 ARGBToUVRow(src_argb, 0, row_u, row_v, width); |
667 ARGBToYRow(src_argb, row_y, width); | 683 ARGBToYRow(src_argb, row_y, width); |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 src_argb += src_stride_argb; | 1293 src_argb += src_stride_argb; |
1278 dst_yj += dst_stride_yj; | 1294 dst_yj += dst_stride_yj; |
1279 } | 1295 } |
1280 return 0; | 1296 return 0; |
1281 } | 1297 } |
1282 | 1298 |
1283 #ifdef __cplusplus | 1299 #ifdef __cplusplus |
1284 } // extern "C" | 1300 } // extern "C" |
1285 } // namespace libyuv | 1301 } // namespace libyuv |
1286 #endif | 1302 #endif |
OLD | NEW |