OLD | NEW |
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 Loading... |
85 : ScaleARGBRowDown2Box_Any_NEON); | 85 : ScaleARGBRowDown2Box_Any_NEON); |
86 if (IS_ALIGNED(dst_width, 8)) { | 86 if (IS_ALIGNED(dst_width, 8)) { |
87 ScaleARGBRowDown2 = | 87 ScaleARGBRowDown2 = |
88 filtering == kFilterNone | 88 filtering == kFilterNone |
89 ? ScaleARGBRowDown2_NEON | 89 ? ScaleARGBRowDown2_NEON |
90 : (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_NEON | 90 : (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_NEON |
91 : ScaleARGBRowDown2Box_NEON); | 91 : ScaleARGBRowDown2Box_NEON); |
92 } | 92 } |
93 } | 93 } |
94 #endif | 94 #endif |
| 95 #if defined(HAS_SCALEARGBROWDOWN2_MSA) |
| 96 if (TestCpuFlag(kCpuHasMSA)) { |
| 97 ScaleARGBRowDown2 = |
| 98 filtering == kFilterNone |
| 99 ? ScaleARGBRowDown2_Any_MSA |
| 100 : (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_Any_MSA |
| 101 : ScaleARGBRowDown2Box_Any_MSA); |
| 102 if (IS_ALIGNED(dst_width, 4)) { |
| 103 ScaleARGBRowDown2 = |
| 104 filtering == kFilterNone |
| 105 ? ScaleARGBRowDown2_MSA |
| 106 : (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_MSA |
| 107 : ScaleARGBRowDown2Box_MSA); |
| 108 } |
| 109 } |
| 110 #endif |
95 | 111 |
96 if (filtering == kFilterLinear) { | 112 if (filtering == kFilterLinear) { |
97 src_stride = 0; | 113 src_stride = 0; |
98 } | 114 } |
99 for (j = 0; j < dst_height; ++j) { | 115 for (j = 0; j < dst_height; ++j) { |
100 ScaleARGBRowDown2(src_argb, src_stride, dst_argb, dst_width); | 116 ScaleARGBRowDown2(src_argb, src_stride, dst_argb, dst_width); |
101 src_argb += row_stride; | 117 src_argb += row_stride; |
102 dst_argb += dst_stride; | 118 dst_argb += dst_stride; |
103 } | 119 } |
104 } | 120 } |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 #if defined(HAS_SCALEARGBROWDOWNEVEN_NEON) | 212 #if defined(HAS_SCALEARGBROWDOWNEVEN_NEON) |
197 if (TestCpuFlag(kCpuHasNEON)) { | 213 if (TestCpuFlag(kCpuHasNEON)) { |
198 ScaleARGBRowDownEven = filtering ? ScaleARGBRowDownEvenBox_Any_NEON | 214 ScaleARGBRowDownEven = filtering ? ScaleARGBRowDownEvenBox_Any_NEON |
199 : ScaleARGBRowDownEven_Any_NEON; | 215 : ScaleARGBRowDownEven_Any_NEON; |
200 if (IS_ALIGNED(dst_width, 4)) { | 216 if (IS_ALIGNED(dst_width, 4)) { |
201 ScaleARGBRowDownEven = | 217 ScaleARGBRowDownEven = |
202 filtering ? ScaleARGBRowDownEvenBox_NEON : ScaleARGBRowDownEven_NEON; | 218 filtering ? ScaleARGBRowDownEvenBox_NEON : ScaleARGBRowDownEven_NEON; |
203 } | 219 } |
204 } | 220 } |
205 #endif | 221 #endif |
| 222 #if defined(HAS_SCALEARGBROWDOWNEVEN_MSA) |
| 223 if (TestCpuFlag(kCpuHasMSA)) { |
| 224 ScaleARGBRowDownEven = filtering ? ScaleARGBRowDownEvenBox_Any_MSA |
| 225 : ScaleARGBRowDownEven_Any_MSA; |
| 226 if (IS_ALIGNED(dst_width, 4)) { |
| 227 ScaleARGBRowDownEven = |
| 228 filtering ? ScaleARGBRowDownEvenBox_MSA : ScaleARGBRowDownEven_MSA; |
| 229 } |
| 230 } |
| 231 #endif |
206 | 232 |
207 if (filtering == kFilterLinear) { | 233 if (filtering == kFilterLinear) { |
208 src_stride = 0; | 234 src_stride = 0; |
209 } | 235 } |
210 for (j = 0; j < dst_height; ++j) { | 236 for (j = 0; j < dst_height; ++j) { |
211 ScaleARGBRowDownEven(src_argb, src_stride, col_step, dst_argb, dst_width); | 237 ScaleARGBRowDownEven(src_argb, src_stride, col_step, dst_argb, dst_width); |
212 src_argb += row_stride; | 238 src_argb += row_stride; |
213 dst_argb += dst_stride; | 239 dst_argb += dst_stride; |
214 } | 240 } |
215 } | 241 } |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 dst_stride_argb, dst_width, dst_height, clip_x, clip_y, | 948 dst_stride_argb, dst_width, dst_height, clip_x, clip_y, |
923 clip_width, clip_height, filtering); | 949 clip_width, clip_height, filtering); |
924 free(argb_buffer); | 950 free(argb_buffer); |
925 return r; | 951 return r; |
926 } | 952 } |
927 | 953 |
928 #ifdef __cplusplus | 954 #ifdef __cplusplus |
929 } // extern "C" | 955 } // extern "C" |
930 } // namespace libyuv | 956 } // namespace libyuv |
931 #endif | 957 #endif |
OLD | NEW |