summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qblendfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qblendfunctions.cpp')
-rw-r--r--src/gui/painting/qblendfunctions.cpp2136
1 files changed, 70 insertions, 2066 deletions
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 478fe6564c..b3710411c9 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -432,10 +432,10 @@ static void qt_blend_argb32pm_on_a2rgb30pm(uchar *destPixels, int dbpl,
}
template<QtPixelOrder PixelOrder>
-void qt_blend_rgb32_on_rgb30(uchar *destPixels, int dbpl,
- const uchar *srcPixels, int sbpl,
- int w, int h,
- int const_alpha)
+static void qt_blend_rgb32_on_rgb30(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ int w, int h,
+ int const_alpha)
{
#ifdef QT_DEBUG_DRAW
fprintf(stdout, "qt_blend_rgb32_on_rgb30: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
@@ -496,10 +496,10 @@ static void qt_blend_a2rgb30pm_on_a2rgb30pm(uchar *destPixels, int dbpl,
}
-void qt_blend_rgb30_on_rgb30(uchar *destPixels, int dbpl,
- const uchar *srcPixels, int sbpl,
- int w, int h,
- int const_alpha)
+static void qt_blend_rgb30_on_rgb30(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ int w, int h,
+ int const_alpha)
{
#ifdef QT_DEBUG_DRAW
fprintf(stdout, "qt_blend_rgb30_on_rgb30: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
@@ -740,2071 +740,75 @@ void qt_transform_image_argb32_on_argb32(uchar *destPixels, int dbpl,
}
}
-SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
- { // Format_Invalid
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGRs30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Mono
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_MonoLSB
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Indexed8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB32
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_scale_image_rgb32_on_rgb32, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_scale_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB32
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB32_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_scale_image_rgb32_on_rgb32, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_scale_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB16
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_scale_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied,
- qt_scale_image_rgb16_on_rgb16, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB8565_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB666
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB6666_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB555
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB8555_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB444
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB4444_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBX8888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
-#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- qt_scale_image_rgb32_on_rgb32, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- qt_scale_image_argb32_on_argb32, // Format_RGBA8888_Premultiplied,
-#else
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
-#endif
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBA8888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBA8888_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
-#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- qt_scale_image_rgb32_on_rgb32, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- qt_scale_image_argb32_on_argb32, // Format_RGBA8888_Premultiplied,
-#else
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
-#endif
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_BGR30
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_A2BGR30_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB30
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_A2RGB30_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Alpha8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Grayscale8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- }
-};
-
+SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats];
+SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats];
+SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats];
-SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
- { // Format_Invalid
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Mono
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_MonoLSB
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Indexed8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB32
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_blend_rgb32_on_rgb32, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_blend_argb32_on_argb32, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB32
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB32_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_blend_rgb32_on_rgb32, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_blend_argb32_on_argb32, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB16
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_blend_rgb32_on_rgb16, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_blend_argb32_on_rgb16, // Format_ARGB32_Premultiplied,
- qt_blend_rgb16_on_rgb16, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB8565_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB666
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB6666_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB555
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB8555_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB444
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB4444_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBX8888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
-#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- qt_blend_rgb32_on_rgb32, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- qt_blend_argb32_on_argb32, // Format_RGBA8888_Premultiplied,
-#else
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
-#endif
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBA8888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBA8888_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
+void qInitBlendFunctions()
+{
+ qScaleFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_scale_image_rgb32_on_rgb32;
+ qScaleFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32;
+ qScaleFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_scale_image_rgb32_on_rgb32;
+ qScaleFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_argb32;
+ qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16;
+ qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16;
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- qt_blend_rgb32_on_rgb32, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- qt_blend_argb32_on_argb32, // Format_RGBA8888_Premultiplied,
-#else
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
+ qScaleFunctions[QImage::Format_RGBX8888][QImage::Format_RGBX8888] = qt_scale_image_rgb32_on_rgb32;
+ qScaleFunctions[QImage::Format_RGBX8888][QImage::Format_RGBA8888_Premultiplied] = qt_scale_image_argb32_on_argb32;
+ qScaleFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBX8888] = qt_scale_image_rgb32_on_rgb32;
+ qScaleFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBA8888_Premultiplied] = qt_scale_image_argb32_on_argb32;
#endif
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_BGR30
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_blend_rgb32_on_rgb30<PixelOrderBGR>, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_blend_argb32pm_on_a2rgb30pm<PixelOrderBGR>, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- qt_blend_rgb30_on_rgb30, // Format_RGB30,
- qt_blend_a2rgb30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
- qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_RGB30,
- qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
- 0, 0,
- },
- { // Format_A2BGR30_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_blend_rgb32_on_rgb30<PixelOrderBGR>, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_blend_argb32pm_on_a2rgb30pm<PixelOrderBGR>, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- qt_blend_rgb30_on_rgb30, // Format_BGR30,
- qt_blend_a2rgb30pm_on_a2rgb30pm, // Format_A2BGR30_Premultiplied,
- qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_RGB30,
- qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
- 0, 0,
- },
- { // Format_RGB30
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_blend_rgb32_on_rgb30<PixelOrderRGB>, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_blend_argb32pm_on_a2rgb30pm<PixelOrderRGB>, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_BGR30,
- qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_A2BGR30_Premultiplied,
- qt_blend_rgb30_on_rgb30, // Format_RGB30,
- qt_blend_a2rgb30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
- 0, 0,
- },
- { // Format_A2RGB30_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_blend_rgb32_on_rgb30<PixelOrderRGB>, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_blend_argb32pm_on_a2rgb30pm<PixelOrderRGB>, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_BGR30,
- qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_A2BGR30_Premultiplied,
- qt_blend_rgb30_on_rgb30, // Format_RGB30,
- qt_blend_a2rgb30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
- 0, 0,
- },
- { // Format_Alpha8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Grayscale8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- }
-};
-SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
- { // Format_Invalid
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Mono
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_MonoLSB
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Indexed8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB32
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_transform_image_rgb32_on_rgb32, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_transform_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB32
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB32_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- qt_transform_image_rgb32_on_rgb32, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_transform_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB16
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- qt_transform_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied,
- qt_transform_image_rgb16_on_rgb16, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB8565_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB666
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB6666_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB555
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB8555_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB444
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_ARGB4444_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBX8888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
+ qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32;
+ qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32;
+ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32;
+ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32;
+ qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb16;
+ qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16;
+ qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16;
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- qt_transform_image_rgb32_on_rgb32, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- qt_transform_image_argb32_on_argb32, // Format_RGBA8888_Premultiplied,
-#else
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
+ qBlendFunctions[QImage::Format_RGBX8888][QImage::Format_RGBX8888] = qt_blend_rgb32_on_rgb32;
+ qBlendFunctions[QImage::Format_RGBX8888][QImage::Format_RGBA8888_Premultiplied] = qt_blend_argb32_on_argb32;
+ qBlendFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBX8888] = qt_blend_rgb32_on_rgb32;
+ qBlendFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBA8888_Premultiplied] = qt_blend_argb32_on_argb32;
#endif
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBA8888
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGBA8888_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
+ qBlendFunctions[QImage::Format_BGR30][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb30<PixelOrderBGR>;
+ qBlendFunctions[QImage::Format_BGR30][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32pm_on_a2rgb30pm<PixelOrderBGR>;
+ qBlendFunctions[QImage::Format_BGR30][QImage::Format_BGR30] = qt_blend_rgb30_on_rgb30;
+ qBlendFunctions[QImage::Format_BGR30][QImage::Format_A2BGR30_Premultiplied] = qt_blend_a2rgb30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_BGR30][QImage::Format_RGB30] = qt_blend_a2bgr30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_BGR30][QImage::Format_A2RGB30_Premultiplied] = qt_blend_a2bgr30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_A2BGR30_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb30<PixelOrderBGR>;
+ qBlendFunctions[QImage::Format_A2BGR30_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32pm_on_a2rgb30pm<PixelOrderBGR>;
+ qBlendFunctions[QImage::Format_A2BGR30_Premultiplied][QImage::Format_BGR30] = qt_blend_rgb30_on_rgb30;
+ qBlendFunctions[QImage::Format_A2BGR30_Premultiplied][QImage::Format_A2BGR30_Premultiplied] = qt_blend_a2rgb30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_A2BGR30_Premultiplied][QImage::Format_RGB30] = qt_blend_a2bgr30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_A2BGR30_Premultiplied][QImage::Format_A2RGB30_Premultiplied] = qt_blend_a2bgr30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_RGB30][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb30<PixelOrderRGB>;
+ qBlendFunctions[QImage::Format_RGB30][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32pm_on_a2rgb30pm<PixelOrderRGB>;
+ qBlendFunctions[QImage::Format_RGB30][QImage::Format_BGR30] = qt_blend_a2bgr30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_RGB30][QImage::Format_A2BGR30_Premultiplied] = qt_blend_a2bgr30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_RGB30][QImage::Format_RGB30] = qt_blend_rgb30_on_rgb30;
+ qBlendFunctions[QImage::Format_RGB30][QImage::Format_A2RGB30_Premultiplied] = qt_blend_a2rgb30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_A2RGB30_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb30<PixelOrderRGB>;
+ qBlendFunctions[QImage::Format_A2RGB30_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32pm_on_a2rgb30pm<PixelOrderRGB>;
+ qBlendFunctions[QImage::Format_A2RGB30_Premultiplied][QImage::Format_BGR30] = qt_blend_a2bgr30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_A2RGB30_Premultiplied][QImage::Format_A2BGR30_Premultiplied] = qt_blend_a2bgr30pm_on_a2rgb30pm;
+ qBlendFunctions[QImage::Format_A2RGB30_Premultiplied][QImage::Format_RGB30] = qt_blend_rgb30_on_rgb30;
+ qBlendFunctions[QImage::Format_A2RGB30_Premultiplied][QImage::Format_A2RGB30_Premultiplied] = qt_blend_a2rgb30pm_on_a2rgb30pm;
+
+ qTransformFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_transform_image_rgb32_on_rgb32;
+ qTransformFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_argb32;
+ qTransformFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_transform_image_rgb32_on_rgb32;
+ qTransformFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_argb32;
+ qTransformFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_rgb16;
+ qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16;
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- qt_transform_image_rgb32_on_rgb32, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- qt_transform_image_argb32_on_argb32, // Format_RGBA8888_Premultiplied,
-#else
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
+ qTransformFunctions[QImage::Format_RGBX8888][QImage::Format_RGBX8888] = qt_transform_image_rgb32_on_rgb32;
+ qTransformFunctions[QImage::Format_RGBX8888][QImage::Format_RGBA8888_Premultiplied] = qt_transform_image_argb32_on_argb32;
+ qTransformFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBX8888] = qt_transform_image_rgb32_on_rgb32;
+ qTransformFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBA8888_Premultiplied] = qt_transform_image_argb32_on_argb32;
#endif
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_BGR30
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_A2BGR30_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_RGB30
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_A2RGB30_Premultiplied
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Alpha8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
- { // Format_Grayscale8
- 0, // Format_Invalid,
- 0, // Format_Mono,
- 0, // Format_MonoLSB,
- 0, // Format_Indexed8,
- 0, // Format_RGB32,
- 0, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied,
- 0, // Format_RGB16,
- 0, // Format_ARGB8565_Premultiplied,
- 0, // Format_RGB666,
- 0, // Format_ARGB6666_Premultiplied,
- 0, // Format_RGB555,
- 0, // Format_ARGB8555_Premultiplied,
- 0, // Format_RGB888,
- 0, // Format_RGB444,
- 0, // Format_ARGB4444_Premultiplied,
- 0, // Format_RGBX8888,
- 0, // Format_RGBA8888,
- 0, // Format_RGBA8888_Premultiplied,
- 0, // Format_BGR30,
- 0, // Format_A2BGR30_Premultiplied,
- 0, // Format_RGB30,
- 0, // Format_A2RGB30_Premultiplied,
- 0, // Format_Alpha8
- 0, // Format_Grayscale8
- },
-};
+}
QT_END_NAMESPACE