Home | History | Annotate | Download | only in dsp

Lines Matching full:alpha

21 static int DispatchAlpha(const uint8_t* alpha, int alpha_stride,
24 // alpha_and stores an 'and' operation of all the alpha[] values. The final
25 // value is not 0xff if any of the alpha[] is not equal to 0xff.
34 // 'dst[4 * width - 4]', because we don't know if alpha is the first or the
41 // load 8 alpha bytes
42 const __m128i a0 = _mm_loadl_epi64((const __m128i*)&alpha[i]);
49 // mask dst alpha values
58 // accumulate eight alpha 'and' in parallel
63 const uint32_t alpha_value = alpha[i];
67 alpha += alpha_stride;
70 // Combine the eight alpha 'and' into a 8-bit mask.
75 static void DispatchAlphaToGreen(const uint8_t* alpha, int alpha_stride,
82 for (i = 0; i < limit; i += 16) { // process 16 alpha bytes
83 const __m128i a0 = _mm_loadu_si128((const __m128i*)&alpha[i]);
95 for (; i < width; ++i) dst[i] = alpha[i] << 8;
96 alpha += alpha_stride;
103 uint8_t* alpha, int alpha_stride) {
104 // alpha_and stores an 'and' operation of all the alpha[] values. The final
105 // value is not 0xff if any of the alpha[] is not equal to 0xff.
108 const __m128i a_mask = _mm_set1_epi32(0xffu); // to preserve alpha
113 // 'src[4 * width - 4]', because we don't know if alpha is the first or the
128 _mm_storel_epi64((__m128i*)&alpha[i], d0);
129 // accumulate eight alpha 'and' in parallel
135 alpha[i] = alpha_value;
139 alpha += alpha_stride;
141 // Combine the eight alpha 'and' into a 8-bit mask.
154 // We use: v / 255 = (v * 0x8081) >> 23, where v = alpha * {r,g,b} is a 16bit
198 const uint8_t* const alpha = rgba + (alpha_first ? 0 : 3);
199 const uint32_t a = alpha[4 * i];
214 // Apply alpha value to rows
244 static void MultRow_SSE2(uint8_t* const ptr, const uint8_t* const alpha,
253 const __m128i a0 = _mm_loadl_epi64((const __m128i*)&alpha[x]);
264 if (width > 0) WebPMultRowC(ptr + x, alpha + x, width, inverse);