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;
19#if defined(Q_CC_GHS) || defined(Q_CC_MSVC)
22 quint32 *
const neonEnd = dest + count - epilogueSize;
23 const uint32x4_t valueVector1 = vdupq_n_u32(value);
24 const uint32x4x4_t valueVector4 = { valueVector1, valueVector1, valueVector1, valueVector1 };
26 vst4q_u32(dest, valueVector4);
28 }
while (dest != neonEnd);
30#elif !defined(Q_PROCESSOR_ARM_64)
32 quint32 *
const neonEnd = dest + count - epilogueSize;
33 register uint32x4_t valueVector1
asm (
"q0") = vdupq_n_u32(value);
34 register uint32x4_t valueVector2
asm (
"q1") = valueVector1;
35 while (dest != neonEnd) {
37 "vst2.32 { d0, d1, d2, d3 }, [%[DST]] !\n\t"
38 "vst2.32 { d0, d1, d2, d3 }, [%[DST]] !\n\t"
40 : [VALUE1]
"w"(valueVector1), [VALUE2]
"w"(valueVector2)
47 quint32 *
const neonEnd = dest + count - epilogueSize;
48 register uint32x4_t valueVector1
asm (
"v0") = vdupq_n_u32(value);
49 register uint32x4_t valueVector2
asm (
"v1") = valueVector1;
50 while (dest != neonEnd) {
52 "st2 { v0.4s, v1.4s }, [%[DST]], #32 \n\t"
53 "st2 { v0.4s, v1.4s }, [%[DST]], #32 \n\t"
55 : [VALUE1]
"w"(valueVector1), [VALUE2]
"w"(valueVector2)
64 case 15: *dest++ = value; Q_FALLTHROUGH();
65 case 14: *dest++ = value; Q_FALLTHROUGH();
66 case 13: *dest++ = value; Q_FALLTHROUGH();
67 case 12: *dest++ = value; Q_FALLTHROUGH();
68 case 11: *dest++ = value; Q_FALLTHROUGH();
69 case 10: *dest++ = value; Q_FALLTHROUGH();
70 case 9: *dest++ = value; Q_FALLTHROUGH();
71 case 8: *dest++ = value; Q_FALLTHROUGH();
72 case 7: *dest++ = value; Q_FALLTHROUGH();
73 case 6: *dest++ = value; Q_FALLTHROUGH();
74 case 5: *dest++ = value; Q_FALLTHROUGH();
75 case 4: *dest++ = value; Q_FALLTHROUGH();
76 case 3: *dest++ = value; Q_FALLTHROUGH();
77 case 2: *dest++ = value; Q_FALLTHROUGH();
78 case 1: *dest++ = value;
82static inline uint16x8_t qvdiv_255_u16(uint16x8_t x, uint16x8_t half)
86 const uint16x8_t temp = vshrq_n_u16(x, 8);
87 const uint16x8_t sum_part = vaddq_u16(x, half);
88 const uint16x8_t sum = vaddq_u16(temp, sum_part);
90 return vshrq_n_u16(sum, 8);
93static inline uint16x8_t qvbyte_mul_u16(uint16x8_t x, uint16x8_t alpha, uint16x8_t half)
97 const uint16x8_t t = vmulq_u16(x, alpha);
98 return qvdiv_255_u16(t, half);
101static inline uint16x8_t qvinterpolate_pixel_255(uint16x8_t x, uint16x8_t a, uint16x8_t y, uint16x8_t b, uint16x8_t half)
105 const uint16x8_t ta = vmulq_u16(x, a);
106 const uint16x8_t tb = vmulq_u16(y, b);
108 return qvdiv_255_u16(vaddq_u16(ta, tb), half);
111static inline uint16x8_t qvsource_over_u16(uint16x8_t src16, uint16x8_t dst16, uint16x8_t half, uint16x8_t full)
113 const uint16x4_t alpha16_high = vdup_lane_u16(vget_high_u16(src16), 3);
114 const uint16x4_t alpha16_low = vdup_lane_u16(vget_low_u16(src16), 3);
116 const uint16x8_t alpha16 = vsubq_u16(full, vcombine_u16(alpha16_low, alpha16_high));
118 return vaddq_u16(src16, qvbyte_mul_u16(dst16, alpha16, half));
121#if defined(ENABLE_PIXMAN_DRAWHELPERS)
123pixman_composite_over_8888_0565_asm_neon (int32_t w,
131pixman_composite_over_8888_8888_asm_neon (int32_t w,
139pixman_composite_src_0565_8888_asm_neon (int32_t w,
147pixman_composite_over_n_8_0565_asm_neon (int32_t w,
154 int32_t mask_stride);
157pixman_composite_scanline_over_asm_neon (int32_t w,
159 const uint32_t *src);
162pixman_composite_src_0565_0565_asm_neon (int32_t w,
169void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels,
int dbpl,
170 const uchar *srcPixels,
int sbpl,
174void qt_blend_rgb16_on_argb32_neon(uchar *destPixels,
int dbpl,
175 const uchar *srcPixels,
int sbpl,
182 quint32 *dst = (quint32 *) destPixels;
183 quint16 *src = (quint16 *) srcPixels;
185 if (const_alpha != 256) {
186 quint8 a = (255 * const_alpha) >> 8;
190 for (
int x=0; x<w; ++x)
191 dst[x] = INTERPOLATE_PIXEL_255(qConvertRgb16To32(src[x]), a, dst[x], ia);
198 pixman_composite_src_0565_8888_asm_neon(w, h, dst, dbpl, src, sbpl);
202void qt_blend_rgb16_on_rgb16(uchar *dst,
int dbpl,
203 const uchar *src,
int sbpl,
209static inline void scanLineBlit16(quint16 *dst, quint16 *src,
int dstride)
212 ((quint32 *)dst)[0] = ((quint32 *)src)[0];
213 __builtin_prefetch(dst + dstride, 1, 0);
215 for (
int i = 1; i < N/2; ++i)
216 ((quint32 *)dst)[i] = ((quint32 *)src)[i];
222static inline void blockBlit16(quint16 *dst, quint16 *src,
int dstride,
int sstride,
int h)
236 scanLineBlit16<Width-1>(dst + 1, src + 1, dstride);
242 scanLineBlit16<Width>(dst, src, dstride);
250void qt_blend_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
251 const uchar *srcPixels,
int sbpl,
256 if (const_alpha != 256 || w >= 150) {
257 qt_blend_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
261 int dstride = dbpl / 2;
262 int sstride = sbpl / 2;
264 quint16 *dst = (quint16 *) destPixels;
265 quint16 *src = (quint16 *) srcPixels;
268#define BLOCKBLIT(n) case n: blockBlit16<n>(dst, src, dstride, sstride, h); return;
289 pixman_composite_src_0565_0565_asm_neon (w, h, dst, dstride, src, sstride);
292extern "C" void blend_8_pixels_argb32_on_rgb16_neon(quint16 *dst,
const quint32 *src,
int const_alpha);
294void qt_blend_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
295 const uchar *srcPixels,
int sbpl,
299 quint16 *dst = (quint16 *) destPixels;
300 quint32 *src = (quint32 *) srcPixels;
302 if (const_alpha != 256) {
303 for (
int y=0; y<h; ++y) {
305 for (; i < w-7; i += 8)
306 blend_8_pixels_argb32_on_rgb16_neon(&dst[i], &src[i], const_alpha);
311 quint16 dstBuffer[8];
312 quint32 srcBuffer[8];
314 for (
int j = 0; j < tail; ++j) {
315 dstBuffer[j] = dst[i + j];
316 srcBuffer[j] = src[i + j];
319 blend_8_pixels_argb32_on_rgb16_neon(dstBuffer, srcBuffer, const_alpha);
321 for (
int j = 0; j < tail; ++j)
322 dst[i + j] = dstBuffer[j];
325 dst = (quint16 *)(((uchar *) dst) + dbpl);
326 src = (quint32 *)(((uchar *) src) + sbpl);
331 pixman_composite_over_8888_0565_asm_neon(w, h, dst, dbpl / 2, src, sbpl / 4);
335void qt_blend_argb32_on_argb32_scanline_neon(uint *dest,
const uint *src,
int length, uint const_alpha)
337 if (const_alpha == 255) {
338#if defined(ENABLE_PIXMAN_DRAWHELPERS)
339 pixman_composite_scanline_over_asm_neon(length, dest, src);
341 qt_blend_argb32_on_argb32_neon((uchar *)dest, 4 * length, (uchar *)src, 4 * length, length, 1, 256);
344 qt_blend_argb32_on_argb32_neon((uchar *)dest, 4 * length, (uchar *)src, 4 * length, length, 1, (const_alpha * 256) / 255);
348void qt_blend_argb32_on_argb32_neon(uchar *destPixels,
int dbpl,
349 const uchar *srcPixels,
int sbpl,
353 const uint *src = (
const uint *) srcPixels;
354 uint *dst = (uint *) destPixels;
355 uint16x8_t half = vdupq_n_u16(0x80);
356 uint16x8_t full = vdupq_n_u16(0xff);
357 if (const_alpha == 256) {
358#if defined(ENABLE_PIXMAN_DRAWHELPERS)
359 pixman_composite_over_8888_8888_asm_neon(w, h, (uint32_t *)destPixels, dbpl / 4, (uint32_t *)srcPixels, sbpl / 4);
361 for (
int y=0; y<h; ++y) {
363 for (; x < w-3; x += 4) {
364 if (src[x] | src[x+1] | src[x+2] | src[x+3]) {
365 uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
366 uint32x4_t dst32 = vld1q_u32((uint32_t *)&dst[x]);
368 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
369 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
371 const uint8x8_t src8_low = vget_low_u8(src8);
372 const uint8x8_t dst8_low = vget_low_u8(dst8);
374 const uint8x8_t src8_high = vget_high_u8(src8);
375 const uint8x8_t dst8_high = vget_high_u8(dst8);
377 const uint16x8_t src16_low = vmovl_u8(src8_low);
378 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
380 const uint16x8_t src16_high = vmovl_u8(src8_high);
381 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
383 const uint16x8_t result16_low = qvsource_over_u16(src16_low, dst16_low, half, full);
384 const uint16x8_t result16_high = qvsource_over_u16(src16_high, dst16_high, half, full);
386 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
387 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
389 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
397 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
399 dst = (quint32 *)(((uchar *) dst) + dbpl);
400 src = (
const quint32 *)(((
const uchar *) src) + sbpl);
403 }
else if (const_alpha != 0) {
404 const_alpha = (const_alpha * 255) >> 8;
405 uint16x8_t const_alpha16 = vdupq_n_u16(const_alpha);
406 for (
int y = 0; y < h; ++y) {
408 for (; x < w-3; x += 4) {
409 if (src[x] | src[x+1] | src[x+2] | src[x+3]) {
410 uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
411 uint32x4_t dst32 = vld1q_u32((uint32_t *)&dst[x]);
413 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
414 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
416 const uint8x8_t src8_low = vget_low_u8(src8);
417 const uint8x8_t dst8_low = vget_low_u8(dst8);
419 const uint8x8_t src8_high = vget_high_u8(src8);
420 const uint8x8_t dst8_high = vget_high_u8(dst8);
422 const uint16x8_t src16_low = vmovl_u8(src8_low);
423 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
425 const uint16x8_t src16_high = vmovl_u8(src8_high);
426 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
428 const uint16x8_t srcalpha16_low = qvbyte_mul_u16(src16_low, const_alpha16, half);
429 const uint16x8_t srcalpha16_high = qvbyte_mul_u16(src16_high, const_alpha16, half);
431 const uint16x8_t result16_low = qvsource_over_u16(srcalpha16_low, dst16_low, half, full);
432 const uint16x8_t result16_high = qvsource_over_u16(srcalpha16_high, dst16_high, half, full);
434 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
435 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
437 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
443 s = BYTE_MUL(s, const_alpha);
444 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
447 dst = (quint32 *)(((uchar *) dst) + dbpl);
448 src = (
const quint32 *)(((
const uchar *) src) + sbpl);
454void qt_blend_rgb32_on_rgb32(uchar *destPixels,
int dbpl,
455 const uchar *srcPixels,
int sbpl,
459void qt_blend_rgb32_on_rgb32_neon(uchar *destPixels,
int dbpl,
460 const uchar *srcPixels,
int sbpl,
464 if (const_alpha != 256) {
465 if (const_alpha != 0) {
466 const uint *src = (
const uint *) srcPixels;
467 uint *dst = (uint *) destPixels;
468 uint16x8_t half = vdupq_n_u16(0x80);
469 const_alpha = (const_alpha * 255) >> 8;
470 int one_minus_const_alpha = 255 - const_alpha;
471 uint16x8_t const_alpha16 = vdupq_n_u16(const_alpha);
472 uint16x8_t one_minus_const_alpha16 = vdupq_n_u16(255 - const_alpha);
473 for (
int y = 0; y < h; ++y) {
475 for (; x < w-3; x += 4) {
476 uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
477 uint32x4_t dst32 = vld1q_u32((uint32_t *)&dst[x]);
479 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
480 const uint8x16_t dst8 = vreinterpretq_u8_u32(dst32);
482 const uint8x8_t src8_low = vget_low_u8(src8);
483 const uint8x8_t dst8_low = vget_low_u8(dst8);
485 const uint8x8_t src8_high = vget_high_u8(src8);
486 const uint8x8_t dst8_high = vget_high_u8(dst8);
488 const uint16x8_t src16_low = vmovl_u8(src8_low);
489 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
491 const uint16x8_t src16_high = vmovl_u8(src8_high);
492 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
494 const uint16x8_t result16_low = qvinterpolate_pixel_255(src16_low, const_alpha16, dst16_low, one_minus_const_alpha16, half);
495 const uint16x8_t result16_high = qvinterpolate_pixel_255(src16_high, const_alpha16, dst16_high, one_minus_const_alpha16, half);
497 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
498 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
500 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
503 dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha);
505 dst = (quint32 *)(((uchar *) dst) + dbpl);
506 src = (
const quint32 *)(((
const uchar *) src) + sbpl);
510 qt_blend_rgb32_on_rgb32(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
514#if defined(ENABLE_PIXMAN_DRAWHELPERS)
515extern void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer,
516 int x,
int y,
const QRgba64 &color,
518 int mapWidth,
int mapHeight,
int mapStride,
519 const QClipData *clip,
bool useGammaCorrection);
521void qt_alphamapblit_quint16_neon(QRasterBuffer *rasterBuffer,
522 int x,
int y,
const QRgba64 &color,
524 int mapWidth,
int mapHeight,
int mapStride,
525 const QClipData *clip,
bool useGammaCorrection)
527 if (clip || useGammaCorrection) {
528 qt_alphamapblit_quint16(rasterBuffer, x, y, color, bitmap, mapWidth, mapHeight, mapStride, clip, useGammaCorrection);
532 quint16 *dest =
reinterpret_cast<quint16*>(rasterBuffer->scanLine(y)) + x;
533 const int destStride = rasterBuffer->bytesPerLine() /
sizeof(quint16);
535 uchar *mask =
const_cast<uchar *>(bitmap);
536 const uint c = color.toArgb32();
538 pixman_composite_over_n_8_0565_asm_neon(mapWidth, mapHeight, dest, destStride, c, 0, mask, mapStride);
541extern "C" void blend_8_pixels_rgb16_on_rgb16_neon(quint16 *dst,
const quint16 *src,
int const_alpha);
543template <
typename SRC,
typename BlendFunc>
544struct Blend_on_RGB16_SourceAndConstAlpha_Neon {
545 Blend_on_RGB16_SourceAndConstAlpha_Neon(BlendFunc blender,
int const_alpha)
548 , m_const_alpha(const_alpha)
552 inline void write(quint16 *dst, quint32 src)
554 srcBuffer[m_index++] = src;
557 m_blender(dst - 7, srcBuffer, m_const_alpha);
562 inline void flush(quint16 *dst)
565 quint16 dstBuffer[8];
566 for (
int i = 0; i < m_index; ++i)
567 dstBuffer[i] = dst[i - m_index];
569 m_blender(dstBuffer, srcBuffer, m_const_alpha);
571 for (
int i = 0; i < m_index; ++i)
572 dst[i - m_index] = dstBuffer[i];
585template <
typename SRC,
typename BlendFunc>
586Blend_on_RGB16_SourceAndConstAlpha_Neon<SRC, BlendFunc>
587Blend_on_RGB16_SourceAndConstAlpha_Neon_create(BlendFunc blender,
int const_alpha)
589 return Blend_on_RGB16_SourceAndConstAlpha_Neon<SRC, BlendFunc>(blender, const_alpha);
592void qt_scale_image_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
593 const uchar *srcPixels,
int sbpl,
int srch,
594 const QRectF &targetRect,
595 const QRectF &sourceRect,
599 if (const_alpha == 0)
602 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip,
603 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint32>(blend_8_pixels_argb32_on_rgb16_neon, const_alpha));
606void qt_scale_image_rgb16_on_rgb16(uchar *destPixels,
int dbpl,
607 const uchar *srcPixels,
int sbpl,
int srch,
608 const QRectF &targetRect,
609 const QRectF &sourceRect,
613void qt_scale_image_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
614 const uchar *srcPixels,
int sbpl,
int srch,
615 const QRectF &targetRect,
616 const QRectF &sourceRect,
620 if (const_alpha == 0)
623 if (const_alpha == 256) {
624 qt_scale_image_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip, const_alpha);
628 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, srch, targetRect, sourceRect, clip,
629 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint16>(blend_8_pixels_rgb16_on_rgb16_neon, const_alpha));
632extern void qt_transform_image_rgb16_on_rgb16(uchar *destPixels,
int dbpl,
633 const uchar *srcPixels,
int sbpl,
634 const QRectF &targetRect,
635 const QRectF &sourceRect,
637 const QTransform &targetRectTransform,
640void qt_transform_image_rgb16_on_rgb16_neon(uchar *destPixels,
int dbpl,
641 const uchar *srcPixels,
int sbpl,
642 const QRectF &targetRect,
643 const QRectF &sourceRect,
645 const QTransform &targetRectTransform,
648 if (const_alpha == 0)
651 if (const_alpha == 256) {
652 qt_transform_image_rgb16_on_rgb16(destPixels, dbpl, srcPixels, sbpl, targetRect, sourceRect, clip, targetRectTransform, const_alpha);
656 qt_transform_image(
reinterpret_cast<quint16 *>(destPixels), dbpl,
657 reinterpret_cast<
const quint16 *>(srcPixels), sbpl, targetRect, sourceRect, clip, targetRectTransform,
658 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint16>(blend_8_pixels_rgb16_on_rgb16_neon, const_alpha));
661void qt_transform_image_argb32_on_rgb16_neon(uchar *destPixels,
int dbpl,
662 const uchar *srcPixels,
int sbpl,
663 const QRectF &targetRect,
664 const QRectF &sourceRect,
666 const QTransform &targetRectTransform,
669 if (const_alpha == 0)
672 qt_transform_image(
reinterpret_cast<quint16 *>(destPixels), dbpl,
673 reinterpret_cast<
const quint32 *>(srcPixels), sbpl, targetRect, sourceRect, clip, targetRectTransform,
674 Blend_on_RGB16_SourceAndConstAlpha_Neon_create<quint32>(blend_8_pixels_argb32_on_rgb16_neon, const_alpha));
677static inline void convert_8_pixels_rgb16_to_argb32(quint32 *dst,
const quint16 *src)
680 "vld1.16 { d0, d1 }, [%[SRC]]\n\t"
683
684 "vshrn.u16 d4, q0, #8\n\t"
685 "vshrn.u16 d3, q0, #3\n\t"
686 "vsli.u16 q0, q0, #5\n\t"
687 "vsri.u8 d4, d4, #5\n\t"
688 "vsri.u8 d3, d3, #6\n\t"
689 "vshrn.u16 d2, q0, #2\n\t"
695 "vst4.8 { d2, d3, d4, d5 }, [%[DST]]"
696 : : [DST]
"r" (dst), [SRC]
"r" (src)
697 :
"memory",
"r2",
"d0",
"d1",
"d2",
"d3",
"d4",
"d5"
701uint * QT_FASTCALL qt_destFetchRGB16_neon(uint *buffer, QRasterBuffer *rasterBuffer,
int x,
int y,
int length)
703 const ushort *data = (
const ushort *)rasterBuffer->scanLine(y) + x;
706 for (; i < length - 7; i += 8)
707 convert_8_pixels_rgb16_to_argb32(&buffer[i], &data[i]);
710 quint16 srcBuffer[8];
711 quint32 dstBuffer[8];
713 int tail = length - i;
714 for (
int j = 0; j < tail; ++j)
715 srcBuffer[j] = data[i + j];
717 convert_8_pixels_rgb16_to_argb32(dstBuffer, srcBuffer);
719 for (
int j = 0; j < tail; ++j)
720 buffer[i + j] = dstBuffer[j];
726static inline void convert_8_pixels_argb32_to_rgb16(quint16 *dst,
const quint32 *src)
729 "vld4.8 { d0, d1, d2, d3 }, [%[SRC]]\n\t"
732 "vshll.u8 q14, d2, #8\n\t"
733 "vshll.u8 q8, d1, #8\n\t"
734 "vshll.u8 q9, d0, #8\n\t"
735 "vsri.u16 q14, q8, #5\n\t"
736 "vsri.u16 q14, q9, #11\n\t"
738 "vst1.16 { d28, d29 }, [%[DST]]"
739 : : [DST]
"r" (dst), [SRC]
"r" (src)
740 :
"memory",
"d0",
"d1",
"d2",
"d3",
"d16",
"d17",
"d18",
"d19",
"d28",
"d29"
744void QT_FASTCALL qt_destStoreRGB16_neon(QRasterBuffer *rasterBuffer,
int x,
int y,
const uint *buffer,
int length)
746 quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x;
749 for (; i < length - 7; i += 8)
750 convert_8_pixels_argb32_to_rgb16(&data[i], &buffer[i]);
753 quint32 srcBuffer[8];
754 quint16 dstBuffer[8];
756 int tail = length - i;
757 for (
int j = 0; j < tail; ++j)
758 srcBuffer[j] = buffer[i + j];
760 convert_8_pixels_argb32_to_rgb16(dstBuffer, srcBuffer);
762 for (
int j = 0; j < tail; ++j)
763 data[i + j] = dstBuffer[j];
768void QT_FASTCALL comp_func_solid_SourceOver_neon(uint *destPixels,
int length, uint color, uint const_alpha)
770 if ((const_alpha & qAlpha(color)) == 255) {
771 qt_memfill32(destPixels, color, length);
773 if (const_alpha != 255)
774 color = BYTE_MUL(color, const_alpha);
776 const quint32 minusAlphaOfColor = qAlpha(~color);
779 uint32_t *dst = (uint32_t *) destPixels;
780 const uint32x4_t colorVector = vdupq_n_u32(color);
781 uint16x8_t half = vdupq_n_u16(0x80);
782 const uint16x8_t minusAlphaOfColorVector = vdupq_n_u16(minusAlphaOfColor);
784 for (; x < length-3; x += 4) {
785 uint32x4_t dstVector = vld1q_u32(&dst[x]);
787 const uint8x16_t dst8 = vreinterpretq_u8_u32(dstVector);
789 const uint8x8_t dst8_low = vget_low_u8(dst8);
790 const uint8x8_t dst8_high = vget_high_u8(dst8);
792 const uint16x8_t dst16_low = vmovl_u8(dst8_low);
793 const uint16x8_t dst16_high = vmovl_u8(dst8_high);
795 const uint16x8_t result16_low = qvbyte_mul_u16(dst16_low, minusAlphaOfColorVector, half);
796 const uint16x8_t result16_high = qvbyte_mul_u16(dst16_high, minusAlphaOfColorVector, half);
798 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result16_low));
799 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result16_high));
801 uint32x4_t blendedPixels = vcombine_u32(result32_low, result32_high);
802 uint32x4_t colorPlusBlendedPixels = vaddq_u32(colorVector, blendedPixels);
803 vst1q_u32(&dst[x], colorPlusBlendedPixels);
806 SIMD_EPILOGUE(x, length, 3)
807 destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor);
811void QT_FASTCALL comp_func_Plus_neon(uint *dst,
const uint *src,
int length, uint const_alpha)
813 if (const_alpha == 255) {
814 uint *
const end = dst + length;
815 uint *
const neonEnd = end - 3;
817 while (dst < neonEnd) {
818 uint8x16_t vs = vld1q_u8((
const uint8_t*)src);
819 const uint8x16_t vd = vld1q_u8((uint8_t*)dst);
820 vs = vqaddq_u8(vs, vd);
821 vst1q_u8((uint8_t*)dst, vs);
827 *dst = comp_func_Plus_one_pixel(*dst, *src);
833 const int one_minus_const_alpha = 255 - const_alpha;
834 const uint16x8_t constAlphaVector = vdupq_n_u16(const_alpha);
835 const uint16x8_t oneMinusconstAlphaVector = vdupq_n_u16(one_minus_const_alpha);
837 const uint16x8_t half = vdupq_n_u16(0x80);
838 for (; x < length - 3; x += 4) {
839 const uint32x4_t src32 = vld1q_u32((uint32_t *)&src[x]);
840 const uint8x16_t src8 = vreinterpretq_u8_u32(src32);
841 uint8x16_t dst8 = vld1q_u8((uint8_t *)&dst[x]);
842 uint8x16_t result = vqaddq_u8(dst8, src8);
844 uint16x8_t result_low = vmovl_u8(vget_low_u8(result));
845 uint16x8_t result_high = vmovl_u8(vget_high_u8(result));
847 uint16x8_t dst_low = vmovl_u8(vget_low_u8(dst8));
848 uint16x8_t dst_high = vmovl_u8(vget_high_u8(dst8));
850 result_low = qvinterpolate_pixel_255(result_low, constAlphaVector, dst_low, oneMinusconstAlphaVector, half);
851 result_high = qvinterpolate_pixel_255(result_high, constAlphaVector, dst_high, oneMinusconstAlphaVector, half);
853 const uint32x2_t result32_low = vreinterpret_u32_u8(vmovn_u16(result_low));
854 const uint32x2_t result32_high = vreinterpret_u32_u8(vmovn_u16(result_high));
855 vst1q_u32((uint32_t *)&dst[x], vcombine_u32(result32_low, result32_high));
858 SIMD_EPILOGUE(x, length, 3)
859 dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
863#if defined(ENABLE_PIXMAN_DRAWHELPERS)
864static const int tileSize = 32;
866extern "C" void qt_rotate90_16_neon(quint16 *dst,
const quint16 *src,
int sstride,
int dstride,
int count);
868void qt_memrotate90_16_neon(
const uchar *srcPixels,
int w,
int h,
int sstride, uchar *destPixels,
int dstride)
870 const ushort *src = (
const ushort *)srcPixels;
871 ushort *dest = (ushort *)destPixels;
873 sstride /=
sizeof(ushort);
874 dstride /=
sizeof(ushort);
876 const int pack =
sizeof(quint32) /
sizeof(ushort);
877 const int unaligned =
878 qMin(uint((quintptr(dest) & (
sizeof(quint32)-1)) /
sizeof(ushort)), uint(h));
879 const int restX = w % tileSize;
880 const int restY = (h - unaligned) % tileSize;
881 const int unoptimizedY = restY % pack;
882 const int numTilesX = w / tileSize + (restX > 0);
883 const int numTilesY = (h - unaligned) / tileSize + (restY >= pack);
885 for (
int tx = 0; tx < numTilesX; ++tx) {
886 const int startx = w - tx * tileSize - 1;
887 const int stopx = qMax(startx - tileSize, 0);
890 for (
int x = startx; x >= stopx; --x) {
891 ushort *d = dest + (w - x - 1) * dstride;
892 for (
int y = 0; y < unaligned; ++y) {
893 *d++ = src[y * sstride + x];
898 for (
int ty = 0; ty < numTilesY; ++ty) {
899 const int starty = ty * tileSize + unaligned;
900 const int stopy = qMin(starty + tileSize, h - unoptimizedY);
904 for (; x >= stopx + 7; x -= 8) {
905 ushort *d = dest + (w - x - 1) * dstride + starty;
906 const ushort *s = &src[starty * sstride + x - 7];
907 qt_rotate90_16_neon(d, s, sstride * 2, dstride * 2, stopy - starty);
910 for (; x >= stopx; --x) {
911 quint32 *d =
reinterpret_cast<quint32*>(dest + (w - x - 1) * dstride + starty);
912 for (
int y = starty; y < stopy; y += pack) {
913 quint32 c = src[y * sstride + x];
914 for (
int i = 1; i < pack; ++i) {
915 const int shift = (
sizeof(
int) * 8 / pack * i);
916 const ushort color = src[(y + i) * sstride + x];
925 const int starty = h - unoptimizedY;
926 for (
int x = startx; x >= stopx; --x) {
927 ushort *d = dest + (w - x - 1) * dstride + starty;
928 for (
int y = starty; y < h; ++y) {
929 *d++ = src[y * sstride + x];
936extern "C" void qt_rotate270_16_neon(quint16 *dst,
const quint16 *src,
int sstride,
int dstride,
int count);
938void qt_memrotate270_16_neon(
const uchar *srcPixels,
int w,
int h,
940 uchar *destPixels,
int dstride)
942 const ushort *src = (
const ushort *)srcPixels;
943 ushort *dest = (ushort *)destPixels;
945 sstride /=
sizeof(ushort);
946 dstride /=
sizeof(ushort);
948 const int pack =
sizeof(quint32) /
sizeof(ushort);
949 const int unaligned =
950 qMin(uint((
long(dest) & (
sizeof(quint32)-1)) /
sizeof(ushort)), uint(h));
951 const int restX = w % tileSize;
952 const int restY = (h - unaligned) % tileSize;
953 const int unoptimizedY = restY % pack;
954 const int numTilesX = w / tileSize + (restX > 0);
955 const int numTilesY = (h - unaligned) / tileSize + (restY >= pack);
957 for (
int tx = 0; tx < numTilesX; ++tx) {
958 const int startx = tx * tileSize;
959 const int stopx = qMin(startx + tileSize, w);
962 for (
int x = startx; x < stopx; ++x) {
963 ushort *d = dest + x * dstride;
964 for (
int y = h - 1; y >= h - unaligned; --y) {
965 *d++ = src[y * sstride + x];
970 for (
int ty = 0; ty < numTilesY; ++ty) {
971 const int starty = h - 1 - unaligned - ty * tileSize;
972 const int stopy = qMax(starty - tileSize, unoptimizedY);
976 for (; x < stopx - 7; x += 8) {
977 ushort *d = dest + x * dstride + h - 1 - starty;
978 const ushort *s = &src[starty * sstride + x];
979 qt_rotate90_16_neon(d + 7 * dstride, s, -sstride * 2, -dstride * 2, starty - stopy);
982 for (; x < stopx; ++x) {
983 quint32 *d =
reinterpret_cast<quint32*>(dest + x * dstride
985 for (
int y = starty; y > stopy; y -= pack) {
986 quint32 c = src[y * sstride + x];
987 for (
int i = 1; i < pack; ++i) {
988 const int shift = (
sizeof(
int) * 8 / pack * i);
989 const ushort color = src[(y - i) * sstride + x];
997 const int starty = unoptimizedY - 1;
998 for (
int x = startx; x < stopx; ++x) {
999 ushort *d = dest + x * dstride + h - 1 - starty;
1000 for (
int y = starty; y >= 0; --y) {
1001 *d++ = src[y * sstride + x];
1013 Int32x4() =
default;
1014 Int32x4(int32x4_t v) : v(v) {}
1016 operator int32x4_t()
const {
return v; }
1019 Float32x4() =
default;
1020 Float32x4(float32x4_t v) : v(v) {};
1022 operator float32x4_t()
const {
return v; }
1025 union Vect_buffer_i { Int32x4 v;
int i[4]; };
1026 union Vect_buffer_f { Float32x4 v;
float f[4]; };
1028 static inline Float32x4 v_dup(
double x) {
return vdupq_n_f32(
float(x)); }
1029 static inline Float32x4 v_dup(
float x) {
return vdupq_n_f32(x); }
1030 static inline Int32x4 v_dup(
int x) {
return vdupq_n_s32(x); }
1031 static inline Int32x4 v_dup(uint x) {
return vdupq_n_s32(x); }
1033 static inline Float32x4 v_add(Float32x4 a, Float32x4 b) {
return vaddq_f32(a, b); }
1034 static inline Int32x4 v_add(Int32x4 a, Int32x4 b) {
return vaddq_s32(a, b); }
1036 static inline Float32x4 v_max(Float32x4 a, Float32x4 b) {
return vmaxq_f32(a, b); }
1037 static inline Float32x4 v_min(Float32x4 a, Float32x4 b) {
return vminq_f32(a, b); }
1038 static inline Int32x4 v_min_16(Int32x4 a, Int32x4 b) {
return vminq_s32(a, b); }
1040 static inline Int32x4 v_and(Int32x4 a, Int32x4 b) {
return vandq_s32(a, b); }
1042 static inline Float32x4 v_sub(Float32x4 a, Float32x4 b) {
return vsubq_f32(a, b); }
1043 static inline Int32x4 v_sub(Int32x4 a, Int32x4 b) {
return vsubq_s32(a, b); }
1045 static inline Float32x4 v_mul(Float32x4 a, Float32x4 b) {
return vmulq_f32(a, b); }
1047 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); }
1049 static inline Int32x4 v_toInt(Float32x4 x) {
return vcvtq_s32_f32(x); }
1051 static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) {
return vreinterpretq_s32_u32(vcgeq_f32(a, b)); }
1054const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer,
const Operator *op,
const QSpanData *data,
1055 int y,
int x,
int length)
1057 return qt_fetch_radial_gradient_template<QRadialFetchSimd<QSimdNeon>,uint>(buffer, op, data, y, x, length);
1060extern void QT_FASTCALL qt_convert_rgb888_to_rgb32_neon(quint32 *dst,
const uchar *src,
int len);
1062const uint * QT_FASTCALL qt_fetchUntransformed_888_neon(uint *buffer,
const Operator *,
const QSpanData *data,
1063 int y,
int x,
int length)
1065 const uchar *line = data->texture.scanLine(y) + x * 3;
1066 qt_convert_rgb888_to_rgb32_neon(buffer, line, length);
1070#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
1071static inline uint32x4_t vrgba2argb(uint32x4_t srcVector)
1073#if defined(Q_PROCESSOR_ARM_64)
1074 const uint8x16_t rgbaMask = qvsetq_n_u8(2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15);
1076 const uint8x8_t rgbaMask = qvset_n_u8(2, 1, 0, 3, 6, 5, 4, 7);
1078#if defined(Q_PROCESSOR_ARM_64)
1079 srcVector = vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(srcVector), rgbaMask));
1082 const uint8x8_t low = vtbl1_u8(vreinterpret_u8_u32(vget_low_u32(srcVector)), rgbaMask);
1083 const uint8x8_t high = vtbl1_u8(vreinterpret_u8_u32(vget_high_u32(srcVector)), rgbaMask);
1084 srcVector = vcombine_u32(vreinterpret_u32_u8(low), vreinterpret_u32_u8(high));
1090static inline void convertARGBToARGB32PM_neon(uint *buffer,
const uint *src,
int count)
1093 const uint8x8_t shuffleMask = qvset_n_u8(3, 3, 3, 3, 7, 7, 7, 7);
1094 const uint32x4_t blendMask = vdupq_n_u32(0xff000000);
1096 for (; i < count - 3; i += 4) {
1097 uint32x4_t srcVector = vld1q_u32(src + i);
1098 uint32x4_t alphaVector = vshrq_n_u32(srcVector, 24);
1099#if defined(Q_PROCESSOR_ARM_64)
1100 uint32_t alphaSum = vaddvq_u32(alphaVector);
1103 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1104 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1107 if (alphaSum != 255 * 4) {
1109 srcVector = vrgba2argb(srcVector);
1110 const uint8x8_t s1 = vreinterpret_u8_u32(vget_low_u32(srcVector));
1111 const uint8x8_t s2 = vreinterpret_u8_u32(vget_high_u32(srcVector));
1112 const uint8x8_t alpha1 = vtbl1_u8(s1, shuffleMask);
1113 const uint8x8_t alpha2 = vtbl1_u8(s2, shuffleMask);
1114 uint16x8_t src1 = vmull_u8(s1, alpha1);
1115 uint16x8_t src2 = vmull_u8(s2, alpha2);
1116 src1 = vsraq_n_u16(src1, src1, 8);
1117 src2 = vsraq_n_u16(src2, src2, 8);
1118 const uint8x8_t d1 = vrshrn_n_u16(src1, 8);
1119 const uint8x8_t d2 = vrshrn_n_u16(src2, 8);
1120 const uint32x4_t d = vbslq_u32(blendMask, srcVector, vreinterpretq_u32_u8(vcombine_u8(d1, d2)));
1121 vst1q_u32(buffer + i, d);
1124 vst1q_u32(buffer + i, vrgba2argb(srcVector));
1125 else if (buffer != src)
1126 vst1q_u32(buffer + i, srcVector);
1129 vst1q_u32(buffer + i, vdupq_n_u32(0));
1133 SIMD_EPILOGUE(i, count, 3) {
1134 uint v = qPremultiply(src[i]);
1135 buffer[i] = RGBA ? RGBA2ARGB(v) : v;
1140static inline void convertARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count)
1145 const uint8x8_t shuffleMask = qvset_n_u8(3, 3, 3, 3, 7, 7, 7, 7);
1146 const uint64x2_t blendMask = vdupq_n_u64(Q_UINT64_C(0xffff000000000000));
1149 for (; i < count-3; i += 4) {
1150 uint32x4_t vs32 = vld1q_u32(src + i);
1151 uint32x4_t alphaVector = vshrq_n_u32(vs32, 24);
1152#if defined(Q_PROCESSOR_ARM_64)
1153 uint32_t alphaSum = vaddvq_u32(alphaVector);
1156 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1157 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1161 vs32 = vrgba2argb(vs32);
1162 const uint8x16_t vs8 = vreinterpretq_u8_u32(vs32);
1163 const uint8x16x2_t v = vzipq_u8(vs8, vs8);
1164 if (alphaSum != 255 * 4) {
1165 const uint8x8_t s1 = vreinterpret_u8_u32(vget_low_u32(vs32));
1166 const uint8x8_t s2 = vreinterpret_u8_u32(vget_high_u32(vs32));
1167 const uint8x8_t alpha1 = vtbl1_u8(s1, shuffleMask);
1168 const uint8x8_t alpha2 = vtbl1_u8(s2, shuffleMask);
1169 uint16x8_t src1 = vmull_u8(s1, alpha1);
1170 uint16x8_t src2 = vmull_u8(s2, alpha2);
1172 src1 = vsraq_n_u16(src1, src1, 7);
1173 src2 = vsraq_n_u16(src2, src2, 7);
1176 const uint64x2_t d1 = vbslq_u64(blendMask, vreinterpretq_u64_u8(v.val[0]), vreinterpretq_u64_u16(src1));
1177 const uint64x2_t d2 = vbslq_u64(blendMask, vreinterpretq_u64_u8(v.val[1]), vreinterpretq_u64_u16(src2));
1179 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u64(d1));
1181 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u64(d2));
1184 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u8(v.val[0]));
1186 vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u8(v.val[1]));
1190 vst1q_u16((uint16_t *)buffer, vdupq_n_u16(0));
1192 vst1q_u16((uint16_t *)buffer, vdupq_n_u16(0));
1197 SIMD_EPILOGUE(i, count, 3) {
1201 *buffer++ = QRgba64::fromArgb32(s).premultiplied();
1205static inline float32x4_t reciprocal_mul_ps(float32x4_t a,
float mul)
1207 float32x4_t ia = vrecpeq_f32(a);
1208 ia = vmulq_f32(vrecpsq_f32(a, ia), vmulq_n_f32(ia, mul));
1212template<
bool RGBA,
bool RGBx>
1213static inline void convertARGBFromARGB32PM_neon(uint *buffer,
const uint *src,
int count)
1216 const uint32x4_t alphaMask = vdupq_n_u32(0xff000000);
1218 for (; i < count - 3; i += 4) {
1219 uint32x4_t srcVector = vld1q_u32(src + i);
1220 uint32x4_t alphaVector = vshrq_n_u32(srcVector, 24);
1221#if defined(Q_PROCESSOR_ARM_64)
1222 uint32_t alphaSum = vaddvq_u32(alphaVector);
1225 uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
1226 uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
1229 if (alphaSum != 255 * 4) {
1231 srcVector = vrgba2argb(srcVector);
1232 const float32x4_t a = vcvtq_f32_u32(alphaVector);
1233 const float32x4_t ia = reciprocal_mul_ps(a, 255.0f);
1235 uint16x8_t tmp1 = vmovl_u8(vget_low_u8(vreinterpretq_u8_u32(srcVector)));
1236 uint16x8_t tmp3 = vmovl_u8(vget_high_u8(vreinterpretq_u8_u32(srcVector)));
1237 float32x4_t src1 = vcvtq_f32_u32(vmovl_u16(vget_low_u16(tmp1)));
1238 float32x4_t src2 = vcvtq_f32_u32(vmovl_u16(vget_high_u16(tmp1)));
1239 float32x4_t src3 = vcvtq_f32_u32(vmovl_u16(vget_low_u16(tmp3)));
1240 float32x4_t src4 = vcvtq_f32_u32(vmovl_u16(vget_high_u16(tmp3)));
1241 src1 = vmulq_lane_f32(src1, vget_low_f32(ia), 0);
1242 src2 = vmulq_lane_f32(src2, vget_low_f32(ia), 1);
1243 src3 = vmulq_lane_f32(src3, vget_high_f32(ia), 0);
1244 src4 = vmulq_lane_f32(src4, vget_high_f32(ia), 1);
1246 tmp1 = vcombine_u16(vrshrn_n_u32(vcvtq_n_u32_f32(src1, 1), 1),
1247 vrshrn_n_u32(vcvtq_n_u32_f32(src2, 1), 1));
1248 tmp3 = vcombine_u16(vrshrn_n_u32(vcvtq_n_u32_f32(src3, 1), 1),
1249 vrshrn_n_u32(vcvtq_n_u32_f32(src4, 1), 1));
1250 uint32x4_t dstVector = vreinterpretq_u32_u8(vcombine_u8(vmovn_u16(tmp1), vmovn_u16(tmp3)));
1252#if defined(Q_PROCESSOR_ARM_64)
1253 uint32x4_t srcVectorAlphaMask = vceqzq_u32(alphaVector);
1255 uint32x4_t srcVectorAlphaMask = vceqq_u32(alphaVector, vdupq_n_u32(0));
1257 dstVector = vbicq_u32(dstVector, srcVectorAlphaMask);
1260 dstVector = vorrq_u32(alphaMask, dstVector);
1262 dstVector = vbslq_u32(alphaMask, srcVector, dstVector);
1263 vst1q_u32(&buffer[i], dstVector);
1267 vst1q_u32(&buffer[i], vrgba2argb(srcVector));
1268 else if (buffer != src)
1269 vst1q_u32(&buffer[i], srcVector);
1274 vst1q_u32(&buffer[i], alphaMask);
1276 vst1q_u32(&buffer[i], vdupq_n_u32(0));
1280 SIMD_EPILOGUE(i, count, 3) {
1281 uint v = qUnpremultiply(src[i]);
1290void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer,
int count,
const QList<QRgb> *)
1292 convertARGBToARGB32PM_neon<
false>(buffer, buffer, count);
1295void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer,
int count,
const QList<QRgb> *)
1297 convertARGBToARGB32PM_neon<
true>(buffer, buffer, count);
1300const uint *QT_FASTCALL fetchARGB32ToARGB32PM_neon(uint *buffer,
const uchar *src,
int index,
int count,
1301 const QList<QRgb> *, QDitherInfo *)
1303 convertARGBToARGB32PM_neon<
false>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1307const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_neon(uint *buffer,
const uchar *src,
int index,
int count,
1308 const QList<QRgb> *, QDitherInfo *)
1310 convertARGBToARGB32PM_neon<
true>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1314const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count,
1315 const QList<QRgb> *, QDitherInfo *)
1317 convertARGB32ToRGBA64PM_neon<
false>(buffer, src, count);
1321const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_neon(QRgba64 *buffer,
const uint *src,
int count,
1322 const QList<QRgb> *, QDitherInfo *)
1324 convertARGB32ToRGBA64PM_neon<
true>(buffer, src, count);
1328const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_neon(QRgba64 *buffer,
const uchar *src,
int index,
int count,
1329 const QList<QRgb> *, QDitherInfo *)
1331 convertARGB32ToRGBA64PM_neon<
false>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1335const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_neon(QRgba64 *buffer,
const uchar *src,
int index,
int count,
1336 const QList<QRgb> *, QDitherInfo *)
1338 convertARGB32ToRGBA64PM_neon<
true>(buffer,
reinterpret_cast<
const uint *>(src) + index, count);
1342void QT_FASTCALL storeRGB32FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1343 const QList<QRgb> *, QDitherInfo *)
1345 uint *d =
reinterpret_cast<uint *>(dest) + index;
1346 convertARGBFromARGB32PM_neon<
false,
true>(d, src, count);
1349void QT_FASTCALL storeARGB32FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1350 const QList<QRgb> *, QDitherInfo *)
1352 uint *d =
reinterpret_cast<uint *>(dest) + index;
1353 convertARGBFromARGB32PM_neon<
false,
false>(d, src, count);
1356void QT_FASTCALL storeRGBA8888FromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1357 const QList<QRgb> *, QDitherInfo *)
1359 uint *d =
reinterpret_cast<uint *>(dest) + index;
1360 convertARGBFromARGB32PM_neon<
true,
false>(d, src, count);
1363void QT_FASTCALL storeRGBXFromARGB32PM_neon(uchar *dest,
const uint *src,
int index,
int count,
1364 const QList<QRgb> *, QDitherInfo *)
1366 uint *d =
reinterpret_cast<uint *>(dest) + index;
1367 convertARGBFromARGB32PM_neon<
true,
true>(d, src, count);