1 /****************************************************************************
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of the QtGui module of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser General Public
12 ** License version 2.1 as published by the Free Software Foundation and
13 ** appearing in the file LICENSE.LGPL included in the packaging of this
14 ** file. Please review the following information to ensure the GNU Lesser
15 ** General Public License version 2.1 requirements will be met:
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ** In addition, as a special exception, Nokia gives you certain additional
19 ** rights. These rights are described in the Nokia Qt LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU General
24 ** Public License version 3.0 as published by the Free Software Foundation
25 ** and appearing in the file LICENSE.GPL included in the packaging of this
26 ** file. Please review the following information to ensure the GNU General
27 ** Public License version 3.0 requirements will be met:
28 ** http://www.gnu.org/copyleft/gpl.html.
31 ** Alternatively, this file may be used in accordance with the terms and
32 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
43 #include "qblendfunctions_p.h"
47 struct SourceOnlyAlpha
49 inline uchar alpha(uchar src) const { return src; }
50 inline quint16 bytemul(quint16 spix) const { return spix; }
54 struct SourceAndConstAlpha
56 SourceAndConstAlpha(int a) : m_alpha256(a) {
57 m_alpha255 = (m_alpha256 * 255) >> 8;
59 inline uchar alpha(uchar src) const { return (src * m_alpha256) >> 8; }
60 inline quint16 bytemul(quint16 x) const {
61 uint t = (((x & 0x07e0)*m_alpha255) >> 8) & 0x07e0;
62 t |= (((x & 0xf81f)*(m_alpha255>>2)) >> 6) & 0xf81f;
70 /************************************************************************
71 RGB16 (565) format target format
72 ************************************************************************/
74 static inline quint16 convert_argb32_to_rgb16(quint32 spix)
89 struct Blend_RGB16_on_RGB16_NoAlpha {
90 inline void write(quint16 *dst, quint16 src) { *dst = src; }
92 inline void flush(void *) {}
95 struct Blend_RGB16_on_RGB16_ConstAlpha {
96 inline Blend_RGB16_on_RGB16_ConstAlpha(quint32 alpha) {
97 m_alpha = (alpha * 255) >> 8;
98 m_ialpha = 255 - m_alpha;
101 inline void write(quint16 *dst, quint16 src) {
102 *dst = BYTE_MUL_RGB16(src, m_alpha) + BYTE_MUL_RGB16(*dst, m_ialpha);
105 inline void flush(void *) {}
111 struct Blend_ARGB24_on_RGB16_SourceAlpha {
112 inline void write(quint16 *dst, const qargb8565 &src) {
113 const uint alpha = src.alpha();
115 quint16 s = src.rawValue16();
117 s += BYTE_MUL_RGB16(*dst, 255 - alpha);
122 inline void flush(void *) {}
125 struct Blend_ARGB24_on_RGB16_SourceAndConstAlpha {
126 inline Blend_ARGB24_on_RGB16_SourceAndConstAlpha(quint32 alpha) {
127 m_alpha = (alpha * 255) >> 8;
130 inline void write(quint16 *dst, qargb8565 src) {
131 src = src.byte_mul(src.alpha(m_alpha));
132 const uint alpha = src.alpha();
134 quint16 s = src.rawValue16();
136 s += BYTE_MUL_RGB16(*dst, 255 - alpha);
141 inline void flush(void *) {}
146 struct Blend_ARGB32_on_RGB16_SourceAlpha {
147 inline void write(quint16 *dst, quint32 src) {
148 const quint8 alpha = qAlpha(src);
150 quint16 s = convert_argb32_to_rgb16(src);
152 s += BYTE_MUL_RGB16(*dst, 255 - alpha);
157 inline void flush(void *) {}
160 struct Blend_ARGB32_on_RGB16_SourceAndConstAlpha {
161 inline Blend_ARGB32_on_RGB16_SourceAndConstAlpha(quint32 alpha) {
162 m_alpha = (alpha * 255) >> 8;
165 inline void write(quint16 *dst, quint32 src) {
166 src = BYTE_MUL(src, m_alpha);
167 const quint8 alpha = qAlpha(src);
169 quint16 s = convert_argb32_to_rgb16(src);
171 s += BYTE_MUL_RGB16(*dst, 255 - alpha);
176 inline void flush(void *) {}
181 void qt_scale_image_rgb16_on_rgb16(uchar *destPixels, int dbpl,
182 const uchar *srcPixels, int sbpl,
183 const QRectF &targetRect,
184 const QRectF &sourceRect,
189 printf("qt_scale_rgb16_on_rgb16: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
190 destPixels, dbpl, srcPixels, sbpl,
191 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
192 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
195 if (const_alpha == 256) {
196 Blend_RGB16_on_RGB16_NoAlpha noAlpha;
197 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl,
198 targetRect, sourceRect, clip, noAlpha);
200 Blend_RGB16_on_RGB16_ConstAlpha constAlpha(const_alpha);
201 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl,
202 targetRect, sourceRect, clip, constAlpha);
206 void qt_scale_image_argb24_on_rgb16(uchar *destPixels, int dbpl,
207 const uchar *srcPixels, int sbpl,
208 const QRectF &targetRect,
209 const QRectF &sourceRect,
214 printf("qt_scale_argb24_on_rgb16: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
215 destPixels, dbpl, srcPixels, sbpl,
216 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
217 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
220 if (const_alpha == 256) {
221 Blend_ARGB24_on_RGB16_SourceAlpha noAlpha;
222 qt_scale_image_16bit<qargb8565>(destPixels, dbpl, srcPixels, sbpl,
223 targetRect, sourceRect, clip, noAlpha);
225 Blend_ARGB24_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha);
226 qt_scale_image_16bit<qargb8565>(destPixels, dbpl, srcPixels, sbpl,
227 targetRect, sourceRect, clip, constAlpha);
232 void qt_scale_image_argb32_on_rgb16(uchar *destPixels, int dbpl,
233 const uchar *srcPixels, int sbpl,
234 const QRectF &targetRect,
235 const QRectF &sourceRect,
240 printf("qt_scale_argb32_on_rgb16: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
241 destPixels, dbpl, srcPixels, sbpl,
242 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
243 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
246 if (const_alpha == 256) {
247 Blend_ARGB32_on_RGB16_SourceAlpha noAlpha;
248 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl,
249 targetRect, sourceRect, clip, noAlpha);
251 Blend_ARGB32_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha);
252 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl,
253 targetRect, sourceRect, clip, constAlpha);
257 void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl,
258 const uchar *src, int sbpl,
263 printf("qt_blend_rgb16_on_rgb16: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
264 dst, dbpl, src, sbpl, w, h, const_alpha);
267 if (const_alpha == 256) {
270 QT_MEMCPY_USHORT(dst, src, w);
277 memcpy(dst, src, length);
282 } else if (const_alpha != 0) {
283 SourceAndConstAlpha alpha(const_alpha); // expects the 0-256 range
284 quint16 *d = (quint16 *) dst;
285 const quint16 *s = (const quint16 *) src;
286 quint8 a = (255 * const_alpha) >> 8;
289 for (int x=0; x<w; ++x) {
290 d[x] = BYTE_MUL_RGB16(s[x], a) + BYTE_MUL_RGB16(d[x], ia);
292 d = (quint16 *)(((uchar *) d) + dbpl);
293 s = (const quint16 *)(((const uchar *) s) + sbpl);
299 template <typename T> void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl,
300 const uchar *srcPixels, int sbpl,
301 int w, int h, const T &alphaFunc)
304 int dstJPL = dbpl / 2;
305 quint16 *dst = (quint16 *) destPixels;
306 int dstExtraStride = dstJPL - w;
308 for (int y=0; y<h; ++y) {
309 const uchar *src = srcPixels + y * sbpl;
310 const uchar *srcEnd = src + srcOffset;
311 while (src < srcEnd) {
312 #if defined(QT_ARCH_ARMV5) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU)) || (defined(QT_ARCH_INTEGRITY) && !defined(_X86_))
313 // non-16-bit aligned memory access is not possible on PowerPC,
314 // ARM <v6 (QT_ARCH_ARMV5) & SH & AVR32 & SPARC w/GCC
315 quint16 spix = (quint16(src[2])<<8) + src[1];
317 quint16 spix = *(quint16 *) (src + 1);
319 uchar alpha = alphaFunc.alpha(*src);
323 } else if (alpha != 0) {
325 quint32 sia = 255 - alpha;
327 quint16 dr = (dpix & 0x0000f800);
328 quint16 dg = (dpix & 0x000007e0);
329 quint16 db = (dpix & 0x0000001f);
331 quint32 siar = dr * sia;
332 quint32 siag = dg * sia;
333 quint32 siab = db * sia;
335 quint32 rr = ((siar + (siar>>8) + (0x80 << 8)) >> 8) & 0xf800;
336 quint32 rg = ((siag + (siag>>8) + (0x80 << 3)) >> 8) & 0x07e0;
337 quint32 rb = ((siab + (siab>>8) + (0x80 >> 3)) >> 8) & 0x001f;
339 *dst = alphaFunc.bytemul(spix) + rr + rg + rb;
345 dst += dstExtraStride;
350 static void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl,
351 const uchar *srcPixels, int sbpl,
356 printf("qt_blend_argb24_on_rgb16: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
357 destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
360 if (const_alpha != 256) {
361 SourceAndConstAlpha alphaFunc(const_alpha);
362 qt_blend_argb24_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, alphaFunc);
364 SourceOnlyAlpha alphaFunc;
365 qt_blend_argb24_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, alphaFunc);
372 void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels, int dbpl,
373 const uchar *srcPixels, int sbpl,
377 quint16 *dst = (quint16 *) destPixels;
378 const quint32 *src = (const quint32 *) srcPixels;
380 const_alpha = (const_alpha * 255) >> 8;
381 for (int y=0; y<h; ++y) {
382 for (int i = 0; i < w; ++i) {
384 s = BYTE_MUL(s, const_alpha);
385 int alpha = qAlpha(s);
386 s = convert_argb32_to_rgb16(s);
387 s += BYTE_MUL_RGB16(dst[i], 255 - alpha);
390 dst = (quint16 *)(((uchar *) dst) + dbpl);
391 src = (const quint32 *)(((const uchar *) src) + sbpl);
395 static void qt_blend_argb32_on_rgb16(uchar *destPixels, int dbpl,
396 const uchar *srcPixels, int sbpl,
400 if (const_alpha != 256) {
401 qt_blend_argb32_on_rgb16_const_alpha(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
405 quint16 *dst = (quint16 *) destPixels;
406 quint32 *src = (quint32 *) srcPixels;
408 for (int y=0; y<h; ++y) {
409 for (int x=0; x<w; ++x) {
411 quint32 spix = src[x];
412 quint32 alpha = spix >> 24;
415 dst[x] = convert_argb32_to_rgb16(spix);
416 } else if (alpha != 0) {
417 quint32 dpix = dst[x];
419 quint32 sia = 255 - alpha;
421 quint32 sr = (spix >> 8) & 0xf800;
422 quint32 sg = (spix >> 5) & 0x07e0;
423 quint32 sb = (spix >> 3) & 0x001f;
425 quint32 dr = (dpix & 0x0000f800);
426 quint32 dg = (dpix & 0x000007e0);
427 quint32 db = (dpix & 0x0000001f);
429 quint32 siar = dr * sia;
430 quint32 siag = dg * sia;
431 quint32 siab = db * sia;
433 quint32 rr = sr + ((siar + (siar>>8) + (0x80 << 8)) >> 8);
434 quint32 rg = sg + ((siag + (siag>>8) + (0x80 << 3)) >> 8);
435 quint32 rb = sb + ((siab + (siab>>8) + (0x80 >> 3)) >> 8);
437 dst[x] = (rr & 0xf800)
442 dst = (quint16 *) (((uchar *) dst) + dbpl);
443 src = (quint32 *) (((uchar *) src) + sbpl);
448 static void qt_blend_rgb32_on_rgb16(uchar *destPixels, int dbpl,
449 const uchar *srcPixels, int sbpl,
454 printf("qt_blend_rgb32_on_rgb16: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
455 destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
458 if (const_alpha != 256) {
459 qt_blend_argb32_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
463 const quint32 *src = (const quint32 *) srcPixels;
464 int srcExtraStride = (sbpl >> 2) - w;
466 int dstJPL = dbpl / 2;
468 quint16 *dst = (quint16 *) destPixels;
469 quint16 *dstEnd = dst + dstJPL * h;
471 int dstExtraStride = dstJPL - w;
473 while (dst < dstEnd) {
474 const quint32 *srcEnd = src + w;
475 while (src < srcEnd) {
476 *dst = convert_argb32_to_rgb16(*src);
480 dst += dstExtraStride;
481 src += srcExtraStride;
487 /************************************************************************
488 RGB32 (-888) format target format
489 ************************************************************************/
491 static void qt_blend_argb32_on_argb32(uchar *destPixels, int dbpl,
492 const uchar *srcPixels, int sbpl,
497 fprintf(stdout, "qt_blend_argb32_on_argb32: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
498 destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
502 const uint *src = (const uint *) srcPixels;
503 uint *dst = (uint *) destPixels;
504 if (const_alpha == 256) {
505 for (int y=0; y<h; ++y) {
506 for (int x=0; x<w; ++x) {
511 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
513 dst = (quint32 *)(((uchar *) dst) + dbpl);
514 src = (const quint32 *)(((const uchar *) src) + sbpl);
516 } else if (const_alpha != 0) {
517 const_alpha = (const_alpha * 255) >> 8;
518 for (int y=0; y<h; ++y) {
519 for (int x=0; x<w; ++x) {
520 uint s = BYTE_MUL(src[x], const_alpha);
521 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
523 dst = (quint32 *)(((uchar *) dst) + dbpl);
524 src = (const quint32 *)(((const uchar *) src) + sbpl);
530 void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl,
531 const uchar *srcPixels, int sbpl,
536 fprintf(stdout, "qt_blend_rgb32_on_rgb32: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
537 destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
541 if (const_alpha != 256) {
542 qt_blend_argb32_on_argb32(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
546 const uint *src = (const uint *) srcPixels;
547 uint *dst = (uint *) destPixels;
549 for (int y=0; y<h; ++y) {
550 qt_memconvert(dst, src, w);
551 dst = (quint32 *)(((uchar *) dst) + dbpl);
552 src = (const quint32 *)(((const uchar *) src) + sbpl);
556 for (int y=0; y<h; ++y) {
557 memcpy(dst, src, len);
558 dst = (quint32 *)(((uchar *) dst) + dbpl);
559 src = (const quint32 *)(((const uchar *) src) + sbpl);
566 struct Blend_RGB32_on_RGB32_NoAlpha {
567 inline void write(quint32 *dst, quint32 src) { *dst = src; }
569 inline void flush(void *) {}
572 struct Blend_RGB32_on_RGB32_ConstAlpha {
573 inline Blend_RGB32_on_RGB32_ConstAlpha(quint32 alpha) {
574 m_alpha = (alpha * 255) >> 8;
575 m_ialpha = 255 - m_alpha;
578 inline void write(quint32 *dst, quint32 src) {
579 *dst = BYTE_MUL(src, m_alpha) + BYTE_MUL(*dst, m_ialpha);
582 inline void flush(void *) {}
588 struct Blend_ARGB32_on_ARGB32_SourceAlpha {
589 inline void write(quint32 *dst, quint32 src) {
590 *dst = src + BYTE_MUL(*dst, qAlpha(~src));
593 inline void flush(void *) {}
596 struct Blend_ARGB32_on_ARGB32_SourceAndConstAlpha {
597 inline Blend_ARGB32_on_ARGB32_SourceAndConstAlpha(quint32 alpha) {
598 m_alpha = (alpha * 255) >> 8;
599 m_ialpha = 255 - m_alpha;
602 inline void write(quint32 *dst, quint32 src) {
603 src = BYTE_MUL(src, m_alpha);
604 *dst = src + BYTE_MUL(*dst, qAlpha(~src));
607 inline void flush(void *) {}
613 void qt_scale_image_rgb32_on_rgb32(uchar *destPixels, int dbpl,
614 const uchar *srcPixels, int sbpl,
615 const QRectF &targetRect,
616 const QRectF &sourceRect,
621 printf("qt_scale_rgb32_on_rgb32: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
622 destPixels, dbpl, srcPixels, sbpl,
623 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
624 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
627 if (const_alpha == 256) {
628 Blend_RGB32_on_RGB32_NoAlpha noAlpha;
629 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl,
630 targetRect, sourceRect, clip, noAlpha);
632 Blend_RGB32_on_RGB32_ConstAlpha constAlpha(const_alpha);
633 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl,
634 targetRect, sourceRect, clip, constAlpha);
638 void qt_scale_image_argb32_on_argb32(uchar *destPixels, int dbpl,
639 const uchar *srcPixels, int sbpl,
640 const QRectF &targetRect,
641 const QRectF &sourceRect,
646 printf("qt_scale_argb32_on_argb32: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
647 destPixels, dbpl, srcPixels, sbpl,
648 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
649 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
652 if (const_alpha == 256) {
653 Blend_ARGB32_on_ARGB32_SourceAlpha sourceAlpha;
654 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl,
655 targetRect, sourceRect, clip, sourceAlpha);
657 Blend_ARGB32_on_ARGB32_SourceAndConstAlpha constAlpha(const_alpha);
658 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl,
659 targetRect, sourceRect, clip, constAlpha);
663 void qt_transform_image_rgb16_on_rgb16(uchar *destPixels, int dbpl,
664 const uchar *srcPixels, int sbpl,
665 const QRectF &targetRect,
666 const QRectF &sourceRect,
668 const QTransform &targetRectTransform,
671 if (const_alpha == 256) {
672 Blend_RGB16_on_RGB16_NoAlpha noAlpha;
673 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
674 reinterpret_cast<const quint16 *>(srcPixels), sbpl,
675 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
677 Blend_RGB16_on_RGB16_ConstAlpha constAlpha(const_alpha);
678 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
679 reinterpret_cast<const quint16 *>(srcPixels), sbpl,
680 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
684 void qt_transform_image_argb24_on_rgb16(uchar *destPixels, int dbpl,
685 const uchar *srcPixels, int sbpl,
686 const QRectF &targetRect,
687 const QRectF &sourceRect,
689 const QTransform &targetRectTransform,
692 if (const_alpha == 256) {
693 Blend_ARGB24_on_RGB16_SourceAlpha noAlpha;
694 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
695 reinterpret_cast<const qargb8565 *>(srcPixels), sbpl,
696 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
698 Blend_ARGB24_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha);
699 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
700 reinterpret_cast<const qargb8565 *>(srcPixels), sbpl,
701 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
706 void qt_transform_image_argb32_on_rgb16(uchar *destPixels, int dbpl,
707 const uchar *srcPixels, int sbpl,
708 const QRectF &targetRect,
709 const QRectF &sourceRect,
711 const QTransform &targetRectTransform,
714 if (const_alpha == 256) {
715 Blend_ARGB32_on_RGB16_SourceAlpha noAlpha;
716 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
717 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
718 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
720 Blend_ARGB32_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha);
721 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
722 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
723 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
728 void qt_transform_image_rgb32_on_rgb32(uchar *destPixels, int dbpl,
729 const uchar *srcPixels, int sbpl,
730 const QRectF &targetRect,
731 const QRectF &sourceRect,
733 const QTransform &targetRectTransform,
736 if (const_alpha == 256) {
737 Blend_RGB32_on_RGB32_NoAlpha noAlpha;
738 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
739 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
740 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
742 Blend_RGB32_on_RGB32_ConstAlpha constAlpha(const_alpha);
743 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
744 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
745 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
749 void qt_transform_image_argb32_on_argb32(uchar *destPixels, int dbpl,
750 const uchar *srcPixels, int sbpl,
751 const QRectF &targetRect,
752 const QRectF &sourceRect,
754 const QTransform &targetRectTransform,
757 if (const_alpha == 256) {
758 Blend_ARGB32_on_ARGB32_SourceAlpha sourceAlpha;
759 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
760 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
761 targetRect, sourceRect, clip, targetRectTransform, sourceAlpha);
763 Blend_ARGB32_on_ARGB32_SourceAndConstAlpha constAlpha(const_alpha);
764 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
765 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
766 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
770 SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
772 0, // Format_Invalid,
774 0, // Format_MonoLSB,
775 0, // Format_Indexed8,
778 0, // Format_ARGB32_Premultiplied,
780 0, // Format_ARGB8565_Premultiplied,
782 0, // Format_ARGB6666_Premultiplied,
784 0, // Format_ARGB8555_Premultiplied,
787 0 // Format_ARGB4444_Premultiplied,
790 0, // Format_Invalid,
792 0, // Format_MonoLSB,
793 0, // Format_Indexed8,
796 0, // Format_ARGB32_Premultiplied,
798 0, // Format_ARGB8565_Premultiplied,
800 0, // Format_ARGB6666_Premultiplied,
802 0, // Format_ARGB8555_Premultiplied,
805 0 // Format_ARGB4444_Premultiplied,
808 0, // Format_Invalid,
810 0, // Format_MonoLSB,
811 0, // Format_Indexed8,
814 0, // Format_ARGB32_Premultiplied,
816 0, // Format_ARGB8565_Premultiplied,
818 0, // Format_ARGB6666_Premultiplied,
820 0, // Format_ARGB8555_Premultiplied,
823 0 // Format_ARGB4444_Premultiplied,
826 0, // Format_Invalid,
828 0, // Format_MonoLSB,
829 0, // Format_Indexed8,
832 0, // Format_ARGB32_Premultiplied,
834 0, // Format_ARGB8565_Premultiplied,
836 0, // Format_ARGB6666_Premultiplied,
838 0, // Format_ARGB8555_Premultiplied,
841 0 // Format_ARGB4444_Premultiplied,
844 0, // Format_Invalid,
846 0, // Format_MonoLSB,
847 0, // Format_Indexed8,
848 qt_scale_image_rgb32_on_rgb32, // Format_RGB32,
850 qt_scale_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
852 0, // Format_ARGB8565_Premultiplied,
854 0, // Format_ARGB6666_Premultiplied,
856 0, // Format_ARGB8555_Premultiplied,
859 0 // Format_ARGB4444_Premultiplied,
862 0, // Format_Invalid,
864 0, // Format_MonoLSB,
865 0, // Format_Indexed8,
868 0, // Format_ARGB32_Premultiplied,
870 0, // Format_ARGB8565_Premultiplied,
872 0, // Format_ARGB6666_Premultiplied,
874 0, // Format_ARGB8555_Premultiplied,
877 0 // Format_ARGB4444_Premultiplied,
879 { // Format_ARGB32_Premultiplied
880 0, // Format_Invalid,
882 0, // Format_MonoLSB,
883 0, // Format_Indexed8,
884 qt_scale_image_rgb32_on_rgb32, // Format_RGB32,
886 qt_scale_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
888 0, // Format_ARGB8565_Premultiplied,
890 0, // Format_ARGB6666_Premultiplied,
892 0, // Format_ARGB8555_Premultiplied,
895 0 // Format_ARGB4444_Premultiplied,
898 0, // Format_Invalid,
900 0, // Format_MonoLSB,
901 0, // Format_Indexed8,
904 qt_scale_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied,
905 qt_scale_image_rgb16_on_rgb16, // Format_RGB16,
906 qt_scale_image_argb24_on_rgb16, // Format_ARGB8565_Premultiplied,
908 0, // Format_ARGB6666_Premultiplied,
910 0, // Format_ARGB8555_Premultiplied,
913 0 // Format_ARGB4444_Premultiplied,
915 { // Format_ARGB8565_Premultiplied
916 0, // Format_Invalid,
918 0, // Format_MonoLSB,
919 0, // Format_Indexed8,
922 0, // Format_ARGB32_Premultiplied,
924 0, // Format_ARGB8565_Premultiplied,
926 0, // Format_ARGB6666_Premultiplied,
928 0, // Format_ARGB8555_Premultiplied,
931 0 // Format_ARGB4444_Premultiplied,
934 0, // Format_Invalid,
936 0, // Format_MonoLSB,
937 0, // Format_Indexed8,
940 0, // Format_ARGB32_Premultiplied,
942 0, // Format_ARGB8565_Premultiplied,
944 0, // Format_ARGB6666_Premultiplied,
946 0, // Format_ARGB8555_Premultiplied,
949 0 // Format_ARGB4444_Premultiplied,
951 { // Format_ARGB6666_Premultiplied
952 0, // Format_Invalid,
954 0, // Format_MonoLSB,
955 0, // Format_Indexed8,
958 0, // Format_ARGB32_Premultiplied,
960 0, // Format_ARGB8565_Premultiplied,
962 0, // Format_ARGB6666_Premultiplied,
964 0, // Format_ARGB8555_Premultiplied,
967 0 // Format_ARGB4444_Premultiplied,
970 0, // Format_Invalid,
972 0, // Format_MonoLSB,
973 0, // Format_Indexed8,
976 0, // Format_ARGB32_Premultiplied,
978 0, // Format_ARGB8565_Premultiplied,
980 0, // Format_ARGB6666_Premultiplied,
982 0, // Format_ARGB8555_Premultiplied,
985 0 // Format_ARGB4444_Premultiplied,
987 { // Format_ARGB8555_Premultiplied
988 0, // Format_Invalid,
990 0, // Format_MonoLSB,
991 0, // Format_Indexed8,
994 0, // Format_ARGB32_Premultiplied,
996 0, // Format_ARGB8565_Premultiplied,
998 0, // Format_ARGB6666_Premultiplied,
1000 0, // Format_ARGB8555_Premultiplied,
1001 0, // Format_RGB888,
1002 0, // Format_RGB444,
1003 0 // Format_ARGB4444_Premultiplied,
1006 0, // Format_Invalid,
1008 0, // Format_MonoLSB,
1009 0, // Format_Indexed8,
1011 0, // Format_ARGB32,
1012 0, // Format_ARGB32_Premultiplied,
1014 0, // Format_ARGB8565_Premultiplied,
1015 0, // Format_RGB666,
1016 0, // Format_ARGB6666_Premultiplied,
1017 0, // Format_RGB555,
1018 0, // Format_ARGB8555_Premultiplied,
1019 0, // Format_RGB888,
1020 0, // Format_RGB444,
1021 0 // Format_ARGB4444_Premultiplied,
1024 0, // Format_Invalid,
1026 0, // Format_MonoLSB,
1027 0, // Format_Indexed8,
1029 0, // Format_ARGB32,
1030 0, // Format_ARGB32_Premultiplied,
1032 0, // Format_ARGB8565_Premultiplied,
1033 0, // Format_RGB666,
1034 0, // Format_ARGB6666_Premultiplied,
1035 0, // Format_RGB555,
1036 0, // Format_ARGB8555_Premultiplied,
1037 0, // Format_RGB888,
1038 0, // Format_RGB444,
1039 0 // Format_ARGB4444_Premultiplied,
1041 { // Format_ARGB4444_Premultiplied
1042 0, // Format_Invalid,
1044 0, // Format_MonoLSB,
1045 0, // Format_Indexed8,
1047 0, // Format_ARGB32,
1048 0, // Format_ARGB32_Premultiplied,
1050 0, // Format_ARGB8565_Premultiplied,
1051 0, // Format_RGB666,
1052 0, // Format_ARGB6666_Premultiplied,
1053 0, // Format_RGB555,
1054 0, // Format_ARGB8555_Premultiplied,
1055 0, // Format_RGB888,
1056 0, // Format_RGB444,
1057 0 // Format_ARGB4444_Premultiplied,
1062 SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
1064 0, // Format_Invalid,
1066 0, // Format_MonoLSB,
1067 0, // Format_Indexed8,
1069 0, // Format_ARGB32,
1070 0, // Format_ARGB32_Premultiplied,
1072 0, // Format_ARGB8565_Premultiplied,
1073 0, // Format_RGB666,
1074 0, // Format_ARGB6666_Premultiplied,
1075 0, // Format_RGB555,
1076 0, // Format_ARGB8555_Premultiplied,
1077 0, // Format_RGB888,
1078 0, // Format_RGB444,
1079 0 // Format_ARGB4444_Premultiplied,
1082 0, // Format_Invalid,
1084 0, // Format_MonoLSB,
1085 0, // Format_Indexed8,
1087 0, // Format_ARGB32,
1088 0, // Format_ARGB32_Premultiplied,
1090 0, // Format_ARGB8565_Premultiplied,
1091 0, // Format_RGB666,
1092 0, // Format_ARGB6666_Premultiplied,
1093 0, // Format_RGB555,
1094 0, // Format_ARGB8555_Premultiplied,
1095 0, // Format_RGB888,
1096 0, // Format_RGB444,
1097 0 // Format_ARGB4444_Premultiplied,
1100 0, // Format_Invalid,
1102 0, // Format_MonoLSB,
1103 0, // Format_Indexed8,
1105 0, // Format_ARGB32,
1106 0, // Format_ARGB32_Premultiplied,
1108 0, // Format_ARGB8565_Premultiplied,
1109 0, // Format_RGB666,
1110 0, // Format_ARGB6666_Premultiplied,
1111 0, // Format_RGB555,
1112 0, // Format_ARGB8555_Premultiplied,
1113 0, // Format_RGB888,
1114 0, // Format_RGB444,
1115 0 // Format_ARGB4444_Premultiplied,
1117 { // Format_Indexed8
1118 0, // Format_Invalid,
1120 0, // Format_MonoLSB,
1121 0, // Format_Indexed8,
1123 0, // Format_ARGB32,
1124 0, // Format_ARGB32_Premultiplied,
1126 0, // Format_ARGB8565_Premultiplied,
1127 0, // Format_RGB666,
1128 0, // Format_ARGB6666_Premultiplied,
1129 0, // Format_RGB555,
1130 0, // Format_ARGB8555_Premultiplied,
1131 0, // Format_RGB888,
1132 0, // Format_RGB444,
1133 0 // Format_ARGB4444_Premultiplied,
1136 0, // Format_Invalid,
1138 0, // Format_MonoLSB,
1139 0, // Format_Indexed8,
1140 qt_blend_rgb32_on_rgb32, // Format_RGB32,
1141 0, // Format_ARGB32,
1142 qt_blend_argb32_on_argb32, // Format_ARGB32_Premultiplied,
1144 0, // Format_ARGB8565_Premultiplied,
1145 0, // Format_RGB666,
1146 0, // Format_ARGB6666_Premultiplied,
1147 0, // Format_RGB555,
1148 0, // Format_ARGB8555_Premultiplied,
1149 0, // Format_RGB888,
1150 0, // Format_RGB444,
1151 0 // Format_ARGB4444_Premultiplied,
1154 0, // Format_Invalid,
1156 0, // Format_MonoLSB,
1157 0, // Format_Indexed8,
1159 0, // Format_ARGB32,
1160 0, // Format_ARGB32_Premultiplied,
1162 0, // Format_ARGB8565_Premultiplied,
1163 0, // Format_RGB666,
1164 0, // Format_ARGB6666_Premultiplied,
1165 0, // Format_RGB555,
1166 0, // Format_ARGB8555_Premultiplied,
1167 0, // Format_RGB888,
1168 0, // Format_RGB444,
1169 0 // Format_ARGB4444_Premultiplied,
1171 { // Format_ARGB32_Premultiplied
1172 0, // Format_Invalid,
1174 0, // Format_MonoLSB,
1175 0, // Format_Indexed8,
1176 qt_blend_rgb32_on_rgb32, // Format_RGB32,
1177 0, // Format_ARGB32,
1178 qt_blend_argb32_on_argb32, // Format_ARGB32_Premultiplied,
1180 0, // Format_ARGB8565_Premultiplied,
1181 0, // Format_RGB666,
1182 0, // Format_ARGB6666_Premultiplied,
1183 0, // Format_RGB555,
1184 0, // Format_ARGB8555_Premultiplied,
1185 0, // Format_RGB888,
1186 0, // Format_RGB444,
1187 0 // Format_ARGB4444_Premultiplied,
1190 0, // Format_Invalid,
1192 0, // Format_MonoLSB,
1193 0, // Format_Indexed8,
1194 qt_blend_rgb32_on_rgb16, // Format_RGB32,
1195 0, // Format_ARGB32,
1196 qt_blend_argb32_on_rgb16, // Format_ARGB32_Premultiplied,
1197 qt_blend_rgb16_on_rgb16, // Format_RGB16,
1198 qt_blend_argb24_on_rgb16, // Format_ARGB8565_Premultiplied,
1199 0, // Format_RGB666,
1200 0, // Format_ARGB6666_Premultiplied,
1201 0, // Format_RGB555,
1202 0, // Format_ARGB8555_Premultiplied,
1203 0, // Format_RGB888,
1204 0, // Format_RGB444,
1205 0 // Format_ARGB4444_Premultiplied,
1207 { // Format_ARGB8565_Premultiplied
1208 0, // Format_Invalid,
1210 0, // Format_MonoLSB,
1211 0, // Format_Indexed8,
1213 0, // Format_ARGB32,
1214 0, // Format_ARGB32_Premultiplied,
1216 0, // Format_ARGB8565_Premultiplied,
1217 0, // Format_RGB666,
1218 0, // Format_ARGB6666_Premultiplied,
1219 0, // Format_RGB555,
1220 0, // Format_ARGB8555_Premultiplied,
1221 0, // Format_RGB888,
1222 0, // Format_RGB444,
1223 0 // Format_ARGB4444_Premultiplied,
1226 0, // Format_Invalid,
1228 0, // Format_MonoLSB,
1229 0, // Format_Indexed8,
1231 0, // Format_ARGB32,
1232 0, // Format_ARGB32_Premultiplied,
1234 0, // Format_ARGB8565_Premultiplied,
1235 0, // Format_RGB666,
1236 0, // Format_ARGB6666_Premultiplied,
1237 0, // Format_RGB555,
1238 0, // Format_ARGB8555_Premultiplied,
1239 0, // Format_RGB888,
1240 0, // Format_RGB444,
1241 0 // Format_ARGB4444_Premultiplied,
1243 { // Format_ARGB6666_Premultiplied
1244 0, // Format_Invalid,
1246 0, // Format_MonoLSB,
1247 0, // Format_Indexed8,
1249 0, // Format_ARGB32,
1250 0, // Format_ARGB32_Premultiplied,
1252 0, // Format_ARGB8565_Premultiplied,
1253 0, // Format_RGB666,
1254 0, // Format_ARGB6666_Premultiplied,
1255 0, // Format_RGB555,
1256 0, // Format_ARGB8555_Premultiplied,
1257 0, // Format_RGB888,
1258 0, // Format_RGB444,
1259 0 // Format_ARGB4444_Premultiplied,
1262 0, // Format_Invalid,
1264 0, // Format_MonoLSB,
1265 0, // Format_Indexed8,
1267 0, // Format_ARGB32,
1268 0, // Format_ARGB32_Premultiplied,
1270 0, // Format_ARGB8565_Premultiplied,
1271 0, // Format_RGB666,
1272 0, // Format_ARGB6666_Premultiplied,
1273 0, // Format_RGB555,
1274 0, // Format_ARGB8555_Premultiplied,
1275 0, // Format_RGB888,
1276 0, // Format_RGB444,
1277 0 // Format_ARGB4444_Premultiplied,
1279 { // Format_ARGB8555_Premultiplied
1280 0, // Format_Invalid,
1282 0, // Format_MonoLSB,
1283 0, // Format_Indexed8,
1285 0, // Format_ARGB32,
1286 0, // Format_ARGB32_Premultiplied,
1288 0, // Format_ARGB8565_Premultiplied,
1289 0, // Format_RGB666,
1290 0, // Format_ARGB6666_Premultiplied,
1291 0, // Format_RGB555,
1292 0, // Format_ARGB8555_Premultiplied,
1293 0, // Format_RGB888,
1294 0, // Format_RGB444,
1295 0 // Format_ARGB4444_Premultiplied,
1298 0, // Format_Invalid,
1300 0, // Format_MonoLSB,
1301 0, // Format_Indexed8,
1303 0, // Format_ARGB32,
1304 0, // Format_ARGB32_Premultiplied,
1306 0, // Format_ARGB8565_Premultiplied,
1307 0, // Format_RGB666,
1308 0, // Format_ARGB6666_Premultiplied,
1309 0, // Format_RGB555,
1310 0, // Format_ARGB8555_Premultiplied,
1311 0, // Format_RGB888,
1312 0, // Format_RGB444,
1313 0 // Format_ARGB4444_Premultiplied,
1316 0, // Format_Invalid,
1318 0, // Format_MonoLSB,
1319 0, // Format_Indexed8,
1321 0, // Format_ARGB32,
1322 0, // Format_ARGB32_Premultiplied,
1324 0, // Format_ARGB8565_Premultiplied,
1325 0, // Format_RGB666,
1326 0, // Format_ARGB6666_Premultiplied,
1327 0, // Format_RGB555,
1328 0, // Format_ARGB8555_Premultiplied,
1329 0, // Format_RGB888,
1330 0, // Format_RGB444,
1331 0 // Format_ARGB4444_Premultiplied,
1333 { // Format_ARGB4444_Premultiplied
1334 0, // Format_Invalid,
1336 0, // Format_MonoLSB,
1337 0, // Format_Indexed8,
1339 0, // Format_ARGB32,
1340 0, // Format_ARGB32_Premultiplied,
1342 0, // Format_ARGB8565_Premultiplied,
1343 0, // Format_RGB666,
1344 0, // Format_ARGB6666_Premultiplied,
1345 0, // Format_RGB555,
1346 0, // Format_ARGB8555_Premultiplied,
1347 0, // Format_RGB888,
1348 0, // Format_RGB444,
1349 0 // Format_ARGB4444_Premultiplied,
1353 SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
1355 0, // Format_Invalid,
1357 0, // Format_MonoLSB,
1358 0, // Format_Indexed8,
1360 0, // Format_ARGB32,
1361 0, // Format_ARGB32_Premultiplied,
1363 0, // Format_ARGB8565_Premultiplied,
1364 0, // Format_RGB666,
1365 0, // Format_ARGB6666_Premultiplied,
1366 0, // Format_RGB555,
1367 0, // Format_ARGB8555_Premultiplied,
1368 0, // Format_RGB888,
1369 0, // Format_RGB444,
1370 0 // Format_ARGB4444_Premultiplied,
1373 0, // Format_Invalid,
1375 0, // Format_MonoLSB,
1376 0, // Format_Indexed8,
1378 0, // Format_ARGB32,
1379 0, // Format_ARGB32_Premultiplied,
1381 0, // Format_ARGB8565_Premultiplied,
1382 0, // Format_RGB666,
1383 0, // Format_ARGB6666_Premultiplied,
1384 0, // Format_RGB555,
1385 0, // Format_ARGB8555_Premultiplied,
1386 0, // Format_RGB888,
1387 0, // Format_RGB444,
1388 0 // Format_ARGB4444_Premultiplied,
1391 0, // Format_Invalid,
1393 0, // Format_MonoLSB,
1394 0, // Format_Indexed8,
1396 0, // Format_ARGB32,
1397 0, // Format_ARGB32_Premultiplied,
1399 0, // Format_ARGB8565_Premultiplied,
1400 0, // Format_RGB666,
1401 0, // Format_ARGB6666_Premultiplied,
1402 0, // Format_RGB555,
1403 0, // Format_ARGB8555_Premultiplied,
1404 0, // Format_RGB888,
1405 0, // Format_RGB444,
1406 0 // Format_ARGB4444_Premultiplied,
1408 { // Format_Indexed8
1409 0, // Format_Invalid,
1411 0, // Format_MonoLSB,
1412 0, // Format_Indexed8,
1414 0, // Format_ARGB32,
1415 0, // Format_ARGB32_Premultiplied,
1417 0, // Format_ARGB8565_Premultiplied,
1418 0, // Format_RGB666,
1419 0, // Format_ARGB6666_Premultiplied,
1420 0, // Format_RGB555,
1421 0, // Format_ARGB8555_Premultiplied,
1422 0, // Format_RGB888,
1423 0, // Format_RGB444,
1424 0 // Format_ARGB4444_Premultiplied,
1427 0, // Format_Invalid,
1429 0, // Format_MonoLSB,
1430 0, // Format_Indexed8,
1431 qt_transform_image_rgb32_on_rgb32, // Format_RGB32,
1432 0, // Format_ARGB32,
1433 qt_transform_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
1435 0, // Format_ARGB8565_Premultiplied,
1436 0, // Format_RGB666,
1437 0, // Format_ARGB6666_Premultiplied,
1438 0, // Format_RGB555,
1439 0, // Format_ARGB8555_Premultiplied,
1440 0, // Format_RGB888,
1441 0, // Format_RGB444,
1442 0 // Format_ARGB4444_Premultiplied,
1445 0, // Format_Invalid,
1447 0, // Format_MonoLSB,
1448 0, // Format_Indexed8,
1450 0, // Format_ARGB32,
1451 0, // Format_ARGB32_Premultiplied,
1453 0, // Format_ARGB8565_Premultiplied,
1454 0, // Format_RGB666,
1455 0, // Format_ARGB6666_Premultiplied,
1456 0, // Format_RGB555,
1457 0, // Format_ARGB8555_Premultiplied,
1458 0, // Format_RGB888,
1459 0, // Format_RGB444,
1460 0 // Format_ARGB4444_Premultiplied,
1462 { // Format_ARGB32_Premultiplied
1463 0, // Format_Invalid,
1465 0, // Format_MonoLSB,
1466 0, // Format_Indexed8,
1467 qt_transform_image_rgb32_on_rgb32, // Format_RGB32,
1468 0, // Format_ARGB32,
1469 qt_transform_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
1471 0, // Format_ARGB8565_Premultiplied,
1472 0, // Format_RGB666,
1473 0, // Format_ARGB6666_Premultiplied,
1474 0, // Format_RGB555,
1475 0, // Format_ARGB8555_Premultiplied,
1476 0, // Format_RGB888,
1477 0, // Format_RGB444,
1478 0 // Format_ARGB4444_Premultiplied,
1481 0, // Format_Invalid,
1483 0, // Format_MonoLSB,
1484 0, // Format_Indexed8,
1486 0, // Format_ARGB32,
1487 qt_transform_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied,
1488 qt_transform_image_rgb16_on_rgb16, // Format_RGB16,
1489 qt_transform_image_argb24_on_rgb16, // Format_ARGB8565_Premultiplied,
1490 0, // Format_RGB666,
1491 0, // Format_ARGB6666_Premultiplied,
1492 0, // Format_RGB555,
1493 0, // Format_ARGB8555_Premultiplied,
1494 0, // Format_RGB888,
1495 0, // Format_RGB444,
1496 0 // Format_ARGB4444_Premultiplied,
1498 { // Format_ARGB8565_Premultiplied
1499 0, // Format_Invalid,
1501 0, // Format_MonoLSB,
1502 0, // Format_Indexed8,
1504 0, // Format_ARGB32,
1505 0, // Format_ARGB32_Premultiplied,
1507 0, // Format_ARGB8565_Premultiplied,
1508 0, // Format_RGB666,
1509 0, // Format_ARGB6666_Premultiplied,
1510 0, // Format_RGB555,
1511 0, // Format_ARGB8555_Premultiplied,
1512 0, // Format_RGB888,
1513 0, // Format_RGB444,
1514 0 // Format_ARGB4444_Premultiplied,
1517 0, // Format_Invalid,
1519 0, // Format_MonoLSB,
1520 0, // Format_Indexed8,
1522 0, // Format_ARGB32,
1523 0, // Format_ARGB32_Premultiplied,
1525 0, // Format_ARGB8565_Premultiplied,
1526 0, // Format_RGB666,
1527 0, // Format_ARGB6666_Premultiplied,
1528 0, // Format_RGB555,
1529 0, // Format_ARGB8555_Premultiplied,
1530 0, // Format_RGB888,
1531 0, // Format_RGB444,
1532 0 // Format_ARGB4444_Premultiplied,
1534 { // Format_ARGB6666_Premultiplied
1535 0, // Format_Invalid,
1537 0, // Format_MonoLSB,
1538 0, // Format_Indexed8,
1540 0, // Format_ARGB32,
1541 0, // Format_ARGB32_Premultiplied,
1543 0, // Format_ARGB8565_Premultiplied,
1544 0, // Format_RGB666,
1545 0, // Format_ARGB6666_Premultiplied,
1546 0, // Format_RGB555,
1547 0, // Format_ARGB8555_Premultiplied,
1548 0, // Format_RGB888,
1549 0, // Format_RGB444,
1550 0 // Format_ARGB4444_Premultiplied,
1553 0, // Format_Invalid,
1555 0, // Format_MonoLSB,
1556 0, // Format_Indexed8,
1558 0, // Format_ARGB32,
1559 0, // Format_ARGB32_Premultiplied,
1561 0, // Format_ARGB8565_Premultiplied,
1562 0, // Format_RGB666,
1563 0, // Format_ARGB6666_Premultiplied,
1564 0, // Format_RGB555,
1565 0, // Format_ARGB8555_Premultiplied,
1566 0, // Format_RGB888,
1567 0, // Format_RGB444,
1568 0 // Format_ARGB4444_Premultiplied,
1570 { // Format_ARGB8555_Premultiplied
1571 0, // Format_Invalid,
1573 0, // Format_MonoLSB,
1574 0, // Format_Indexed8,
1576 0, // Format_ARGB32,
1577 0, // Format_ARGB32_Premultiplied,
1579 0, // Format_ARGB8565_Premultiplied,
1580 0, // Format_RGB666,
1581 0, // Format_ARGB6666_Premultiplied,
1582 0, // Format_RGB555,
1583 0, // Format_ARGB8555_Premultiplied,
1584 0, // Format_RGB888,
1585 0, // Format_RGB444,
1586 0 // Format_ARGB4444_Premultiplied,
1589 0, // Format_Invalid,
1591 0, // Format_MonoLSB,
1592 0, // Format_Indexed8,
1594 0, // Format_ARGB32,
1595 0, // Format_ARGB32_Premultiplied,
1597 0, // Format_ARGB8565_Premultiplied,
1598 0, // Format_RGB666,
1599 0, // Format_ARGB6666_Premultiplied,
1600 0, // Format_RGB555,
1601 0, // Format_ARGB8555_Premultiplied,
1602 0, // Format_RGB888,
1603 0, // Format_RGB444,
1604 0 // Format_ARGB4444_Premultiplied,
1607 0, // Format_Invalid,
1609 0, // Format_MonoLSB,
1610 0, // Format_Indexed8,
1612 0, // Format_ARGB32,
1613 0, // Format_ARGB32_Premultiplied,
1615 0, // Format_ARGB8565_Premultiplied,
1616 0, // Format_RGB666,
1617 0, // Format_ARGB6666_Premultiplied,
1618 0, // Format_RGB555,
1619 0, // Format_ARGB8555_Premultiplied,
1620 0, // Format_RGB888,
1621 0, // Format_RGB444,
1622 0 // Format_ARGB4444_Premultiplied,
1624 { // Format_ARGB4444_Premultiplied
1625 0, // Format_Invalid,
1627 0, // Format_MonoLSB,
1628 0, // Format_Indexed8,
1630 0, // Format_ARGB32,
1631 0, // Format_ARGB32_Premultiplied,
1633 0, // Format_ARGB8565_Premultiplied,
1634 0, // Format_RGB666,
1635 0, // Format_ARGB6666_Premultiplied,
1636 0, // Format_RGB555,
1637 0, // Format_ARGB8555_Premultiplied,
1638 0, // Format_RGB888,
1639 0, // Format_RGB444,
1640 0 // Format_ARGB4444_Premultiplied,