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

Side by Side Diff: source/scale.cc

Issue 1513183004: use rounding in scaledown by 2 (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: corrected version to 1554 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/planar_functions.cc ('k') | source/scale_any.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_Any_NEON : 54 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_Any_NEON :
55 (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_NEON : 55 (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_NEON :
56 ScaleRowDown2Box_Any_NEON); 56 ScaleRowDown2Box_Any_NEON);
57 if (IS_ALIGNED(dst_width, 16)) { 57 if (IS_ALIGNED(dst_width, 16)) {
58 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_NEON : 58 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_NEON :
59 (filtering == kFilterLinear ? ScaleRowDown2Linear_NEON : 59 (filtering == kFilterLinear ? ScaleRowDown2Linear_NEON :
60 ScaleRowDown2Box_NEON); 60 ScaleRowDown2Box_NEON);
61 } 61 }
62 } 62 }
63 #endif 63 #endif
64 #if defined(HAS_SCALEROWDOWN2_SSE2) 64 #if defined(HAS_SCALEROWDOWN2_SSSE3)
65 if (TestCpuFlag(kCpuHasSSE2)) { 65 if (TestCpuFlag(kCpuHasSSSE3)) {
66 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_Any_SSE2 : 66 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_Any_SSSE3 :
67 (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_SSE2 : 67 (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_SSSE3 :
68 ScaleRowDown2Box_Any_SSE2); 68 ScaleRowDown2Box_Any_SSSE3);
69 if (IS_ALIGNED(dst_width, 16)) { 69 if (IS_ALIGNED(dst_width, 16)) {
70 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_SSE2 : 70 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_SSSE3 :
71 (filtering == kFilterLinear ? ScaleRowDown2Linear_SSE2 : 71 (filtering == kFilterLinear ? ScaleRowDown2Linear_SSSE3 :
72 ScaleRowDown2Box_SSE2); 72 ScaleRowDown2Box_SSSE3);
73 } 73 }
74 } 74 }
75 #endif 75 #endif
76 #if defined(HAS_SCALEROWDOWN2_AVX2) 76 #if defined(HAS_SCALEROWDOWN2_AVX2)
77 if (TestCpuFlag(kCpuHasAVX2)) { 77 if (TestCpuFlag(kCpuHasAVX2)) {
78 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_Any_AVX2 : 78 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_Any_AVX2 :
79 (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_AVX2 : 79 (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_AVX2 :
80 ScaleRowDown2Box_Any_AVX2); 80 ScaleRowDown2Box_Any_AVX2);
81 if (IS_ALIGNED(dst_width, 32)) { 81 if (IS_ALIGNED(dst_width, 32)) {
82 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_AVX2 : 82 ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_AVX2 :
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 dst_u, dst_halfwidth, 1680 dst_u, dst_halfwidth,
1681 dst_v, dst_halfwidth, 1681 dst_v, dst_halfwidth,
1682 dst_width, aheight, 1682 dst_width, aheight,
1683 interpolate ? kFilterBox : kFilterNone); 1683 interpolate ? kFilterBox : kFilterNone);
1684 } 1684 }
1685 1685
1686 #ifdef __cplusplus 1686 #ifdef __cplusplus
1687 } // extern "C" 1687 } // extern "C"
1688 } // namespace libyuv 1688 } // namespace libyuv
1689 #endif 1689 #endif
OLDNEW
« no previous file with comments | « source/planar_functions.cc ('k') | source/scale_any.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698