OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2013 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb, | 869 void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb, |
870 ptrdiff_t src_stride, int dst_width, int source_y_fraction) = | 870 ptrdiff_t src_stride, int dst_width, int source_y_fraction) = |
871 InterpolateRow_C; | 871 InterpolateRow_C; |
872 const int max_y = (src_height > 1) ? ((src_height - 1) << 16) - 1 : 0; | 872 const int max_y = (src_height > 1) ? ((src_height - 1) << 16) - 1 : 0; |
873 int j; | 873 int j; |
874 assert(bpp >= 1 && bpp <= 4); | 874 assert(bpp >= 1 && bpp <= 4); |
875 assert(src_height != 0); | 875 assert(src_height != 0); |
876 assert(dst_width > 0); | 876 assert(dst_width > 0); |
877 assert(dst_height > 0); | 877 assert(dst_height > 0); |
878 src_argb += (x >> 16) * bpp; | 878 src_argb += (x >> 16) * bpp; |
879 #if defined(HAS_INTERPOLATEROW_SSE2) | |
880 if (TestCpuFlag(kCpuHasSSE2)) { | |
881 InterpolateRow = InterpolateRow_Any_SSE2; | |
882 if (IS_ALIGNED(dst_width_bytes, 16)) { | |
883 InterpolateRow = InterpolateRow_SSE2; | |
884 } | |
885 } | |
886 #endif | |
887 #if defined(HAS_INTERPOLATEROW_SSSE3) | 879 #if defined(HAS_INTERPOLATEROW_SSSE3) |
888 if (TestCpuFlag(kCpuHasSSSE3)) { | 880 if (TestCpuFlag(kCpuHasSSSE3)) { |
889 InterpolateRow = InterpolateRow_Any_SSSE3; | 881 InterpolateRow = InterpolateRow_Any_SSSE3; |
890 if (IS_ALIGNED(dst_width_bytes, 16)) { | 882 if (IS_ALIGNED(dst_width_bytes, 16)) { |
891 InterpolateRow = InterpolateRow_SSSE3; | 883 InterpolateRow = InterpolateRow_SSSE3; |
892 } | 884 } |
893 } | 885 } |
894 #endif | 886 #endif |
895 #if defined(HAS_INTERPOLATEROW_AVX2) | 887 #if defined(HAS_INTERPOLATEROW_AVX2) |
896 if (TestCpuFlag(kCpuHasAVX2)) { | 888 if (TestCpuFlag(kCpuHasAVX2)) { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 *dx = -*dx; | 1120 *dx = -*dx; |
1129 // src_width = -src_width; // Caller must do this. | 1121 // src_width = -src_width; // Caller must do this. |
1130 } | 1122 } |
1131 } | 1123 } |
1132 #undef CENTERSTART | 1124 #undef CENTERSTART |
1133 | 1125 |
1134 #ifdef __cplusplus | 1126 #ifdef __cplusplus |
1135 } // extern "C" | 1127 } // extern "C" |
1136 } // namespace libyuv | 1128 } // namespace libyuv |
1137 #endif | 1129 #endif |
OLD | NEW |