5#include <private/qdrawhelper_neon_p.h>
6#include <private/qblendfunctions_p.h>
7#include <private/qmath_p.h>
8#include <private/qpixellayout_p.h>
12#include <private/qpaintengine_raster_p.h>
16void qt_memfill32(quint32 *dest, quint32 value, qsizetype count)
18 const int epilogueSize = count % 16;
20 quint32 *
const neonEnd = dest + count - epilogueSize;
21 const uint32x4_t valueVector1 = vdupq_n_u32(value);
22 const uint32x4x4_t valueVector4 = { valueVector1, valueVector1, valueVector1, valueVector1 };
24 vst4q_u32(dest, valueVector4);
26 }
while (dest != neonEnd);
31 case 15: *dest++ = value; Q_FALLTHROUGH();
32 case 14: *dest++ = value; Q_FALLTHROUGH();
33 case 13: *dest++ = value; Q_FALLTHROUGH();
34 case 12: *dest++ = value; Q_FALLTHROUGH();
35 case 11: *dest++ = value; Q_FALLTHROUGH();
36 case 10: *dest++ = value; Q_FALLTHROUGH();
37 case 9: *dest++ = value; Q_FALLTHROUGH();
38 case 8: *dest++ = value; Q_FALLTHROUGH();
39 case 7: *dest++ = value; Q_FALLTHROUGH();
40 case 6: *dest++ = value; Q_FALLTHROUGH();
41 case 5: *dest++ = value; Q_FALLTHROUGH();
42 case 4: *dest++ = value; Q_FALLTHROUGH();
43 case 3: *dest++ = value; Q_FALLTHROUGH();
44 case 2: *dest++ = value; Q_FALLTHROUGH();
45 case 1: *dest++ = value;
49static inline uint16x8_t qvdiv_255_u16(uint16x8_t x, uint16x8_t half)
53 const uint16x8_t temp = vshrq_n_u16(x, 8);
54 const uint16x8_t sum_part = vaddq_u16(x, half);
55 const uint16x8_t sum = vaddq_u16(temp, sum_part);
57 return vshrq_n_u16(sum, 8);
60static inline uint16x8_t qvbyte_mul_u16(uint16x8_t x, uint16x8_t alpha, uint16x8_t half)
64 const uint16x8_t t = vmulq_u16(x, alpha);
65 return qvdiv_255_u16(t, half);
68static inline uint16x8_t qvinterpolate_pixel_255(uint16x8_t x, uint16x8_t a, uint16x8_t y, uint16x8_t b, uint16x8_t half)
72 const uint16x8_t ta = vmulq_u16(x, a);
73 const uint16x8_t tb = vmulq_u16(y, b);
75 return qvdiv_255_u16(vaddq_u16(ta, tb), half);
78static inline uint16x8_t qvsource_over_u16(uint16x8_t src16, uint16x8_t dst16, uint16x8_t half, uint16x8_t full)
80 const uint16x4_t alpha16_high = vdup_lane_u16(vget_high_u16(src16), 3);
81 const uint16x4_t alpha16_low = vdup_lane_u16(vget_low_u16(src16), 3);
83 const uint16x8_t alpha16 = vsubq_u16(full, vcombine_u16(alpha16_low, alpha16_high));
85 return vaddq_u16(src16, qvbyte_mul_u16(dst16, alpha16, half));
88#if defined(ENABLE_PIXMAN_DRAWHELPERS)
90pixman_composite_over_8888_0565_asm_neon (int32_t w,
98pixman_composite_over_8888_8888_asm_neon (int32_t w,
106pixman_composite_src_0565_8888_asm_neon (int32_t w,
114pixman_composite_over_n_8_0565_asm_neon (int32_t w,
121 int32_t mask_stride);
124pixman_composite_scanline_over_asm_neon (int32_t w,
126 const uint32_t *src);
129pixman_composite_src_0565_0565_asm_neon (int32_t w,
136void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels,
int dbpl,
137 const uchar *srcPixels,
int sbpl,
141void qt_blend_rgb16_on_argb32_neon(uchar *destPixels,
int dbpl,
142 const uchar *srcPixels,
int sbpl,
149 quint32 *dst = (quint32 *) destPixels;
150 quint16 *src = (quint16 *) srcPixels;
152 if (const_alpha != 256) {
153 quint8 a = (255 * const_alpha) >> 8;
157 for (
int x=0; x<w; ++x)
158 dst[x] = INTERPOLATE_PIXEL_255(qConvertRgb16To32(src[x]), a, dst[x], ia);
165 pixman_composite_src_0565_8888_asm_neon(w, h, dst, dbpl, src, sbpl);
169void qt_blend_rgb16_on_rgb16(uchar *dst,
int dbpl,
170 const uchar *src,
int sbpl,
176static inline void scanLineBlit16(quint16 *dst, quint16 *src,
int dstride)
179 ((quint32 *)dst)[0] = ((quint32 *)src)[0];
180 __builtin_prefetch(dst + dstride, 1, 0);
182 for (
int i = 1; i < N/2; ++i)
183 ((quint32 *)dst)[i] = ((quint32 *)src)[i];
189static inline void blockBlit16(quint16 *dst, quint16 *src,
int dstride,
int sstride,
int h)
203 scanLineBlit16<Width-1>(dst + 1, src + 1, dstride);
209 scanLineBlit16<Width>(dst, src, dstride);
217void qt_blend_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
218 const uchar *srcPixels,
int sbpl,
223 if (const_alpha != 256 || w >= 150) {
224 qt_blend_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
228 int dstride = dbpl / 2;
229 int sstride = sbpl / 2;
231 quint16 *dst = (quint16 *) destPixels;
232 quint16 *src = (quint16 *) srcPixels;
235#define BLOCKBLIT(n) case n: blockBlit16<n>(dst, src, dstride, sstride, h); return;
256 pixman_composite_src_0565_0565_asm_neon (w, h, dst, dstride, src, sstride);
259extern "C" void blend_8_pixels_argb32_on_rgb16_neon(quint16 *dst,
const quint32 *src,
int const_alpha);
261void qt_blend_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
262 const uchar *srcPixels,
int sbpl,
266 quint16 *dst = (quint16 *) destPixels;
267 quint32 *src = (quint32 *) srcPixels;
269 if (const_alpha != 256) {
270 for (
int y=0; y<h; ++y) {
272 for (; i < w-7; i += 8)
273 blend_8_pixels_argb32_on_rgb16_neon(&dst[i], &src[i], const_alpha);
278 quint16 dstBuffer[8];
279 quint32 srcBuffer[8];
281 for (
int j = 0; j < tail; ++j) {
282 dstBuffer[j] = dst[i + j];
283 srcBuffer[j] = src[i + j];
286 blend_8_pixels_argb32_on_rgb16_neon(dstBuffer, srcBuffer, const_alpha);
288 for (
int j = 0; j < tail; ++j)
289 dst[i + j] = dstBuffer[j];
292 dst = (quint16 *)(((uchar *) dst) + dbpl);
293 src = (quint32 *)(((uchar *) src) + sbpl);
298 pixman_composite_over_8888_0565_asm_neon(w, h, dst, dbpl / 2, src, sbpl / 4);
302inline void qt_blend_argb32_on_argb32_opaque_neon(uchar *destPixels,
int dbpl,
303 const uchar *srcPixels,
int sbpl,
306#if defined(ENABLE_PIXMAN_DRAWHELPERS)
307 pixman_composite_over_8888_8888_asm_neon(w, h, (uint32_t *)destPixels, dbpl / 4, (uint32_t *)srcPixels, sbpl / 4);
309 uint32_t *dst =
reinterpret_cast<uint32_t *>(destPixels);
310 const uint32_t *src =
reinterpret_cast<
const uint32_t *>(srcPixels);
311 const uint16x8_t half = vdupq_n_u16(0x80);
312 const uint16x8_t full = vdupq_n_u16(0xff);
313 for (
int y = 0; y < h; ++y) {
315 for (; x < (w - 3); x += 4) {
316 if ((src[x] | src[x + 1] | src[x + 2] | src[x + 3]) != 0) {
317 uint32x4_t src32 = vld1q_u32(src + x);
318 uint32x4_t dst32 = vld1q_u32(dst + x);
320 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
321 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
323 const uint8x8_t src8_low = vget_low_u8(src8);
324 const uint8x8_t dst8_low = vget_low_u8(dst8);
326 const uint8x8_t src8_high = vget_high_u8(src8);
327 const uint8x8_t dst8_high = vget_high_u8(dst8);
329 const uint16x8_t src16_low = vmovl_u8(src8_low);
330 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
332 const uint16x8_t src16_high = vmovl_u8(src8_high);
333 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
335 const uint16x8_t result16_low = qvsource_over_u16(src16_low, dst16_low, half, full);
336 const uint16x8_t result16_high = qvsource_over_u16(src16_high, dst16_high, half, full);
338 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
339 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
341 vst1q_u32(dst + x, vcombine_u32(result32_low, result32_high));
345 const uint s = src[x];
349 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
353 dst =
reinterpret_cast<uint32_t *>(destPixels);
354 src =
reinterpret_cast<
const uint32_t *>(srcPixels);
359inline void qt_blend_argb32_on_argb32_with_alpha_neon(uchar *destPixels,
int dbpl,
360 const uchar *srcPixels,
int sbpl,
364 Q_ASSERT(const_alpha > 0 && const_alpha < 256);
365 uint32_t *dst =
reinterpret_cast<uint32_t *>(destPixels);
366 const uint32_t *src =
reinterpret_cast<
const uint32_t *>(srcPixels);
367 const uint16x8_t half = vdupq_n_u16(0x80);
368 const uint16x8_t full = vdupq_n_u16(0xff);
369 const uint16x8_t const_alpha16 = vdupq_n_u16(const_alpha);
370 for (
int y = 0; y < h; ++y) {
372 for (; x < (w - 3); x += 4) {
373 if ((src[x] | src[x + 1] | src[x + 2] | src[x + 3]) != 0) {
374 uint32x4_t src32 = vld1q_u32(src + x);
375 uint32x4_t dst32 = vld1q_u32(dst + x);
377 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
378 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
380 const uint8x8_t src8_low = vget_low_u8(src8);
381 const uint8x8_t dst8_low = vget_low_u8(dst8);
383 const uint8x8_t src8_high = vget_high_u8(src8);
384 const uint8x8_t dst8_high = vget_high_u8(dst8);
386 const uint16x8_t src16_low = vmovl_u8(src8_low);
387 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
389 const uint16x8_t src16_high = vmovl_u8(src8_high);
390 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
392 const uint16x8_t srcalpha16_low = qvbyte_mul_u16(src16_low, const_alpha16, half);
393 const uint16x8_t srcalpha16_high = qvbyte_mul_u16(src16_high, const_alpha16, half);
395 const uint16x8_t result16_low = qvsource_over_u16(srcalpha16_low, dst16_low, half, full);
396 const uint16x8_t result16_high = qvsource_over_u16(srcalpha16_high, dst16_high, half, full);
398 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
399 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
401 vst1q_u32(dst + x, vcombine_u32(result32_low, result32_high));
407 s = BYTE_MUL(s, const_alpha);
408 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
413 dst =
reinterpret_cast<uint32_t *>(destPixels);
414 src =
reinterpret_cast<
const uint32_t *>(srcPixels);
418void comp_func_SourceOver_neon(uint *dest,
const uint *src,
int length, uint const_alpha)
420 Q_ASSERT(const_alpha < 256);
421 if (const_alpha == 255) {
422#if defined(ENABLE_PIXMAN_DRAWHELPERS)
423 pixman_composite_scanline_over_asm_neon(length, dest, src);
425 qt_blend_argb32_on_argb32_opaque_neon(
reinterpret_cast<uchar *>(dest), 0,
reinterpret_cast<
const uchar *>(src), 0, length, 1);
427 }
else if (const_alpha != 0) {
428 qt_blend_argb32_on_argb32_with_alpha_neon(
reinterpret_cast<uchar *>(dest), 0,
reinterpret_cast<
const uchar *>(src), 0, length, 1, const_alpha);
432void qt_blend_argb32_on_argb32_neon(uchar *destPixels,
int dbpl,
433 const uchar *srcPixels,
int sbpl,
437 Q_ASSERT(const_alpha >= 0 && const_alpha <= 256);
438 if (const_alpha == 256) {
439 qt_blend_argb32_on_argb32_opaque_neon(destPixels, dbpl,
442 }
else if (const_alpha != 0) {
443 const uint const_alpha_255 = (
static_cast<uint>(const_alpha) * 255) >> 8;
444 qt_blend_argb32_on_argb32_with_alpha_neon(destPixels, dbpl,
452void qt_blend_rgb32_on_rgb32(uchar *destPixels,
int dbpl,
453 const uchar *srcPixels,
int sbpl,
457void qt_blend_rgb32_on_rgb32_neon(uchar *destPixels,
int dbpl,
458 const uchar *srcPixels,
int sbpl,
462 if (const_alpha != 256) {
463 if (const_alpha != 0) {
464 const uint *src = (
const uint *) srcPixels;
465 uint *dst = (uint *) destPixels;
466 uint16x8_t half = vdupq_n_u16(0x80);
467 const_alpha = (const_alpha * 255) >> 8;
468 int one_minus_const_alpha = 255 - const_alpha;
469 uint16x8_t const_alpha16 = vdupq_n_u16(const_alpha);
470 uint16x8_t one_minus_const_alpha16 = vdupq_n_u16(255 - const_alpha);
471 for (
int y = 0; y < h; ++y) {
473 for (; x < w-3; x += 4) {
474 uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
475 uint32x4_t dst32 = vld1q_u32((uint32_t *)&dst[x]);
477 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
478 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
480 const uint8x8_t src8_low = vget_low_u8(src8);
481 const uint8x8_t dst8_low = vget_low_u8(dst8);
483 const uint8x8_t src8_high = vget_high_u8(src8);
484 const uint8x8_t dst8_high = vget_high_u8(dst8);
486 const uint16x8_t src16_low = vmovl_u8(src8_low);
487 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
489 const uint16x8_t src16_high = vmovl_u8(src8_high);
490 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
492 const uint16x8_t result16_low = qvinterpolate_pixel_255(src16_low, const_alpha16, dst16_low, one_minus_const_alpha16, half);
493 const uint16x8_t result16_high = qvinterpolate_pixel_255(src16_high, const_alpha16, dst16_high, one_minus_const_alpha16, half);
495 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
496 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
498 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
501 dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha);
503 dst = (quint32 *)(((uchar *) dst) + dbpl);
504 src = (
const quint32 *)(((
const uchar *) src) + sbpl);
508 qt_blend_rgb32_on_rgb32(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
512#if defined(ENABLE_PIXMAN_DRAWHELPERS)
513extern void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer,
514 int x,
int y,
const QRgba64 &color,
516 int mapWidth,
int mapHeight,
int mapStride,
517 const QClipData *clip,
bool useGammaCorrection);
519void qt_alphamapblit_quint16_neon(QRasterBuffer *rasterBuffer,
520 int x,
int y,
const QRgba64 &color,
522 int mapWidth,
int mapHeight,
int mapStride,
523 const QClipData *clip,
bool useGammaCorrection)
525 if (clip || useGammaCorrection) {
526 qt_alphamapblit_quint16(rasterBuffer, x, y, color, bitmap, mapWidth, mapHeight, mapStride, clip, useGammaCorrection);
530 quint16 *dest =
reinterpret_cast<quint16*>(rasterBuffer->scanLine(y)) + x;
531 const int destStride = rasterBuffer->bytesPerLine() /
sizeof(quint16);
533 uchar *mask =
const_cast<uchar *>(bitmap);
534 const uint c = color.toArgb32();
536 pixman_composite_over_n_8_0565_asm_neon(mapWidth, mapHeight, dest, destStride, c, 0, mask, mapStride);
539extern "C" void blend_8_pixels_rgb16_on_rgb16_neon(quint16 *dst,
const quint16 *src,
int const_alpha);
541template <
typename SRC,
typename BlendFunc>
542struct Blend_on_RGB16_SourceAndConstAlpha_Neon {
543 Blend_on_RGB16_SourceAndConstAlpha_Neon(BlendFunc blender,
int const_alpha)
546 , m_const_alpha(const_alpha)
550 inline void write(quint16 *dst, quint32 src)
552 srcBuffer[m_index++] = src;
555 m_blender(dst - 7, srcBuffer, m_const_alpha);
560 inline void flush(quint16 *dst)
563 quint16 dstBuffer[8];
564 for (
int i = 0; i < m_index; ++i)
565 dstBuffer[i] = dst[i - m_index];
567 m_blender(dstBuffer, srcBuffer, m_const_alpha);
569 for (
int i = 0; i < m_index; ++i)
570 dst[i - m_index] = dstBuffer[i];
583template <
typename SRC,
typename BlendFunc>
584Blend_on_RGB16_SourceAndConstAlpha_Neon<SRC, BlendFunc>
585Blend_on_RGB16_SourceAndConstAlpha_Neon_create(BlendFunc blender,
int const_alpha)
587 return Blend_on_RGB16_SourceAndConstAlpha_Neon<SRC, BlendFunc>(blender, const_alpha);
590void qt_scale_image_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
591 const uchar *srcPixels,
int sbpl,
int srch,
592 const QRectF &targetRect,
593 const QRectF &sourceRect,
597 if (const_alpha == 0)
600 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip,
601 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint32>(blend_8_pixels_argb32_on_rgb16_neon, const_alpha));
604void qt_scale_image_rgb16_on_rgb16(uchar *destPixels,
int dbpl,
605 const uchar *srcPixels,
int sbpl,
int srch,
606 const QRectF &targetRect,
607 const QRectF &sourceRect,
611void qt_scale_image_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
612 const uchar *srcPixels,
int sbpl,
int srch,
613 const QRectF &targetRect,
614 const QRectF &sourceRect,
618 if (const_alpha == 0)
621 if (const_alpha == 256) {
622 qt_scale_image_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip, const_alpha);
626 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip,
627 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint16>(blend_8_pixels_rgb16_on_rgb16_neon, const_alpha));
630extern void qt_transform_image_rgb16_on_rgb16(uchar *destPixels,
int dbpl,
631 const uchar *srcPixels,
int sbpl,
632 const QRectF &targetRect,
633 const QRectF &sourceRect,
635 const QTransform &targetRectTransform,
638void qt_transform_image_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
639 const uchar *srcPixels,
int sbpl,
640 const QRectF &targetRect,
641 const QRectF &sourceRect,
643 const QTransform &targetRectTransform,
646 if (const_alpha == 0)
649 if (const_alpha == 256) {
650 qt_transform_image_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, targetRect, sourceRect, clip, targetRectTransform, const_alpha);
654 qt_transform_image(
reinterpret_cast<quint16 *>(destPixels), dbpl,
655 reinterpret_cast<
const quint16 *>(srcPixels), sbpl, targetRect, sourceRect, clip, targetRectTransform,
656 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint16>(blend_8_pixels_rgb16_on_rgb16_neon, const_alpha));
659void qt_transform_image_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
660 const uchar *srcPixels,
int sbpl,
661 const QRectF &targetRect,
662 const QRectF &sourceRect,
664 const QTransform &targetRectTransform,
667 if (const_alpha == 0)
670 qt_transform_image(
reinterpret_cast<quint16 *>(destPixels), dbpl,
671 reinterpret_cast<
const quint32 *>(srcPixels), sbpl, targetRect, sourceRect, clip, targetRectTransform,
672 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint32>(blend_8_pixels_argb32_on_rgb16_neon, const_alpha));
675static inline void convert_8_pixels_rgb16_to_argb32(quint32 *dst,
const quint16 *src)
678 "vld1.16 { d0, d1 }, [%[SRC]]\n\t"
681
682 "vshrn.u16 d4, q0, #8\n\t"
683 "vshrn.u16 d3, q0, #3\n\t"
684 "vsli.u16 q0, q0, #5\n\t"
685 "vsri.u8 d4, d4, #5\n\t"
686 "vsri.u8 d3, d3, #6\n\t"
687 "vshrn.u16 d2, q0, #2\n\t"
693 "vst4.8 { d2, d3, d4, d5 }, [%[DST]]"
694 : : [DST]
"r" (dst), [SRC]
"r" (src)
695 :
"memory",
"r2",
"d0",
"d1",
"d2",
"d3",
"d4",
"d5"
699uint * QT_FASTCALL qt_destFetchRGB16_neon(uint *buffer, QRasterBuffer *rasterBuffer,
int x,
int y,
int length)
701 const ushort *data = (
const ushort *)rasterBuffer->scanLine(y) + x;
704 for (; i < length - 7; i += 8)
705 convert_8_pixels_rgb16_to_argb32(&buffer[i], &data[i]);
708 quint16 srcBuffer[8];
709 quint32 dstBuffer[8];
711 int tail = length - i;
712 for (
int j = 0; j < tail; ++j)
713 srcBuffer[j] = data[i + j];
715 convert_8_pixels_rgb16_to_argb32(dstBuffer, srcBuffer);
717 for (
int j = 0; j < tail; ++j)
718 buffer[i + j] = dstBuffer[j];
724static inline void convert_8_pixels_argb32_to_rgb16(quint16 *dst,
const quint32 *src)
727 "vld4.8 { d0, d1, d2, d3 }, [%[SRC]]\n\t"
730 "vshll.u8 q14, d2, #8\n\t"
731 "vshll.u8 q8, d1, #8\n\t"
732 "vshll.u8 q9, d0, #8\n\t"
733 "vsri.u16 q14, q8, #5\n\t"
734 "vsri.u16 q14, q9, #11\n\t"
736 "vst1.16 { d28, d29 }, [%[DST]]"
737 : : [DST]
"r" (dst), [SRC]
"r" (src)
738 :
"memory",
"d0",
"d1",
"d2",
"d3",
"d16",
"d17",
"d18",
"d19",
"d28",
"d29"
742void QT_FASTCALL qt_destStoreRGB16_neon(QRasterBuffer *rasterBuffer,
int x,
int y,
const uint *buffer,
int length)
744 quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x;
747 for (; i < length - 7; i += 8)
748 convert_8_pixels_argb32_to_rgb16(&data[i], &buffer[i]);
751 quint32 srcBuffer[8];
752 quint16 dstBuffer[8];
754 int tail = length - i;
755 for (
int j = 0; j < tail; ++j)
756 srcBuffer[j] = buffer[i + j];
758 convert_8_pixels_argb32_to_rgb16(dstBuffer, srcBuffer);
760 for (
int j = 0; j < tail; ++j)
761 data[i + j] = dstBuffer[j];
766void QT_FASTCALL comp_func_solid_SourceOver_neon(uint *destPixels,
int length, uint color, uint const_alpha)
768 if ((const_alpha & qAlpha(color)) == 255) {
769 qt_memfill32(destPixels, color, length);
771 if (const_alpha != 255)
772 color = BYTE_MUL(color, const_alpha);
774 const quint32 minusAlphaOfColor = qAlpha(~color);
777 uint32_t *dst = (uint32_t *) destPixels;
778 const uint32x4_t colorVector = vdupq_n_u32(color);
779 uint16x8_t half = vdupq_n_u16(0x80);
780 const uint16x8_t minusAlphaOfColorVector = vdupq_n_u16(minusAlphaOfColor);
782 for (; x < length-3; x += 4) {
783 uint32x4_t dstVector = vld1q_u32(&dst[x]);
785 const uint8x16_t dst8 = vreinterpretq_u8_u32(dstVector);
787 const uint8x8_t dst8_low = vget_low_u8(dst8);
788 const uint8x8_t dst8_high = vget_high_u8(dst8);
790 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
791 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
793 const uint16x8_t result16_low = qvbyte_mul_u16(dst16_low, minusAlphaOfColorVector, half);
794 const uint16x8_t result16_high = qvbyte_mul_u16(dst16_high, minusAlphaOfColorVector, half);
796 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
797 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
799 uint32x4_t blendedPixels = vcombine_u32(result32_low, result32_high);
800 uint32x4_t colorPlusBlendedPixels = vaddq_u32(colorVector, blendedPixels);
801 vst1q_u32(&dst[x], colorPlusBlendedPixels);
804 SIMD_EPILOGUE(x, length, 3)
805 destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor);
809void QT_FASTCALL comp_func_Plus_neon(uint *dst,
const uint *src,
int length, uint const_alpha)
811 if (const_alpha == 255) {
812 uint *
const end = dst + length;
813 uint *
const neonEnd = end - 3;
815 while (dst < neonEnd) {
816 uint8x16_t vs = vld1q_u8((
const uint8_t*)src);
817 const uint8x16_t vd = vld1q_u8((uint8_t*)dst);
818 vs = vqaddq_u8(vs, vd);
819 vst1q_u8((uint8_t*)dst, vs);
825 *dst = comp_func_Plus_one_pixel(*dst, *src);
831 const int one_minus_const_alpha = 255 - const_alpha;
832 const uint16x8_t constAlphaVector = vdupq_n_u16(const_alpha);
833 const uint16x8_t oneMinusconstAlphaVector = vdupq_n_u16(one_minus_const_alpha);
835 const uint16x8_t half = vdupq_n_u16(0x80);
836 for (; x < length - 3; x += 4) {
837 const uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
838 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
839 uint8x16_t dst8 = vld1q_u8((uint8_t *)&dst[x]);
840 uint8x16_t result = vqaddq_u8(dst8, src8);
842 uint16x8_t result_low = vmovl_u8(vget_low_u8(result));
843 uint16x8_t result_high = vmovl_u8(vget_high_u8(result));
845 uint16x8_t dst_low = vmovl_u8(vget_low_u8(dst8));
846 uint16x8_t dst_high = vmovl_u8(vget_high_u8(dst8));
848 result_low = qvinterpolate_pixel_255(result_low, constAlphaVector, dst_low, oneMinusconstAlphaVector, half);
849 result_high = qvinterpolate_pixel_255(result_high, constAlphaVector, dst_high, oneMinusconstAlphaVector, half);
851 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result_low));
852 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result_high));
853 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
856 SIMD_EPILOGUE(x, length, 3)
857 dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
861#if defined(ENABLE_PIXMAN_DRAWHELPERS)
862static const int tileSize = 32;
864extern "C" void qt_rotate90_16_neon(quint16 *dst,
const quint16 *src,
int sstride,
int dstride,
int count);
866void qt_memrotate90_16_neon(
const uchar *srcPixels,
int w,
int h,
int sstride, uchar *destPixels,
int dstride)
868 const ushort *src = (
const ushort *)srcPixels;
869 ushort *dest = (ushort *)destPixels;
871 sstride /=
sizeof(ushort);
872 dstride /=
sizeof(ushort);
874 const int pack =
sizeof(quint32) /
sizeof(ushort);
875 const int unaligned =
876 qMin(uint((quintptr(dest) & (
sizeof(quint32)-1)) /
sizeof(ushort)), uint(h));
877 const int restX = w % tileSize;
878 const int restY = (h - unaligned) % tileSize;
879 const int unoptimizedY = restY % pack;
880 const int numTilesX = w / tileSize + (restX > 0);
881 const int numTilesY = (h - unaligned) / tileSize + (restY >= pack);
883 for (
int tx = 0; tx < numTilesX; ++tx) {
884 const int startx = w - tx * tileSize - 1;
885 const int stopx = qMax(startx - tileSize, 0);
888 for (
int x = startx; x >= stopx; --x) {
889 ushort *d = dest + (w - x - 1) * dstride;
890 for (
int y = 0; y < unaligned; ++y) {
891 *d++ = src[y * sstride + x];
896 for (
int ty = 0; ty < numTilesY; ++ty) {
897 const int starty = ty * tileSize + unaligned;
898 const int stopy = qMin(starty + tileSize, h - unoptimizedY);
902 for (; x >= stopx + 7; x -= 8) {
903 ushort *d = dest + (w - x - 1) * dstride + starty;
904 const ushort *s = &src[starty * sstride + x - 7];
905 qt_rotate90_16_neon(d, s, sstride * 2, dstride * 2, stopy - starty);
908 for (; x >= stopx; --x) {
909 quint32 *d =
reinterpret_cast<quint32*>(dest + (w - x - 1) * dstride + starty);
910 for (
int y = starty; y < stopy; y += pack) {
911 quint32 c = src[y * sstride + x];
912 for (
int i = 1; i < pack; ++i) {
913 const int shift = (
sizeof(
int) * 8 / pack * i);
914 const ushort color = src[(y + i) * sstride + x];
923 const int starty = h - unoptimizedY;
924 for (
int x = startx; x >= stopx; --x) {
925 ushort *d = dest + (w - x - 1) * dstride + starty;
926 for (
int y = starty; y < h; ++y) {
927 *d++ = src[y * sstride + x];
934extern "C" void qt_rotate270_16_neon(quint16 *dst,
const quint16 *src,
int sstride,
int dstride,
int count);
936void qt_memrotate270_16_neon(
const uchar *srcPixels,
int w,
int h,
938 uchar *destPixels,
int dstride)
940 const ushort *src = (
const ushort *)srcPixels;
941 ushort *dest = (ushort *)destPixels;
943 sstride /=
sizeof(ushort);
944 dstride /=
sizeof(ushort);
946 const int pack =
sizeof(quint32) /
sizeof(ushort);
947 const int unaligned =
948 qMin(uint((
long(dest) & (
sizeof(quint32)-1)) /
sizeof(ushort)), uint(h));
949 const int restX = w % tileSize;
950 const int restY = (h - unaligned) % tileSize;
951 const int unoptimizedY = restY % pack;
952 const int numTilesX = w / tileSize + (restX > 0);
953 const int numTilesY = (h - unaligned) / tileSize + (restY >= pack);
955 for (
int tx = 0; tx < numTilesX; ++tx) {
956 const int startx = tx * tileSize;
957 const int stopx = qMin(startx + tileSize, w);
960 for (
int x = startx; x < stopx; ++x) {
961 ushort *d = dest + x * dstride;
962 for (
int y = h - 1; y >= h - unaligned; --y) {
963 *d++ = src[y * sstride + x];
968 for (
int ty = 0; ty < numTilesY; ++ty) {
969 const int starty = h - 1 - unaligned - ty * tileSize;
970 const int stopy = qMax(starty - tileSize, unoptimizedY);
974 for (; x < stopx - 7; x += 8) {
975 ushort *d = dest + x * dstride + h - 1 - starty;
976 const ushort *s = &src[starty * sstride + x];
977 qt_rotate90_16_neon(d + 7 * dstride, s, -sstride * 2, -dstride * 2, starty - stopy);
980 for (; x < stopx; ++x) {
981 quint32 *d =
reinterpret_cast<quint32*>(dest + x * dstride
983 for (
int y = starty; y > stopy; y -= pack) {
984 quint32 c = src[y * sstride + x];
985 for (
int i = 1; i < pack; ++i) {
986 const int shift = (
sizeof(
int) * 8 / pack * i);
987 const ushort color = src[(y - i) * sstride + x];
995 const int starty = unoptimizedY - 1;
996 for (
int x = startx; x < stopx; ++x) {
997 ushort *d = dest + x * dstride + h - 1 - starty;
998 for (
int y = starty; y >= 0; --y) {
999 *d++ = src[y * sstride + x];
1011 Int32x4() =
default;
1012 Int32x4(int32x4_t v) : v(v) {}
1014 operator int32x4_t()
const {
return v; }
1017 Float32x4() =
default;
1018 Float32x4(float32x4_t v) : v(v) {};
1020 operator float32x4_t()
const {
return v; }
1023 union Vect_buffer_i { Int32x4 v;
int i[4]; };
1024 union Vect_buffer_f { Float32x4 v;
float f[4]; };
1026 static inline Float32x4 v_dup(
double x) {
return vdupq_n_f32(
float(x)); }
1027 static inline Float32x4 v_dup(
float x) {
return vdupq_n_f32(x); }
1028 static inline Int32x4 v_dup(
int x) {
return vdupq_n_s32(x); }
1029 static inline Int32x4 v_dup(uint x) {
return vdupq_n_s32(x); }
1031 static inline Float32x4 v_add(Float32x4 a, Float32x4 b) {
return vaddq_f32(a, b); }
1032 static inline Int32x4 v_add(Int32x4 a, Int32x4 b) {
return vaddq_s32(a, b); }
1034 static inline Float32x4 v_max(Float32x4 a, Float32x4 b) {
return vmaxq_f32(a, b); }
1035 static inline Float32x4 v_min(Float32x4 a, Float32x4 b) {
return vminq_f32(a, b); }
1036 static inline Int32x4 v_min_16(Int32x4 a, Int32x4 b) {
return vminq_s32(a, b); }
1038 static inline Int32x4 v_and(Int32x4 a, Int32x4 b) {
return vandq_s32(a, b); }
1040 static inline Float32x4 v_sub(Float32x4 a, Float32x4 b) {
return vsubq_f32(a, b); }
1041 static inline Int32x4 v_sub(Int32x4 a, Int32x4 b) {
return vsubq_s32(a, b); }
1043 static inline Float32x4 v_mul(Float32x4 a, Float32x4 b) {
return vmulq_f32(a, b); }
1045 static inline Float32x4 v_sqrt(Float32x4 x) { Float32x4 y = vrsqrteq_f32(x); y = vmulq_f32(y, vrsqrtsq_f32(x, vmulq_f32(y, y)));
return vmulq_f32(x, y); }
1047 static inline Int32x4 v_toInt(Float32x4 x) {
return vcvtq_s32_f32(x); }
1049 static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) {
return vreinterpretq_s32_u32(vcgeq_f32(a, b)); }
1052const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer,
const Operator *op,
const QSpanData *data,
1053 int y,
int x,
int length)
1055 return qt_fetch_radial_gradient_template<QRadialFetchSimd<QSimdNeon>,uint>(buffer, op, data, y, x, length);
1058extern void QT_FASTCALL qt_convert_rgb888_to_rgb32_neon(quint32 *dst,
const uchar *src,
int len);
1060const uint * QT_FASTCALL qt_fetchUntransformed_888_neon(uint *buffer,
const Operator *,
const QSpanData *data,
1061 int y,
int x,
int length)
1063 const uchar *line = data->texture.scanLine(y) + x * 3;
1064 qt_convert_rgb888_to_rgb32_neon(buffer, line, length);
1068#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
1069static inline uint32x4_t vrgba2argb(uint32x4_t srcVector)
1071#if defined(Q_PROCESSOR_ARM_64)
1072 const uint8x16_t rgbaMask = qvsetq_n_u8(2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15);
1074 const uint8x8_t rgbaMask = qvset_n_u8(2, 1, 0, 3, 6, 5, 4, 7);
1076#if defined(Q_PROCESSOR_ARM_64)
1077 srcVector = vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(srcVector), rgbaMask));
1080 const uint8x8_t low = vtbl1_u8(vreinterpret_u8_u32(vget_low_u32(srcVector)), rgbaMask);
1081 const uint8x8_t high = vtbl1_u8(vreinterpret_u8_u32(vget_high_u32(srcVector)), rgbaMask);
1082 srcVector = vcombine_u32(vreinterpret_u32_u8(low), vreinterpret_u32_u8(high));
1088static inline void convertARGBToARGB32PM_neon(uint *buffer,
const uint *src,
int count)
1091 const uint8x8_t shuffleMask = qvset_n_u8(3, 3, 3, 3, 7, 7, 7, 7);
1092 const uint32x4_t blendMask = vdupq_n_u32(0xff000000);
1094 for (; i < count - 3; i += 4) {
1095 uint32x4_t srcVector = vld1q_u32(src + i);
1096 uint32x4_t alphaVector = vshrq_n_u32(srcVector, 24);
1097#if defined(Q_PROCESSOR_ARM_64)
1098 uint32_t alphaSum = vaddvq_u32(alphaVector);
1101 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1102 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1105 if (alphaSum != 255 * 4) {
1107 srcVector = vrgba2argb(srcVector);
1108 const uint8x8_t s1 = vreinterpret_u8_u32(vget_low_u32(srcVector));
1109 const uint8x8_t s2 = vreinterpret_u8_u32(vget_high_u32(srcVector));
1110 const uint8x8_t alpha1 = vtbl1_u8(s1, shuffleMask);
1111 const uint8x8_t alpha2 = vtbl1_u8(s2, shuffleMask);
1112 uint16x8_t src1 = vmull_u8(s1, alpha1);
1113 uint16x8_t src2 = vmull_u8(s2, alpha2);
1114 src1 = vsraq_n_u16(src1, src1, 8);
1115 src2 = vsraq_n_u16(src2, src2, 8);
1116 const uint8x8_t d1 = vrshrn_n_u16(src1, 8);
1117 const uint8x8_t d2 = vrshrn_n_u16(src2, 8);
1118 const uint32x4_t d = vbslq_u32(blendMask, srcVector, vreinterpretq_u32_u8(vcombine_u8(d1, d2)));
1119 vst1q_u32(buffer + i, d);
1122 vst1q_u32(buffer + i, vrgba2argb(srcVector));
1123 else if (buffer != src)
1124 vst1q_u32(buffer + i, srcVector);
1127 vst1q_u32(buffer + i, vdupq_n_u32(0));
1131 SIMD_EPILOGUE(i, count, 3) {
1132 uint v = qPremultiply(src[i]);
1133 buffer[i] = RGBA ? RGBA2ARGB(v) : v;
1138static inline void convertARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count)
1143 const uint8x8_t shuffleMask = qvset_n_u8(3, 3, 3, 3, 7, 7, 7, 7);
1144 const uint64x2_t blendMask = vdupq_n_u64(Q_UINT64_C(0xffff000000000000));
1147 for (; i < count-3; i += 4) {
1148 uint32x4_t vs32 = vld1q_u32(src + i);
1149 uint32x4_t alphaVector = vshrq_n_u32(vs32, 24);
1150#if defined(Q_PROCESSOR_ARM_64)
1151 uint32_t alphaSum = vaddvq_u32(alphaVector);
1154 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1155 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1159 vs32 = vrgba2argb(vs32);
1160 const uint8x16_t vs8 = vreinterpretq_u8_u32(vs32);
1161 const uint8x16x2_t v = vzipq_u8(vs8, vs8);
1162 if (alphaSum != 255 * 4) {
1163 const uint8x8_t s1 = vreinterpret_u8_u32(vget_low_u32(vs32));
1164 const uint8x8_t s2 = vreinterpret_u8_u32(vget_high_u32(vs32));
1165 const uint8x8_t alpha1 = vtbl1_u8(s1, shuffleMask);
1166 const uint8x8_t alpha2 = vtbl1_u8(s2, shuffleMask);
1167 uint16x8_t src1 = vmull_u8(s1, alpha1);
1168 uint16x8_t src2 = vmull_u8(s2, alpha2);
1170 src1 = vsraq_n_u16(src1, src1, 7);
1171 src2 = vsraq_n_u16(src2, src2, 7);
1174 const uint64x2_t d1 = vbslq_u64(blendMask, vreinterpretq_u64_u8(v.val[0]), vreinterpretq_u64_u16(src1));
1175 const uint64x2_t d2 = vbslq_u64(blendMask, vreinterpretq_u64_u8(v.val[1]), vreinterpretq_u64_u16(src2));
1177 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u64(d1));
1179 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u64(d2));
1182 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u8(v.val[0]));
1184 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u8(v.val[1]));
1188 vst1q_u16((uint16_t *)buffer, vdupq_n_u16(0));
1190 vst1q_u16((uint16_t *)buffer, vdupq_n_u16(0));
1195 SIMD_EPILOGUE(i, count, 3) {
1199 *buffer++ = QRgba64::fromArgb32(s).premultiplied();
1203static inline float32x4_t reciprocal_mul_ps(float32x4_t a,
float mul)
1205 float32x4_t ia = vrecpeq_f32(a);
1206 ia = vmulq_f32(vrecpsq_f32(a, ia), vmulq_n_f32(ia, mul));
1210template<
bool RGBA,
bool RGBx>
1211static inline void convertARGBFromARGB32PM_neon(uint *buffer,
const uint *src,
int count)
1214 const uint32x4_t alphaMask = vdupq_n_u32(0xff000000);
1216 for (; i < count - 3; i += 4) {
1217 uint32x4_t srcVector = vld1q_u32(src + i);
1218 uint32x4_t alphaVector = vshrq_n_u32(srcVector, 24);
1219#if defined(Q_PROCESSOR_ARM_64)
1220 uint32_t alphaSum = vaddvq_u32(alphaVector);
1223 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1224 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1227 if (alphaSum != 255 * 4) {
1229 srcVector = vrgba2argb(srcVector);
1230 const float32x4_t a = vcvtq_f32_u32(alphaVector);
1231 const float32x4_t ia = reciprocal_mul_ps(a, 255.0f);
1233 uint16x8_t tmp1 = vmovl_u8(vget_low_u8(vreinterpretq_u8_u32(srcVector)));
1234 uint16x8_t tmp3 = vmovl_u8(vget_high_u8(vreinterpretq_u8_u32(srcVector)));
1235 float32x4_t src1 = vcvtq_f32_u32(vmovl_u16(vget_low_u16(tmp1)));
1236 float32x4_t src2 = vcvtq_f32_u32(vmovl_u16(vget_high_u16(tmp1)));
1237 float32x4_t src3 = vcvtq_f32_u32(vmovl_u16(vget_low_u16(tmp3)));
1238 float32x4_t src4 = vcvtq_f32_u32(vmovl_u16(vget_high_u16(tmp3)));
1239 src1 = vmulq_lane_f32(src1, vget_low_f32(ia), 0);
1240 src2 = vmulq_lane_f32(src2, vget_low_f32(ia), 1);
1241 src3 = vmulq_lane_f32(src3, vget_high_f32(ia), 0);
1242 src4 = vmulq_lane_f32(src4, vget_high_f32(ia), 1);
1244 tmp1 = vcombine_u16(vrshrn_n_u32(vcvtq_n_u32_f32(src1, 1), 1),
1245 vrshrn_n_u32(vcvtq_n_u32_f32(src2, 1), 1));
1246 tmp3 = vcombine_u16(vrshrn_n_u32(vcvtq_n_u32_f32(src3, 1), 1),
1247 vrshrn_n_u32(vcvtq_n_u32_f32(src4, 1), 1));
1248 uint32x4_t dstVector = vreinterpretq_u32_u8(vcombine_u8(vmovn_u16(tmp1), vmovn_u16(tmp3)));
1250#if defined(Q_PROCESSOR_ARM_64)
1251 uint32x4_t srcVectorAlphaMask = vceqzq_u32(alphaVector);
1253 uint32x4_t srcVectorAlphaMask = vceqq_u32(alphaVector, vdupq_n_u32(0));
1255 dstVector = vbicq_u32(dstVector, srcVectorAlphaMask);
1258 dstVector = vorrq_u32(alphaMask, dstVector);
1260 dstVector = vbslq_u32(alphaMask, srcVector, dstVector);
1261 vst1q_u32(&buffer[i], dstVector);
1265 vst1q_u32(&buffer[i], vrgba2argb(srcVector));
1266 else if (buffer != src)
1267 vst1q_u32(&buffer[i], srcVector);
1272 vst1q_u32(&buffer[i], alphaMask);
1274 vst1q_u32(&buffer[i], vdupq_n_u32(0));
1278 SIMD_EPILOGUE(i, count, 3) {
1279 uint v = qUnpremultiply(src[i]);
1288void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer,
int count,
const QList<QRgb> *)
1290 convertARGBToARGB32PM_neon<
false>(buffer, buffer, count);
1293void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer,
int count,
const QList<QRgb> *)
1295 convertARGBToARGB32PM_neon<
true>(buffer, buffer, count);
1298const uint *QT_FASTCALL fetchARGB32ToARGB32PM_neon(uint *buffer,
const uchar *src,
int index,
int count,
1299 const QList<QRgb> *, QDitherInfo *)
1301 convertARGBToARGB32PM_neon<
false>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1305const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_neon(uint *buffer,
const uchar *src,
int index,
int count,
1306 const QList<QRgb> *, QDitherInfo *)
1308 convertARGBToARGB32PM_neon<
true>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1312const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count,
1313 const QList<QRgb> *, QDitherInfo *)
1315 convertARGB32ToRGBA64PM_neon<
false>(buffer, src, count);
1319const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count,
1320 const QList<QRgb> *, QDitherInfo *)
1322 convertARGB32ToRGBA64PM_neon<
true>(buffer, src, count);
1326const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uchar *src,
int index,
int count,
1327 const QList<QRgb> *, QDitherInfo *)
1329 convertARGB32ToRGBA64PM_neon<
false>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1333const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_neon(QRgba64 *buffer,
const uchar *src,
int index,
int count,
1334 const QList<QRgb> *, QDitherInfo *)
1336 convertARGB32ToRGBA64PM_neon<
true>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1340void QT_FASTCALL storeRGB32FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1341 const QList<QRgb> *, QDitherInfo *)
1343 uint *d =
reinterpret_cast<uint *>(dest) + index;
1344 convertARGBFromARGB32PM_neon<
false,
true>(d, src, count);
1347void QT_FASTCALL storeARGB32FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1348 const QList<QRgb> *, QDitherInfo *)
1350 uint *d =
reinterpret_cast<uint *>(dest) + index;
1351 convertARGBFromARGB32PM_neon<
false,
false>(d, src, count);
1354void QT_FASTCALL storeRGBA8888FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1355 const QList<QRgb> *, QDitherInfo *)
1357 uint *d =
reinterpret_cast<uint *>(dest) + index;
1358 convertARGBFromARGB32PM_neon<
true,
false>(d, src, count);
1361void QT_FASTCALL storeRGBXFromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1362 const QList<QRgb> *, QDitherInfo *)
1364 uint *d =
reinterpret_cast<uint *>(dest) + index;
1365 convertARGBFromARGB32PM_neon<
true,
true>(d, src, count);