4#include <private/qdrawhelper_neon_p.h>
5#include <private/qblendfunctions_p.h>
6#include <private/qmath_p.h>
7#include <private/qpixellayout_p.h>
11#include <private/qpaintengine_raster_p.h>
15void qt_memfill32(quint32 *dest, quint32 value, qsizetype count)
17 const int epilogueSize = count % 16;
18#if defined(Q_CC_GHS) || defined(Q_CC_MSVC)
21 quint32 *
const neonEnd = dest + count - epilogueSize;
22 const uint32x4_t valueVector1 = vdupq_n_u32(value);
23 const uint32x4x4_t valueVector4 = { valueVector1, valueVector1, valueVector1, valueVector1 };
25 vst4q_u32(dest, valueVector4);
27 }
while (dest != neonEnd);
29#elif !defined(Q_PROCESSOR_ARM_64)
31 quint32 *
const neonEnd = dest + count - epilogueSize;
32 register uint32x4_t valueVector1
asm (
"q0") = vdupq_n_u32(value);
33 register uint32x4_t valueVector2
asm (
"q1") = valueVector1;
34 while (dest != neonEnd) {
36 "vst2.32 { d0, d1, d2, d3 }, [%[DST]] !\n\t"
37 "vst2.32 { d0, d1, d2, d3 }, [%[DST]] !\n\t"
39 : [VALUE1]
"w"(valueVector1), [VALUE2]
"w"(valueVector2)
46 quint32 *
const neonEnd = dest + count - epilogueSize;
47 register uint32x4_t valueVector1
asm (
"v0") = vdupq_n_u32(value);
48 register uint32x4_t valueVector2
asm (
"v1") = valueVector1;
49 while (dest != neonEnd) {
51 "st2 { v0.4s, v1.4s }, [%[DST]], #32 \n\t"
52 "st2 { v0.4s, v1.4s }, [%[DST]], #32 \n\t"
54 : [VALUE1]
"w"(valueVector1), [VALUE2]
"w"(valueVector2)
63 case 15: *dest++ = value; Q_FALLTHROUGH();
64 case 14: *dest++ = value; Q_FALLTHROUGH();
65 case 13: *dest++ = value; Q_FALLTHROUGH();
66 case 12: *dest++ = value; Q_FALLTHROUGH();
67 case 11: *dest++ = value; Q_FALLTHROUGH();
68 case 10: *dest++ = value; Q_FALLTHROUGH();
69 case 9: *dest++ = value; Q_FALLTHROUGH();
70 case 8: *dest++ = value; Q_FALLTHROUGH();
71 case 7: *dest++ = value; Q_FALLTHROUGH();
72 case 6: *dest++ = value; Q_FALLTHROUGH();
73 case 5: *dest++ = value; Q_FALLTHROUGH();
74 case 4: *dest++ = value; Q_FALLTHROUGH();
75 case 3: *dest++ = value; Q_FALLTHROUGH();
76 case 2: *dest++ = value; Q_FALLTHROUGH();
77 case 1: *dest++ = value;
81static inline uint16x8_t qvdiv_255_u16(uint16x8_t x, uint16x8_t half)
85 const uint16x8_t temp = vshrq_n_u16(x, 8);
86 const uint16x8_t sum_part = vaddq_u16(x, half);
87 const uint16x8_t sum = vaddq_u16(temp, sum_part);
89 return vshrq_n_u16(sum, 8);
92static inline uint16x8_t qvbyte_mul_u16(uint16x8_t x, uint16x8_t alpha, uint16x8_t half)
96 const uint16x8_t t = vmulq_u16(x, alpha);
97 return qvdiv_255_u16(t, half);
100static inline uint16x8_t qvinterpolate_pixel_255(uint16x8_t x, uint16x8_t a, uint16x8_t y, uint16x8_t b, uint16x8_t half)
104 const uint16x8_t ta = vmulq_u16(x, a);
105 const uint16x8_t tb = vmulq_u16(y, b);
107 return qvdiv_255_u16(vaddq_u16(ta, tb), half);
110static inline uint16x8_t qvsource_over_u16(uint16x8_t src16, uint16x8_t dst16, uint16x8_t half, uint16x8_t full)
112 const uint16x4_t alpha16_high = vdup_lane_u16(vget_high_u16(src16), 3);
113 const uint16x4_t alpha16_low = vdup_lane_u16(vget_low_u16(src16), 3);
115 const uint16x8_t alpha16 = vsubq_u16(full, vcombine_u16(alpha16_low, alpha16_high));
117 return vaddq_u16(src16, qvbyte_mul_u16(dst16, alpha16, half));
120#if defined(ENABLE_PIXMAN_DRAWHELPERS)
122pixman_composite_over_8888_0565_asm_neon (int32_t w,
130pixman_composite_over_8888_8888_asm_neon (int32_t w,
138pixman_composite_src_0565_8888_asm_neon (int32_t w,
146pixman_composite_over_n_8_0565_asm_neon (int32_t w,
153 int32_t mask_stride);
156pixman_composite_scanline_over_asm_neon (int32_t w,
158 const uint32_t *src);
161pixman_composite_src_0565_0565_asm_neon (int32_t w,
168void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels,
int dbpl,
169 const uchar *srcPixels,
int sbpl,
173void qt_blend_rgb16_on_argb32_neon(uchar *destPixels,
int dbpl,
174 const uchar *srcPixels,
int sbpl,
181 quint32 *dst = (quint32 *) destPixels;
182 quint16 *src = (quint16 *) srcPixels;
184 if (const_alpha != 256) {
185 quint8 a = (255 * const_alpha) >> 8;
189 for (
int x=0; x<w; ++x)
190 dst[x] = INTERPOLATE_PIXEL_255(qConvertRgb16To32(src[x]), a, dst[x], ia);
197 pixman_composite_src_0565_8888_asm_neon(w, h, dst, dbpl, src, sbpl);
201void qt_blend_rgb16_on_rgb16(uchar *dst,
int dbpl,
202 const uchar *src,
int sbpl,
208static inline void scanLineBlit16(quint16 *dst, quint16 *src,
int dstride)
211 ((quint32 *)dst)[0] = ((quint32 *)src)[0];
212 __builtin_prefetch(dst + dstride, 1, 0);
214 for (
int i = 1; i < N/2; ++i)
215 ((quint32 *)dst)[i] = ((quint32 *)src)[i];
221static inline void blockBlit16(quint16 *dst, quint16 *src,
int dstride,
int sstride,
int h)
235 scanLineBlit16<Width-1>(dst + 1, src + 1, dstride);
241 scanLineBlit16<Width>(dst, src, dstride);
249void qt_blend_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
250 const uchar *srcPixels,
int sbpl,
255 if (const_alpha != 256 || w >= 150) {
256 qt_blend_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
260 int dstride = dbpl / 2;
261 int sstride = sbpl / 2;
263 quint16 *dst = (quint16 *) destPixels;
264 quint16 *src = (quint16 *) srcPixels;
267#define BLOCKBLIT(n) case n: blockBlit16<n>(dst, src, dstride, sstride, h); return;
288 pixman_composite_src_0565_0565_asm_neon (w, h, dst, dstride, src, sstride);
291extern "C" void blend_8_pixels_argb32_on_rgb16_neon(quint16 *dst,
const quint32 *src,
int const_alpha);
293void qt_blend_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
294 const uchar *srcPixels,
int sbpl,
298 quint16 *dst = (quint16 *) destPixels;
299 quint32 *src = (quint32 *) srcPixels;
301 if (const_alpha != 256) {
302 for (
int y=0; y<h; ++y) {
304 for (; i < w-7; i += 8)
305 blend_8_pixels_argb32_on_rgb16_neon(&dst[i], &src[i], const_alpha);
310 quint16 dstBuffer[8];
311 quint32 srcBuffer[8];
313 for (
int j = 0; j < tail; ++j) {
314 dstBuffer[j] = dst[i + j];
315 srcBuffer[j] = src[i + j];
318 blend_8_pixels_argb32_on_rgb16_neon(dstBuffer, srcBuffer, const_alpha);
320 for (
int j = 0; j < tail; ++j)
321 dst[i + j] = dstBuffer[j];
324 dst = (quint16 *)(((uchar *) dst) + dbpl);
325 src = (quint32 *)(((uchar *) src) + sbpl);
330 pixman_composite_over_8888_0565_asm_neon(w, h, dst, dbpl / 2, src, sbpl / 4);
334void qt_blend_argb32_on_argb32_scanline_neon(uint *dest,
const uint *src,
int length, uint const_alpha)
336 if (const_alpha == 255) {
337#if defined(ENABLE_PIXMAN_DRAWHELPERS)
338 pixman_composite_scanline_over_asm_neon(length, dest, src);
340 qt_blend_argb32_on_argb32_neon((uchar *)dest, 4 * length, (uchar *)src, 4 * length, length, 1, 256);
343 qt_blend_argb32_on_argb32_neon((uchar *)dest, 4 * length, (uchar *)src, 4 * length, length, 1, (const_alpha * 256) / 255);
347void qt_blend_argb32_on_argb32_neon(uchar *destPixels,
int dbpl,
348 const uchar *srcPixels,
int sbpl,
352 const uint *src = (
const uint *) srcPixels;
353 uint *dst = (uint *) destPixels;
354 uint16x8_t half = vdupq_n_u16(0x80);
355 uint16x8_t full = vdupq_n_u16(0xff);
356 if (const_alpha == 256) {
357#if defined(ENABLE_PIXMAN_DRAWHELPERS)
358 pixman_composite_over_8888_8888_asm_neon(w, h, (uint32_t *)destPixels, dbpl / 4, (uint32_t *)srcPixels, sbpl / 4);
360 for (
int y=0; y<h; ++y) {
362 for (; x < w-3; x += 4) {
363 if (src[x] | src[x+1] | src[x+2] | src[x+3]) {
364 uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
365 uint32x4_t dst32 = vld1q_u32((uint32_t *)&dst[x]);
367 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
368 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
370 const uint8x8_t src8_low = vget_low_u8(src8);
371 const uint8x8_t dst8_low = vget_low_u8(dst8);
373 const uint8x8_t src8_high = vget_high_u8(src8);
374 const uint8x8_t dst8_high = vget_high_u8(dst8);
376 const uint16x8_t src16_low = vmovl_u8(src8_low);
377 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
379 const uint16x8_t src16_high = vmovl_u8(src8_high);
380 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
382 const uint16x8_t result16_low = qvsource_over_u16(src16_low, dst16_low, half, full);
383 const uint16x8_t result16_high = qvsource_over_u16(src16_high, dst16_high, half, full);
385 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
386 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
388 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
396 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
398 dst = (quint32 *)(((uchar *) dst) + dbpl);
399 src = (
const quint32 *)(((
const uchar *) src) + sbpl);
402 }
else if (const_alpha != 0) {
403 const_alpha = (const_alpha * 255) >> 8;
404 uint16x8_t const_alpha16 = vdupq_n_u16(const_alpha);
405 for (
int y = 0; y < h; ++y) {
407 for (; x < w-3; x += 4) {
408 if (src[x] | src[x+1] | src[x+2] | src[x+3]) {
409 uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
410 uint32x4_t dst32 = vld1q_u32((uint32_t *)&dst[x]);
412 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
413 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
415 const uint8x8_t src8_low = vget_low_u8(src8);
416 const uint8x8_t dst8_low = vget_low_u8(dst8);
418 const uint8x8_t src8_high = vget_high_u8(src8);
419 const uint8x8_t dst8_high = vget_high_u8(dst8);
421 const uint16x8_t src16_low = vmovl_u8(src8_low);
422 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
424 const uint16x8_t src16_high = vmovl_u8(src8_high);
425 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
427 const uint16x8_t srcalpha16_low = qvbyte_mul_u16(src16_low, const_alpha16, half);
428 const uint16x8_t srcalpha16_high = qvbyte_mul_u16(src16_high, const_alpha16, half);
430 const uint16x8_t result16_low = qvsource_over_u16(srcalpha16_low, dst16_low, half, full);
431 const uint16x8_t result16_high = qvsource_over_u16(srcalpha16_high, dst16_high, half, full);
433 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
434 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
436 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
442 s = BYTE_MUL(s, const_alpha);
443 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
446 dst = (quint32 *)(((uchar *) dst) + dbpl);
447 src = (
const quint32 *)(((
const uchar *) src) + sbpl);
453void qt_blend_rgb32_on_rgb32(uchar *destPixels,
int dbpl,
454 const uchar *srcPixels,
int sbpl,
458void qt_blend_rgb32_on_rgb32_neon(uchar *destPixels,
int dbpl,
459 const uchar *srcPixels,
int sbpl,
463 if (const_alpha != 256) {
464 if (const_alpha != 0) {
465 const uint *src = (
const uint *) srcPixels;
466 uint *dst = (uint *) destPixels;
467 uint16x8_t half = vdupq_n_u16(0x80);
468 const_alpha = (const_alpha * 255) >> 8;
469 int one_minus_const_alpha = 255 - const_alpha;
470 uint16x8_t const_alpha16 = vdupq_n_u16(const_alpha);
471 uint16x8_t one_minus_const_alpha16 = vdupq_n_u16(255 - const_alpha);
472 for (
int y = 0; y < h; ++y) {
474 for (; x < w-3; x += 4) {
475 uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
476 uint32x4_t dst32 = vld1q_u32((uint32_t *)&dst[x]);
478 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
479 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
481 const uint8x8_t src8_low = vget_low_u8(src8);
482 const uint8x8_t dst8_low = vget_low_u8(dst8);
484 const uint8x8_t src8_high = vget_high_u8(src8);
485 const uint8x8_t dst8_high = vget_high_u8(dst8);
487 const uint16x8_t src16_low = vmovl_u8(src8_low);
488 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
490 const uint16x8_t src16_high = vmovl_u8(src8_high);
491 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
493 const uint16x8_t result16_low = qvinterpolate_pixel_255(src16_low, const_alpha16, dst16_low, one_minus_const_alpha16, half);
494 const uint16x8_t result16_high = qvinterpolate_pixel_255(src16_high, const_alpha16, dst16_high, one_minus_const_alpha16, half);
496 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
497 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
499 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
502 dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha);
504 dst = (quint32 *)(((uchar *) dst) + dbpl);
505 src = (
const quint32 *)(((
const uchar *) src) + sbpl);
509 qt_blend_rgb32_on_rgb32(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
513#if defined(ENABLE_PIXMAN_DRAWHELPERS)
514extern void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer,
515 int x,
int y,
const QRgba64 &color,
517 int mapWidth,
int mapHeight,
int mapStride,
518 const QClipData *clip,
bool useGammaCorrection);
520void qt_alphamapblit_quint16_neon(QRasterBuffer *rasterBuffer,
521 int x,
int y,
const QRgba64 &color,
523 int mapWidth,
int mapHeight,
int mapStride,
524 const QClipData *clip,
bool useGammaCorrection)
526 if (clip || useGammaCorrection) {
527 qt_alphamapblit_quint16(rasterBuffer, x, y, color, bitmap, mapWidth, mapHeight, mapStride, clip, useGammaCorrection);
531 quint16 *dest =
reinterpret_cast<quint16*>(rasterBuffer->scanLine(y)) + x;
532 const int destStride = rasterBuffer->bytesPerLine() /
sizeof(quint16);
534 uchar *mask =
const_cast<uchar *>(bitmap);
535 const uint c = color.toArgb32();
537 pixman_composite_over_n_8_0565_asm_neon(mapWidth, mapHeight, dest, destStride, c, 0, mask, mapStride);
540extern "C" void blend_8_pixels_rgb16_on_rgb16_neon(quint16 *dst,
const quint16 *src,
int const_alpha);
542template <
typename SRC,
typename BlendFunc>
543struct Blend_on_RGB16_SourceAndConstAlpha_Neon {
544 Blend_on_RGB16_SourceAndConstAlpha_Neon(BlendFunc blender,
int const_alpha)
547 , m_const_alpha(const_alpha)
551 inline void write(quint16 *dst, quint32 src)
553 srcBuffer[m_index++] = src;
556 m_blender(dst - 7, srcBuffer, m_const_alpha);
561 inline void flush(quint16 *dst)
564 quint16 dstBuffer[8];
565 for (
int i = 0; i < m_index; ++i)
566 dstBuffer[i] = dst[i - m_index];
568 m_blender(dstBuffer, srcBuffer, m_const_alpha);
570 for (
int i = 0; i < m_index; ++i)
571 dst[i - m_index] = dstBuffer[i];
584template <
typename SRC,
typename BlendFunc>
585Blend_on_RGB16_SourceAndConstAlpha_Neon<SRC, BlendFunc>
586Blend_on_RGB16_SourceAndConstAlpha_Neon_create(BlendFunc blender,
int const_alpha)
588 return Blend_on_RGB16_SourceAndConstAlpha_Neon<SRC, BlendFunc>(blender, const_alpha);
591void qt_scale_image_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
592 const uchar *srcPixels,
int sbpl,
int srch,
593 const QRectF &targetRect,
594 const QRectF &sourceRect,
598 if (const_alpha == 0)
601 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip,
602 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint32>(blend_8_pixels_argb32_on_rgb16_neon, const_alpha));
605void qt_scale_image_rgb16_on_rgb16(uchar *destPixels,
int dbpl,
606 const uchar *srcPixels,
int sbpl,
int srch,
607 const QRectF &targetRect,
608 const QRectF &sourceRect,
612void qt_scale_image_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
613 const uchar *srcPixels,
int sbpl,
int srch,
614 const QRectF &targetRect,
615 const QRectF &sourceRect,
619 if (const_alpha == 0)
622 if (const_alpha == 256) {
623 qt_scale_image_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip, const_alpha);
627 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip,
628 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint16>(blend_8_pixels_rgb16_on_rgb16_neon, const_alpha));
631extern void qt_transform_image_rgb16_on_rgb16(uchar *destPixels,
int dbpl,
632 const uchar *srcPixels,
int sbpl,
633 const QRectF &targetRect,
634 const QRectF &sourceRect,
636 const QTransform &targetRectTransform,
639void qt_transform_image_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
640 const uchar *srcPixels,
int sbpl,
641 const QRectF &targetRect,
642 const QRectF &sourceRect,
644 const QTransform &targetRectTransform,
647 if (const_alpha == 0)
650 if (const_alpha == 256) {
651 qt_transform_image_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, targetRect, sourceRect, clip, targetRectTransform, const_alpha);
655 qt_transform_image(
reinterpret_cast<quint16 *>(destPixels), dbpl,
656 reinterpret_cast<
const quint16 *>(srcPixels), sbpl, targetRect, sourceRect, clip, targetRectTransform,
657 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint16>(blend_8_pixels_rgb16_on_rgb16_neon, const_alpha));
660void qt_transform_image_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
661 const uchar *srcPixels,
int sbpl,
662 const QRectF &targetRect,
663 const QRectF &sourceRect,
665 const QTransform &targetRectTransform,
668 if (const_alpha == 0)
671 qt_transform_image(
reinterpret_cast<quint16 *>(destPixels), dbpl,
672 reinterpret_cast<
const quint32 *>(srcPixels), sbpl, targetRect, sourceRect, clip, targetRectTransform,
673 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint32>(blend_8_pixels_argb32_on_rgb16_neon, const_alpha));
676static inline void convert_8_pixels_rgb16_to_argb32(quint32 *dst,
const quint16 *src)
679 "vld1.16 { d0, d1 }, [%[SRC]]\n\t"
682
683 "vshrn.u16 d4, q0, #8\n\t"
684 "vshrn.u16 d3, q0, #3\n\t"
685 "vsli.u16 q0, q0, #5\n\t"
686 "vsri.u8 d4, d4, #5\n\t"
687 "vsri.u8 d3, d3, #6\n\t"
688 "vshrn.u16 d2, q0, #2\n\t"
694 "vst4.8 { d2, d3, d4, d5 }, [%[DST]]"
695 : : [DST]
"r" (dst), [SRC]
"r" (src)
696 :
"memory",
"r2",
"d0",
"d1",
"d2",
"d3",
"d4",
"d5"
700uint * QT_FASTCALL qt_destFetchRGB16_neon(uint *buffer, QRasterBuffer *rasterBuffer,
int x,
int y,
int length)
702 const ushort *data = (
const ushort *)rasterBuffer->scanLine(y) + x;
705 for (; i < length - 7; i += 8)
706 convert_8_pixels_rgb16_to_argb32(&buffer[i], &data[i]);
709 quint16 srcBuffer[8];
710 quint32 dstBuffer[8];
712 int tail = length - i;
713 for (
int j = 0; j < tail; ++j)
714 srcBuffer[j] = data[i + j];
716 convert_8_pixels_rgb16_to_argb32(dstBuffer, srcBuffer);
718 for (
int j = 0; j < tail; ++j)
719 buffer[i + j] = dstBuffer[j];
725static inline void convert_8_pixels_argb32_to_rgb16(quint16 *dst,
const quint32 *src)
728 "vld4.8 { d0, d1, d2, d3 }, [%[SRC]]\n\t"
731 "vshll.u8 q14, d2, #8\n\t"
732 "vshll.u8 q8, d1, #8\n\t"
733 "vshll.u8 q9, d0, #8\n\t"
734 "vsri.u16 q14, q8, #5\n\t"
735 "vsri.u16 q14, q9, #11\n\t"
737 "vst1.16 { d28, d29 }, [%[DST]]"
738 : : [DST]
"r" (dst), [SRC]
"r" (src)
739 :
"memory",
"d0",
"d1",
"d2",
"d3",
"d16",
"d17",
"d18",
"d19",
"d28",
"d29"
743void QT_FASTCALL qt_destStoreRGB16_neon(QRasterBuffer *rasterBuffer,
int x,
int y,
const uint *buffer,
int length)
745 quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x;
748 for (; i < length - 7; i += 8)
749 convert_8_pixels_argb32_to_rgb16(&data[i], &buffer[i]);
752 quint32 srcBuffer[8];
753 quint16 dstBuffer[8];
755 int tail = length - i;
756 for (
int j = 0; j < tail; ++j)
757 srcBuffer[j] = buffer[i + j];
759 convert_8_pixels_argb32_to_rgb16(dstBuffer, srcBuffer);
761 for (
int j = 0; j < tail; ++j)
762 data[i + j] = dstBuffer[j];
767void QT_FASTCALL comp_func_solid_SourceOver_neon(uint *destPixels,
int length, uint color, uint const_alpha)
769 if ((const_alpha & qAlpha(color)) == 255) {
770 qt_memfill32(destPixels, color, length);
772 if (const_alpha != 255)
773 color = BYTE_MUL(color, const_alpha);
775 const quint32 minusAlphaOfColor = qAlpha(~color);
778 uint32_t *dst = (uint32_t *) destPixels;
779 const uint32x4_t colorVector = vdupq_n_u32(color);
780 uint16x8_t half = vdupq_n_u16(0x80);
781 const uint16x8_t minusAlphaOfColorVector = vdupq_n_u16(minusAlphaOfColor);
783 for (; x < length-3; x += 4) {
784 uint32x4_t dstVector = vld1q_u32(&dst[x]);
786 const uint8x16_t dst8 = vreinterpretq_u8_u32(dstVector);
788 const uint8x8_t dst8_low = vget_low_u8(dst8);
789 const uint8x8_t dst8_high = vget_high_u8(dst8);
791 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
792 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
794 const uint16x8_t result16_low = qvbyte_mul_u16(dst16_low, minusAlphaOfColorVector, half);
795 const uint16x8_t result16_high = qvbyte_mul_u16(dst16_high, minusAlphaOfColorVector, half);
797 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
798 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
800 uint32x4_t blendedPixels = vcombine_u32(result32_low, result32_high);
801 uint32x4_t colorPlusBlendedPixels = vaddq_u32(colorVector, blendedPixels);
802 vst1q_u32(&dst[x], colorPlusBlendedPixels);
805 SIMD_EPILOGUE(x, length, 3)
806 destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor);
810void QT_FASTCALL comp_func_Plus_neon(uint *dst,
const uint *src,
int length, uint const_alpha)
812 if (const_alpha == 255) {
813 uint *
const end = dst + length;
814 uint *
const neonEnd = end - 3;
816 while (dst < neonEnd) {
817 uint8x16_t vs = vld1q_u8((
const uint8_t*)src);
818 const uint8x16_t vd = vld1q_u8((uint8_t*)dst);
819 vs = vqaddq_u8(vs, vd);
820 vst1q_u8((uint8_t*)dst, vs);
826 *dst = comp_func_Plus_one_pixel(*dst, *src);
832 const int one_minus_const_alpha = 255 - const_alpha;
833 const uint16x8_t constAlphaVector = vdupq_n_u16(const_alpha);
834 const uint16x8_t oneMinusconstAlphaVector = vdupq_n_u16(one_minus_const_alpha);
836 const uint16x8_t half = vdupq_n_u16(0x80);
837 for (; x < length - 3; x += 4) {
838 const uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
839 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
840 uint8x16_t dst8 = vld1q_u8((uint8_t *)&dst[x]);
841 uint8x16_t result = vqaddq_u8(dst8, src8);
843 uint16x8_t result_low = vmovl_u8(vget_low_u8(result));
844 uint16x8_t result_high = vmovl_u8(vget_high_u8(result));
846 uint16x8_t dst_low = vmovl_u8(vget_low_u8(dst8));
847 uint16x8_t dst_high = vmovl_u8(vget_high_u8(dst8));
849 result_low = qvinterpolate_pixel_255(result_low, constAlphaVector, dst_low, oneMinusconstAlphaVector, half);
850 result_high = qvinterpolate_pixel_255(result_high, constAlphaVector, dst_high, oneMinusconstAlphaVector, half);
852 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result_low));
853 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result_high));
854 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
857 SIMD_EPILOGUE(x, length, 3)
858 dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
862#if defined(ENABLE_PIXMAN_DRAWHELPERS)
863static const int tileSize = 32;
865extern "C" void qt_rotate90_16_neon(quint16 *dst,
const quint16 *src,
int sstride,
int dstride,
int count);
867void qt_memrotate90_16_neon(
const uchar *srcPixels,
int w,
int h,
int sstride, uchar *destPixels,
int dstride)
869 const ushort *src = (
const ushort *)srcPixels;
870 ushort *dest = (ushort *)destPixels;
872 sstride /=
sizeof(ushort);
873 dstride /=
sizeof(ushort);
875 const int pack =
sizeof(quint32) /
sizeof(ushort);
876 const int unaligned =
877 qMin(uint((quintptr(dest) & (
sizeof(quint32)-1)) /
sizeof(ushort)), uint(h));
878 const int restX = w % tileSize;
879 const int restY = (h - unaligned) % tileSize;
880 const int unoptimizedY = restY % pack;
881 const int numTilesX = w / tileSize + (restX > 0);
882 const int numTilesY = (h - unaligned) / tileSize + (restY >= pack);
884 for (
int tx = 0; tx < numTilesX; ++tx) {
885 const int startx = w - tx * tileSize - 1;
886 const int stopx = qMax(startx - tileSize, 0);
889 for (
int x = startx; x >= stopx; --x) {
890 ushort *d = dest + (w - x - 1) * dstride;
891 for (
int y = 0; y < unaligned; ++y) {
892 *d++ = src[y * sstride + x];
897 for (
int ty = 0; ty < numTilesY; ++ty) {
898 const int starty = ty * tileSize + unaligned;
899 const int stopy = qMin(starty + tileSize, h - unoptimizedY);
903 for (; x >= stopx + 7; x -= 8) {
904 ushort *d = dest + (w - x - 1) * dstride + starty;
905 const ushort *s = &src[starty * sstride + x - 7];
906 qt_rotate90_16_neon(d, s, sstride * 2, dstride * 2, stopy - starty);
909 for (; x >= stopx; --x) {
910 quint32 *d =
reinterpret_cast<quint32*>(dest + (w - x - 1) * dstride + starty);
911 for (
int y = starty; y < stopy; y += pack) {
912 quint32 c = src[y * sstride + x];
913 for (
int i = 1; i < pack; ++i) {
914 const int shift = (
sizeof(
int) * 8 / pack * i);
915 const ushort color = src[(y + i) * sstride + x];
924 const int starty = h - unoptimizedY;
925 for (
int x = startx; x >= stopx; --x) {
926 ushort *d = dest + (w - x - 1) * dstride + starty;
927 for (
int y = starty; y < h; ++y) {
928 *d++ = src[y * sstride + x];
935extern "C" void qt_rotate270_16_neon(quint16 *dst,
const quint16 *src,
int sstride,
int dstride,
int count);
937void qt_memrotate270_16_neon(
const uchar *srcPixels,
int w,
int h,
939 uchar *destPixels,
int dstride)
941 const ushort *src = (
const ushort *)srcPixels;
942 ushort *dest = (ushort *)destPixels;
944 sstride /=
sizeof(ushort);
945 dstride /=
sizeof(ushort);
947 const int pack =
sizeof(quint32) /
sizeof(ushort);
948 const int unaligned =
949 qMin(uint((
long(dest) & (
sizeof(quint32)-1)) /
sizeof(ushort)), uint(h));
950 const int restX = w % tileSize;
951 const int restY = (h - unaligned) % tileSize;
952 const int unoptimizedY = restY % pack;
953 const int numTilesX = w / tileSize + (restX > 0);
954 const int numTilesY = (h - unaligned) / tileSize + (restY >= pack);
956 for (
int tx = 0; tx < numTilesX; ++tx) {
957 const int startx = tx * tileSize;
958 const int stopx = qMin(startx + tileSize, w);
961 for (
int x = startx; x < stopx; ++x) {
962 ushort *d = dest + x * dstride;
963 for (
int y = h - 1; y >= h - unaligned; --y) {
964 *d++ = src[y * sstride + x];
969 for (
int ty = 0; ty < numTilesY; ++ty) {
970 const int starty = h - 1 - unaligned - ty * tileSize;
971 const int stopy = qMax(starty - tileSize, unoptimizedY);
975 for (; x < stopx - 7; x += 8) {
976 ushort *d = dest + x * dstride + h - 1 - starty;
977 const ushort *s = &src[starty * sstride + x];
978 qt_rotate90_16_neon(d + 7 * dstride, s, -sstride * 2, -dstride * 2, starty - stopy);
981 for (; x < stopx; ++x) {
982 quint32 *d =
reinterpret_cast<quint32*>(dest + x * dstride
984 for (
int y = starty; y > stopy; y -= pack) {
985 quint32 c = src[y * sstride + x];
986 for (
int i = 1; i < pack; ++i) {
987 const int shift = (
sizeof(
int) * 8 / pack * i);
988 const ushort color = src[(y - i) * sstride + x];
996 const int starty = unoptimizedY - 1;
997 for (
int x = startx; x < stopx; ++x) {
998 ushort *d = dest + x * dstride + h - 1 - starty;
999 for (
int y = starty; y >= 0; --y) {
1000 *d++ = src[y * sstride + x];
1012 Int32x4() =
default;
1013 Int32x4(int32x4_t v) : v(v) {}
1015 operator int32x4_t()
const {
return v; }
1018 Float32x4() =
default;
1019 Float32x4(float32x4_t v) : v(v) {};
1021 operator float32x4_t()
const {
return v; }
1024 union Vect_buffer_i { Int32x4 v;
int i[4]; };
1025 union Vect_buffer_f { Float32x4 v;
float f[4]; };
1027 static inline Float32x4 v_dup(
double x) {
return vdupq_n_f32(
float(x)); }
1028 static inline Float32x4 v_dup(
float x) {
return vdupq_n_f32(x); }
1029 static inline Int32x4 v_dup(
int x) {
return vdupq_n_s32(x); }
1030 static inline Int32x4 v_dup(uint x) {
return vdupq_n_s32(x); }
1032 static inline Float32x4 v_add(Float32x4 a, Float32x4 b) {
return vaddq_f32(a, b); }
1033 static inline Int32x4 v_add(Int32x4 a, Int32x4 b) {
return vaddq_s32(a, b); }
1035 static inline Float32x4 v_max(Float32x4 a, Float32x4 b) {
return vmaxq_f32(a, b); }
1036 static inline Float32x4 v_min(Float32x4 a, Float32x4 b) {
return vminq_f32(a, b); }
1037 static inline Int32x4 v_min_16(Int32x4 a, Int32x4 b) {
return vminq_s32(a, b); }
1039 static inline Int32x4 v_and(Int32x4 a, Int32x4 b) {
return vandq_s32(a, b); }
1041 static inline Float32x4 v_sub(Float32x4 a, Float32x4 b) {
return vsubq_f32(a, b); }
1042 static inline Int32x4 v_sub(Int32x4 a, Int32x4 b) {
return vsubq_s32(a, b); }
1044 static inline Float32x4 v_mul(Float32x4 a, Float32x4 b) {
return vmulq_f32(a, b); }
1046 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); }
1048 static inline Int32x4 v_toInt(Float32x4 x) {
return vcvtq_s32_f32(x); }
1050 static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) {
return vreinterpretq_s32_u32(vcgeq_f32(a, b)); }
1053const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer,
const Operator *op,
const QSpanData *data,
1054 int y,
int x,
int length)
1056 return qt_fetch_radial_gradient_template<QRadialFetchSimd<QSimdNeon>,uint>(buffer, op, data, y, x, length);
1059extern void QT_FASTCALL qt_convert_rgb888_to_rgb32_neon(quint32 *dst,
const uchar *src,
int len);
1061const uint * QT_FASTCALL qt_fetchUntransformed_888_neon(uint *buffer,
const Operator *,
const QSpanData *data,
1062 int y,
int x,
int length)
1064 const uchar *line = data->texture.scanLine(y) + x * 3;
1065 qt_convert_rgb888_to_rgb32_neon(buffer, line, length);
1069#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
1070static inline uint32x4_t vrgba2argb(uint32x4_t srcVector)
1072#if defined(Q_PROCESSOR_ARM_64)
1073 const uint8x16_t rgbaMask = qvsetq_n_u8(2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15);
1075 const uint8x8_t rgbaMask = qvset_n_u8(2, 1, 0, 3, 6, 5, 4, 7);
1077#if defined(Q_PROCESSOR_ARM_64)
1078 srcVector = vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(srcVector), rgbaMask));
1081 const uint8x8_t low = vtbl1_u8(vreinterpret_u8_u32(vget_low_u32(srcVector)), rgbaMask);
1082 const uint8x8_t high = vtbl1_u8(vreinterpret_u8_u32(vget_high_u32(srcVector)), rgbaMask);
1083 srcVector = vcombine_u32(vreinterpret_u32_u8(low), vreinterpret_u32_u8(high));
1089static inline void convertARGBToARGB32PM_neon(uint *buffer,
const uint *src,
int count)
1092 const uint8x8_t shuffleMask = qvset_n_u8(3, 3, 3, 3, 7, 7, 7, 7);
1093 const uint32x4_t blendMask = vdupq_n_u32(0xff000000);
1095 for (; i < count - 3; i += 4) {
1096 uint32x4_t srcVector = vld1q_u32(src + i);
1097 uint32x4_t alphaVector = vshrq_n_u32(srcVector, 24);
1098#if defined(Q_PROCESSOR_ARM_64)
1099 uint32_t alphaSum = vaddvq_u32(alphaVector);
1102 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1103 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1106 if (alphaSum != 255 * 4) {
1108 srcVector = vrgba2argb(srcVector);
1109 const uint8x8_t s1 = vreinterpret_u8_u32(vget_low_u32(srcVector));
1110 const uint8x8_t s2 = vreinterpret_u8_u32(vget_high_u32(srcVector));
1111 const uint8x8_t alpha1 = vtbl1_u8(s1, shuffleMask);
1112 const uint8x8_t alpha2 = vtbl1_u8(s2, shuffleMask);
1113 uint16x8_t src1 = vmull_u8(s1, alpha1);
1114 uint16x8_t src2 = vmull_u8(s2, alpha2);
1115 src1 = vsraq_n_u16(src1, src1, 8);
1116 src2 = vsraq_n_u16(src2, src2, 8);
1117 const uint8x8_t d1 = vrshrn_n_u16(src1, 8);
1118 const uint8x8_t d2 = vrshrn_n_u16(src2, 8);
1119 const uint32x4_t d = vbslq_u32(blendMask, srcVector, vreinterpretq_u32_u8(vcombine_u8(d1, d2)));
1120 vst1q_u32(buffer + i, d);
1123 vst1q_u32(buffer + i, vrgba2argb(srcVector));
1124 else if (buffer != src)
1125 vst1q_u32(buffer + i, srcVector);
1128 vst1q_u32(buffer + i, vdupq_n_u32(0));
1132 SIMD_EPILOGUE(i, count, 3) {
1133 uint v = qPremultiply(src[i]);
1134 buffer[i] = RGBA ? RGBA2ARGB(v) : v;
1139static inline void convertARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count)
1144 const uint8x8_t shuffleMask = qvset_n_u8(3, 3, 3, 3, 7, 7, 7, 7);
1145 const uint64x2_t blendMask = vdupq_n_u64(Q_UINT64_C(0xffff000000000000));
1148 for (; i < count-3; i += 4) {
1149 uint32x4_t vs32 = vld1q_u32(src + i);
1150 uint32x4_t alphaVector = vshrq_n_u32(vs32, 24);
1151#if defined(Q_PROCESSOR_ARM_64)
1152 uint32_t alphaSum = vaddvq_u32(alphaVector);
1155 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1156 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1160 vs32 = vrgba2argb(vs32);
1161 const uint8x16_t vs8 = vreinterpretq_u8_u32(vs32);
1162 const uint8x16x2_t v = vzipq_u8(vs8, vs8);
1163 if (alphaSum != 255 * 4) {
1164 const uint8x8_t s1 = vreinterpret_u8_u32(vget_low_u32(vs32));
1165 const uint8x8_t s2 = vreinterpret_u8_u32(vget_high_u32(vs32));
1166 const uint8x8_t alpha1 = vtbl1_u8(s1, shuffleMask);
1167 const uint8x8_t alpha2 = vtbl1_u8(s2, shuffleMask);
1168 uint16x8_t src1 = vmull_u8(s1, alpha1);
1169 uint16x8_t src2 = vmull_u8(s2, alpha2);
1171 src1 = vsraq_n_u16(src1, src1, 7);
1172 src2 = vsraq_n_u16(src2, src2, 7);
1175 const uint64x2_t d1 = vbslq_u64(blendMask, vreinterpretq_u64_u8(v.val[0]), vreinterpretq_u64_u16(src1));
1176 const uint64x2_t d2 = vbslq_u64(blendMask, vreinterpretq_u64_u8(v.val[1]), vreinterpretq_u64_u16(src2));
1178 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u64(d1));
1180 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u64(d2));
1183 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u8(v.val[0]));
1185 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u8(v.val[1]));
1189 vst1q_u16((uint16_t *)buffer, vdupq_n_u16(0));
1191 vst1q_u16((uint16_t *)buffer, vdupq_n_u16(0));
1196 SIMD_EPILOGUE(i, count, 3) {
1200 *buffer++ = QRgba64::fromArgb32(s).premultiplied();
1204static inline float32x4_t reciprocal_mul_ps(float32x4_t a,
float mul)
1206 float32x4_t ia = vrecpeq_f32(a);
1207 ia = vmulq_f32(vrecpsq_f32(a, ia), vmulq_n_f32(ia, mul));
1211template<
bool RGBA,
bool RGBx>
1212static inline void convertARGBFromARGB32PM_neon(uint *buffer,
const uint *src,
int count)
1215 const uint32x4_t alphaMask = vdupq_n_u32(0xff000000);
1217 for (; i < count - 3; i += 4) {
1218 uint32x4_t srcVector = vld1q_u32(src + i);
1219 uint32x4_t alphaVector = vshrq_n_u32(srcVector, 24);
1220#if defined(Q_PROCESSOR_ARM_64)
1221 uint32_t alphaSum = vaddvq_u32(alphaVector);
1224 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1225 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1228 if (alphaSum != 255 * 4) {
1230 srcVector = vrgba2argb(srcVector);
1231 const float32x4_t a = vcvtq_f32_u32(alphaVector);
1232 const float32x4_t ia = reciprocal_mul_ps(a, 255.0f);
1234 uint16x8_t tmp1 = vmovl_u8(vget_low_u8(vreinterpretq_u8_u32(srcVector)));
1235 uint16x8_t tmp3 = vmovl_u8(vget_high_u8(vreinterpretq_u8_u32(srcVector)));
1236 float32x4_t src1 = vcvtq_f32_u32(vmovl_u16(vget_low_u16(tmp1)));
1237 float32x4_t src2 = vcvtq_f32_u32(vmovl_u16(vget_high_u16(tmp1)));
1238 float32x4_t src3 = vcvtq_f32_u32(vmovl_u16(vget_low_u16(tmp3)));
1239 float32x4_t src4 = vcvtq_f32_u32(vmovl_u16(vget_high_u16(tmp3)));
1240 src1 = vmulq_lane_f32(src1, vget_low_f32(ia), 0);
1241 src2 = vmulq_lane_f32(src2, vget_low_f32(ia), 1);
1242 src3 = vmulq_lane_f32(src3, vget_high_f32(ia), 0);
1243 src4 = vmulq_lane_f32(src4, vget_high_f32(ia), 1);
1245 tmp1 = vcombine_u16(vrshrn_n_u32(vcvtq_n_u32_f32(src1, 1), 1),
1246 vrshrn_n_u32(vcvtq_n_u32_f32(src2, 1), 1));
1247 tmp3 = vcombine_u16(vrshrn_n_u32(vcvtq_n_u32_f32(src3, 1), 1),
1248 vrshrn_n_u32(vcvtq_n_u32_f32(src4, 1), 1));
1249 uint32x4_t dstVector = vreinterpretq_u32_u8(vcombine_u8(vmovn_u16(tmp1), vmovn_u16(tmp3)));
1251#if defined(Q_PROCESSOR_ARM_64)
1252 uint32x4_t srcVectorAlphaMask = vceqzq_u32(alphaVector);
1254 uint32x4_t srcVectorAlphaMask = vceqq_u32(alphaVector, vdupq_n_u32(0));
1256 dstVector = vbicq_u32(dstVector, srcVectorAlphaMask);
1259 dstVector = vorrq_u32(alphaMask, dstVector);
1261 dstVector = vbslq_u32(alphaMask, srcVector, dstVector);
1262 vst1q_u32(&buffer[i], dstVector);
1266 vst1q_u32(&buffer[i], vrgba2argb(srcVector));
1267 else if (buffer != src)
1268 vst1q_u32(&buffer[i], srcVector);
1273 vst1q_u32(&buffer[i], alphaMask);
1275 vst1q_u32(&buffer[i], vdupq_n_u32(0));
1279 SIMD_EPILOGUE(i, count, 3) {
1280 uint v = qUnpremultiply(src[i]);
1289void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer,
int count,
const QList<QRgb> *)
1291 convertARGBToARGB32PM_neon<
false>(buffer, buffer, count);
1294void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer,
int count,
const QList<QRgb> *)
1296 convertARGBToARGB32PM_neon<
true>(buffer, buffer, count);
1299const uint *QT_FASTCALL fetchARGB32ToARGB32PM_neon(uint *buffer,
const uchar *src,
int index,
int count,
1300 const QList<QRgb> *, QDitherInfo *)
1302 convertARGBToARGB32PM_neon<
false>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1306const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_neon(uint *buffer,
const uchar *src,
int index,
int count,
1307 const QList<QRgb> *, QDitherInfo *)
1309 convertARGBToARGB32PM_neon<
true>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1313const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count,
1314 const QList<QRgb> *, QDitherInfo *)
1316 convertARGB32ToRGBA64PM_neon<
false>(buffer, src, count);
1320const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count,
1321 const QList<QRgb> *, QDitherInfo *)
1323 convertARGB32ToRGBA64PM_neon<
true>(buffer, src, count);
1327const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uchar *src,
int index,
int count,
1328 const QList<QRgb> *, QDitherInfo *)
1330 convertARGB32ToRGBA64PM_neon<
false>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1334const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_neon(QRgba64 *buffer,
const uchar *src,
int index,
int count,
1335 const QList<QRgb> *, QDitherInfo *)
1337 convertARGB32ToRGBA64PM_neon<
true>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1341void QT_FASTCALL storeRGB32FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1342 const QList<QRgb> *, QDitherInfo *)
1344 uint *d =
reinterpret_cast<uint *>(dest) + index;
1345 convertARGBFromARGB32PM_neon<
false,
true>(d, src, count);
1348void QT_FASTCALL storeARGB32FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1349 const QList<QRgb> *, QDitherInfo *)
1351 uint *d =
reinterpret_cast<uint *>(dest) + index;
1352 convertARGBFromARGB32PM_neon<
false,
false>(d, src, count);
1355void QT_FASTCALL storeRGBA8888FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1356 const QList<QRgb> *, QDitherInfo *)
1358 uint *d =
reinterpret_cast<uint *>(dest) + index;
1359 convertARGBFromARGB32PM_neon<
true,
false>(d, src, count);
1362void QT_FASTCALL storeRGBXFromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1363 const QList<QRgb> *, QDitherInfo *)
1365 uint *d =
reinterpret_cast<uint *>(dest) + index;
1366 convertARGBFromARGB32PM_neon<
true,
true>(d, src, count);