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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 } | 970 } |
971 #endif | 971 #endif |
972 #if defined(HAS_ARGBTORGB565DITHERROW_NEON) | 972 #if defined(HAS_ARGBTORGB565DITHERROW_NEON) |
973 if (TestCpuFlag(kCpuHasNEON)) { | 973 if (TestCpuFlag(kCpuHasNEON)) { |
974 ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_NEON; | 974 ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_NEON; |
975 if (IS_ALIGNED(width, 8)) { | 975 if (IS_ALIGNED(width, 8)) { |
976 ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_NEON; | 976 ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_NEON; |
977 } | 977 } |
978 } | 978 } |
979 #endif | 979 #endif |
| 980 #if defined(HAS_ARGBTORGB565DITHERROW_MSA) |
| 981 if (TestCpuFlag(kCpuHasMSA)) { |
| 982 ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_Any_MSA; |
| 983 if (IS_ALIGNED(width, 8)) { |
| 984 ARGBToRGB565DitherRow = ARGBToRGB565DitherRow_MSA; |
| 985 } |
| 986 } |
| 987 #endif |
| 988 |
980 for (y = 0; y < height; ++y) { | 989 for (y = 0; y < height; ++y) { |
981 ARGBToRGB565DitherRow(src_argb, dst_rgb565, | 990 ARGBToRGB565DitherRow(src_argb, dst_rgb565, |
982 *(uint32*)(dither4x4 + ((y & 3) << 2)), | 991 *(uint32*)(dither4x4 + ((y & 3) << 2)), |
983 width); /* NOLINT */ | 992 width); /* NOLINT */ |
984 src_argb += src_stride_argb; | 993 src_argb += src_stride_argb; |
985 dst_rgb565 += dst_stride_rgb565; | 994 dst_rgb565 += dst_stride_rgb565; |
986 } | 995 } |
987 return 0; | 996 return 0; |
988 } | 997 } |
989 | 998 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1397 src_argb += src_stride_argb; | 1406 src_argb += src_stride_argb; |
1398 dst_yj += dst_stride_yj; | 1407 dst_yj += dst_stride_yj; |
1399 } | 1408 } |
1400 return 0; | 1409 return 0; |
1401 } | 1410 } |
1402 | 1411 |
1403 #ifdef __cplusplus | 1412 #ifdef __cplusplus |
1404 } // extern "C" | 1413 } // extern "C" |
1405 } // namespace libyuv | 1414 } // namespace libyuv |
1406 #endif | 1415 #endif |
OLD | NEW |