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

Side by Side Diff: src/opts/SkBitmapProcState_filter_neon.h

Issue 1212393002: add/fix copyrights (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 months 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 | « src/opts/SkBitmapProcState_arm_neon.cpp ('k') | src/opts/SkBitmapProcState_opts_none.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
4 * 3 *
5 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9
10 #include <arm_neon.h> 8 #include <arm_neon.h>
11 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
12 10
13 /* 11 /*
14 * Filter_32_opaque 12 * Filter_32_opaque
15 * 13 *
16 * There is no hard-n-fast rule that the filtering must produce 14 * There is no hard-n-fast rule that the filtering must produce
17 * exact results for the color components, but if the 4 incoming colors are 15 * exact results for the color components, but if the 4 incoming colors are
18 * all opaque, then the output color must also be opaque. Subsequent parts of 16 * all opaque, then the output color must also be opaque. Subsequent parts of
19 * the drawing pipeline may rely on this (e.g. which blitrow proc to use). 17 * the drawing pipeline may rely on this (e.g. which blitrow proc to use).
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 tmp = vmla_u16(tmp, vget_low_u16(tmp1), v16_x); // tmp += a00 * (16-x) 85 tmp = vmla_u16(tmp, vget_low_u16(tmp1), v16_x); // tmp += a00 * (16-x)
88 tmp = vmla_u16(tmp, vget_low_u16(tmp2), v16_x); // tmp += a10 * (16-x) 86 tmp = vmla_u16(tmp, vget_low_u16(tmp2), v16_x); // tmp += a10 * (16-x)
89 87
90 vscale = vdup_n_u16(scale); // duplicate scale 88 vscale = vdup_n_u16(scale); // duplicate scale
91 tmp = vshr_n_u16(tmp, 8); // shift down result by 8 89 tmp = vshr_n_u16(tmp, 8); // shift down result by 8
92 tmp = vmul_u16(tmp, vscale); // multiply result by scale 90 tmp = vmul_u16(tmp, vscale); // multiply result by scale
93 91
94 vres = vshrn_n_u16(vcombine_u16(tmp, vcreate_u16(0)), 8); // shift down resu lt by 8 92 vres = vshrn_n_u16(vcombine_u16(tmp, vcreate_u16(0)), 8); // shift down resu lt by 8
95 vst1_lane_u32(dst, vreinterpret_u32_u8(vres), 0); // store result 93 vst1_lane_u32(dst, vreinterpret_u32_u8(vres), 0); // store result
96 } 94 }
OLDNEW
« no previous file with comments | « src/opts/SkBitmapProcState_arm_neon.cpp ('k') | src/opts/SkBitmapProcState_opts_none.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698