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

Side by Side Diff: source/scale.cc

Issue 1535493002: roll to same version of chromium as head webrtc (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: use var for interpolant on neon armv7 Created 5 years 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/row_win.cc ('k') | source/scale_argb.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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 void (*ScaleFilterCols)(uint8* dst_ptr, const uint8* src_ptr, 868 void (*ScaleFilterCols)(uint8* dst_ptr, const uint8* src_ptr,
869 int dst_width, int x, int dx) = 869 int dst_width, int x, int dx) =
870 (src_width >= 32768) ? ScaleFilterCols64_C : ScaleFilterCols_C; 870 (src_width >= 32768) ? ScaleFilterCols64_C : ScaleFilterCols_C;
871 void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr, 871 void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr,
872 ptrdiff_t src_stride, int dst_width, int source_y_fraction) = 872 ptrdiff_t src_stride, int dst_width, int source_y_fraction) =
873 InterpolateRow_C; 873 InterpolateRow_C;
874 ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, 874 ScaleSlope(src_width, src_height, dst_width, dst_height, filtering,
875 &x, &y, &dx, &dy); 875 &x, &y, &dx, &dy);
876 src_width = Abs(src_width); 876 src_width = Abs(src_width);
877 877
878 #if defined(HAS_INTERPOLATEROW_SSE2)
879 if (TestCpuFlag(kCpuHasSSE2)) {
880 InterpolateRow = InterpolateRow_Any_SSE2;
881 if (IS_ALIGNED(src_width, 16)) {
882 InterpolateRow = InterpolateRow_SSE2;
883 }
884 }
885 #endif
886 #if defined(HAS_INTERPOLATEROW_SSSE3) 878 #if defined(HAS_INTERPOLATEROW_SSSE3)
887 if (TestCpuFlag(kCpuHasSSSE3)) { 879 if (TestCpuFlag(kCpuHasSSSE3)) {
888 InterpolateRow = InterpolateRow_Any_SSSE3; 880 InterpolateRow = InterpolateRow_Any_SSSE3;
889 if (IS_ALIGNED(src_width, 16)) { 881 if (IS_ALIGNED(src_width, 16)) {
890 InterpolateRow = InterpolateRow_SSSE3; 882 InterpolateRow = InterpolateRow_SSSE3;
891 } 883 }
892 } 884 }
893 #endif 885 #endif
894 #if defined(HAS_INTERPOLATEROW_AVX2) 886 #if defined(HAS_INTERPOLATEROW_AVX2)
895 if (TestCpuFlag(kCpuHasAVX2)) { 887 if (TestCpuFlag(kCpuHasAVX2)) {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr, 1057 void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr,
1066 ptrdiff_t src_stride, int dst_width, int source_y_fraction) = 1058 ptrdiff_t src_stride, int dst_width, int source_y_fraction) =
1067 InterpolateRow_C; 1059 InterpolateRow_C;
1068 void (*ScaleFilterCols)(uint8* dst_ptr, const uint8* src_ptr, 1060 void (*ScaleFilterCols)(uint8* dst_ptr, const uint8* src_ptr,
1069 int dst_width, int x, int dx) = 1061 int dst_width, int x, int dx) =
1070 filtering ? ScaleFilterCols_C : ScaleCols_C; 1062 filtering ? ScaleFilterCols_C : ScaleCols_C;
1071 ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, 1063 ScaleSlope(src_width, src_height, dst_width, dst_height, filtering,
1072 &x, &y, &dx, &dy); 1064 &x, &y, &dx, &dy);
1073 src_width = Abs(src_width); 1065 src_width = Abs(src_width);
1074 1066
1075 #if defined(HAS_INTERPOLATEROW_SSE2)
1076 if (TestCpuFlag(kCpuHasSSE2)) {
1077 InterpolateRow = InterpolateRow_Any_SSE2;
1078 if (IS_ALIGNED(dst_width, 16)) {
1079 InterpolateRow = InterpolateRow_SSE2;
1080 }
1081 }
1082 #endif
1083 #if defined(HAS_INTERPOLATEROW_SSSE3) 1067 #if defined(HAS_INTERPOLATEROW_SSSE3)
1084 if (TestCpuFlag(kCpuHasSSSE3)) { 1068 if (TestCpuFlag(kCpuHasSSSE3)) {
1085 InterpolateRow = InterpolateRow_Any_SSSE3; 1069 InterpolateRow = InterpolateRow_Any_SSSE3;
1086 if (IS_ALIGNED(dst_width, 16)) { 1070 if (IS_ALIGNED(dst_width, 16)) {
1087 InterpolateRow = InterpolateRow_SSSE3; 1071 InterpolateRow = InterpolateRow_SSSE3;
1088 } 1072 }
1089 } 1073 }
1090 #endif 1074 #endif
1091 #if defined(HAS_INTERPOLATEROW_AVX2) 1075 #if defined(HAS_INTERPOLATEROW_AVX2)
1092 if (TestCpuFlag(kCpuHasAVX2)) { 1076 if (TestCpuFlag(kCpuHasAVX2)) {
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 dst_u, dst_halfwidth, 1664 dst_u, dst_halfwidth,
1681 dst_v, dst_halfwidth, 1665 dst_v, dst_halfwidth,
1682 dst_width, aheight, 1666 dst_width, aheight,
1683 interpolate ? kFilterBox : kFilterNone); 1667 interpolate ? kFilterBox : kFilterNone);
1684 } 1668 }
1685 1669
1686 #ifdef __cplusplus 1670 #ifdef __cplusplus
1687 } // extern "C" 1671 } // extern "C"
1688 } // namespace libyuv 1672 } // namespace libyuv
1689 #endif 1673 #endif
OLDNEW
« no previous file with comments | « source/row_win.cc ('k') | source/scale_argb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698