Lines Matching +full:test +full:. +full:rgb
1 // Copyright 2017 Google Inc. All Rights Reserved.
5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree.
10 // Utilities for processing transparent channel, NEON version.
12 // Author: Skal (pascal.massimino@gmail.com)
14 #include "./dsp.h"
18 #include "./neon.h"
26 const uint8x8_t alpha = (V).val[(ALPHA)]; \
27 const uint16x8_t r1 = vmull_u8((V).val[1], alpha); \
28 const uint16x8_t g1 = vmull_u8((V).val[2], alpha); \
29 const uint16x8_t b1 = vmull_u8((V).val[(OTHER)], alpha); \
37 (V).val[1] = vshrn_n_u16(r3, 8); \
38 (V).val[2] = vshrn_n_u16(g3, 8); \
39 (V).val[(OTHER)] = vshrn_n_u16(b3, 8); \
50 // load aaaa...|rrrr...|gggg...|bbbb... in ApplyAlphaMultiply_NEON()
62 // Finish with left-overs. in ApplyAlphaMultiply_NEON()
64 uint8_t* const rgb = rgba + (alpha_first ? 1 : 0); in ApplyAlphaMultiply_NEON() local
69 rgb[4 * i + 0] = PREMULTIPLY(rgb[4 * i + 0], mult); in ApplyAlphaMultiply_NEON()
70 rgb[4 * i + 1] = PREMULTIPLY(rgb[4 * i + 1], mult); in ApplyAlphaMultiply_NEON()
71 rgb[4 * i + 2] = PREMULTIPLY(rgb[4 * i + 2], mult); in ApplyAlphaMultiply_NEON()
92 // mode). So we must be sure dst[4*i + 8 - 1] is writable for the store. in DispatchAlpha_NEON()
93 // Hence the test with 'width - 1' instead of just 'width'. in DispatchAlpha_NEON()
97 rgbX.val[0] = alphas; in DispatchAlpha_NEON()
119 uint8x8x4_t greens; // leave A/R/B channels zero'd. in DispatchAlphaToGreen_NEON()
120 greens.val[0] = vdup_n_u8(0); in DispatchAlphaToGreen_NEON()
121 greens.val[2] = vdup_n_u8(0); in DispatchAlphaToGreen_NEON()
122 greens.val[3] = vdup_n_u8(0); in DispatchAlphaToGreen_NEON()
125 greens.val[1] = vld1_u8(alpha + i); in DispatchAlphaToGreen_NEON()
143 // mode). So we must be sure dst[4*i + 8 - 1] is writable for the store. in ExtractAlpha_NEON()
144 // Hence the test with 'width - 1' instead of just 'width'. in ExtractAlpha_NEON()
147 const uint8x8_t alphas = rgbX.val[0]; in ExtractAlpha_NEON()
169 const uint8x16_t greens = rgbX.val[1]; in ExtractGreen_NEON()