4#ifndef QPIXELLAYOUT_P_H
5#define QPIXELLAYOUT_P_H
18#include <QtCore/qlist.h>
19#include <QtGui/qimage.h>
20#include <QtGui/qrgba64.h>
21#include <QtGui/qrgbafloat.h>
22#include <QtCore/private/qglobal_p.h>
39template<
unsigned int Shift>
46 constexpr uint mult = 255 / (255 >> Shift);
47 const uint newAlpha = mult * (
alpha >> Shift);
48 p = (
p & ~0xff000000) | (newAlpha<<24);
52template<
unsigned int Shift>
58 p =
p.unpremultiplied();
59 constexpr uint mult = 65535 / (65535 >> Shift);
60 p.setAlpha(mult * (
alpha >> Shift));
61 return p.premultiplied();
67 c = qRepremultiply<6>(
c);
68 return (
c & 0xc0000000)
69 | (((
c << 22) & 0x3fc00000) | ((
c << 14) & 0x00300000))
70 | (((
c << 4) & 0x000ff000) | ((
c >> 4) & 0x00000c00))
71 | (((
c >> 14) & 0x000003fc) | ((
c >> 22) & 0x00000003));
77 c = qRepremultiply<6>(
c);
78 return (
c & 0xc0000000)
79 | (((
c << 6) & 0x3fc00000) | ((
c >> 2) & 0x00300000))
80 | (((
c << 4) & 0x000ff000) | ((
c >> 4) & 0x00000c00))
81 | (((
c << 2) & 0x000003fc) | ((
c >> 6) & 0x00000003));
88 | (((
c << 22) & 0x3fc00000) | ((
c << 14) & 0x00300000))
89 | (((
c << 4) & 0x000ff000) | ((
c >> 4) & 0x00000c00))
90 | (((
c >> 14) & 0x000003fc) | ((
c >> 22) & 0x00000003));
97 | (((
c << 6) & 0x3fc00000) | ((
c >> 2) & 0x00300000))
98 | (((
c << 4) & 0x000ff000) | ((
c >> 4) & 0x00000c00))
99 | (((
c << 2) & 0x000003fc) | ((
c >> 6) & 0x00000003));
109 | ((
c << 14) & 0x00ff0000)
110 | ((
c >> 4) & 0x0000ff00)
111 | ((
c >> 22) & 0x000000ff);
121 | ((
c >> 6) & 0x00ff0000)
122 | ((
c >> 4) & 0x0000ff00)
123 | ((
c >> 2) & 0x000000ff);
167 c = qRepremultiply<14>(
c);
168 const uint a =
c.alpha() >> 14;
169 const uint r =
c.red() >> 6;
170 const uint g =
c.green() >> 6;
171 const uint b =
c.blue() >> 6;
172 return (
a << 30) | (
b << 20) | (
g << 10) |
r;
178 c = qRepremultiply<14>(
c);
179 const uint a =
c.alpha() >> 14;
180 const uint r =
c.red() >> 6;
181 const uint g =
c.green() >> 6;
182 const uint b =
c.blue() >> 6;
183 return (
a << 30) | (
r << 20) | (
g << 10) |
b;
198 const uint ag =
c & 0xc00ffc00;
199 const uint rb =
c & 0x3ff003ff;
200 return ag | (rb << 20) | (rb >> 20);
203#if Q_BYTE_ORDER == Q_BIG_ENDIAN
220 return ag | (rg << 16) | (rg >> 16);
230#define UNALIASED_CONVERSION_LOOP(buffer, src, count, conversion) \
231 if (src == buffer) { \
232 for (int i = 0; i < count; ++i) \
233 buffer[i] = conversion(buffer[i]); \
235 for (int i = 0; i < count; ++i) \
236 buffer[i] = conversion(src[i]); \
323#if QT_CONFIG(raster_fp)
static constexpr QRgbaFloat fromRgba64(quint16 red, quint16 green, quint16 blue, quint16 alpha)
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLenum GLsizei count
GLfloat GLfloat GLfloat GLfloat h
GLfloat GLfloat GLfloat alpha
void(QT_FASTCALL * Convert64Func)(QRgba64 *buffer, int count)
QRgba64 qConvertA2rgb30ToRgb64< PixelOrderBGR >(uint rgb)
void(QT_FASTCALL * ConvertFunc)(uint *buffer, int count, const QList< QRgb > *clut)
unsigned int qConvertRgb64ToRgb30< PixelOrderBGR >(QRgba64 c)
QRgb qConvertA2rgb30ToArgb32< PixelOrderBGR >(uint c)
constexpr QRgbaFloat32 qConvertRgb64ToRgbaF32(QRgba64 c)
const uint * qt_convertRGBA8888ToARGB32PM(uint *buffer, const uint *src, int count)
const QRgbaFloat32 *(QT_FASTCALL * ConvertToFPFunc)(QRgbaFloat32 *buffer, const uint *src, int count, const QList< QRgb > *clut, QDitherInfo *dither)
void(QT_FASTCALL * RbSwapFunc)(uchar *dst, const uchar *src, int count)
static quint32 RGBA2ARGB(quint32 x)
#define UNALIASED_CONVERSION_LOOP(buffer, src, count, conversion)
ConvertAndStorePixelsFunc64 qStoreFromRGBA64PM[QImage::NImageFormats]
uint qConvertRgb32ToRgb30< PixelOrderRGB >(QRgb c)
QPixelLayout qPixelLayouts[QImage::NImageFormats]
const uint *(QT_FASTCALL * FetchAndConvertPixelsFunc)(uint *buffer, const uchar *src, int index, int count, const QList< QRgb > *clut, QDitherInfo *dither)
const QRgba64 *(QT_FASTCALL * FetchAndConvertPixelsFunc64)(QRgba64 *buffer, const uchar *src, int index, int count, const QList< QRgb > *clut, QDitherInfo *dither)
void(QT_FASTCALL * ConvertFPFunc)(QRgbaFloat32 *buffer, int count)
QRgba64 qConvertA2rgb30ToRgb64< PixelOrderRGB >(uint rgb)
uint qConvertArgb32ToA2rgb30(QRgb)
void(QT_FASTCALL * Convert64ToFPFunc)(QRgbaFloat32 *buffer, const quint64 *src, int count)
uint qConvertArgb32ToA2rgb30< PixelOrderBGR >(QRgb c)
uint qConvertRgb32ToRgb30< PixelOrderBGR >(QRgb c)
MemRotateFunc qMemRotateFunctions[QPixelLayout::BPPCount][3]
QRgb qConvertA2rgb30ToArgb32< PixelOrderRGB >(uint c)
constexpr QRgbaFloat16 qConvertRgb64ToRgbaF16(QRgba64 c)
void qt_convertRGBA64ToARGB32(uint *dst, const QRgba64 *src, int count)
static quint32 ARGB2RGBA(quint32 x)
unsigned int qConvertRgb64ToRgb30< PixelOrderRGB >(QRgba64 c)
QRgb qConvertA2rgb30ToArgb32(uint c)
const QRgba64 *(QT_FASTCALL * ConvertTo64Func)(QRgba64 *buffer, const uint *src, int count, const QList< QRgb > *clut, QDitherInfo *dither)
void(QT_FASTCALL * ConvertAndStorePixelsFuncFP)(uchar *dest, const QRgbaFloat32 *src, int index, int count, const QList< QRgb > *clut, QDitherInfo *dither)
const QRgbaFloat32 *(QT_FASTCALL * FetchAndConvertPixelsFuncFP)(QRgbaFloat32 *buffer, const uchar *src, int index, int count, const QList< QRgb > *clut, QDitherInfo *dither)
void(* MemRotateFunc)(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
unsigned int qConvertRgb64ToRgb30(QRgba64)
uint qConvertArgb32ToA2rgb30< PixelOrderRGB >(QRgb c)
QRgba64 qConvertA2rgb30ToRgb64(uint rgb)
QRgb qRepremultiply(QRgb p)
const uint * qt_convertARGB32ToARGB32PM(uint *buffer, const uint *src, int count)
void(QT_FASTCALL * ConvertAndStorePixelsFunc)(uchar *dest, const uint *src, int index, int count, const QList< QRgb > *clut, QDitherInfo *dither)
void(QT_FASTCALL * ConvertAndStorePixelsFunc64)(uchar *dest, const QRgba64 *src, int index, int count, const QList< QRgb > *clut, QDitherInfo *dither)
uint qRgbSwapRgb30(uint c)
uint qConvertRgb32ToRgb30(QRgb)
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
QRgb qUnpremultiply(QRgb p)
constexpr QRgb qPremultiply(QRgb x)
constexpr int qAlpha(QRgb rgb)
constexpr QRgba64 qRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
unsigned long long quint64
ConvertFunc convertToARGB32PM
ConvertAndStorePixelsFunc storeFromARGB32PM
ConvertTo64Func convertToRGBA64PM
FetchAndConvertPixelsFunc64 fetchToRGBA64PM
FetchAndConvertPixelsFunc fetchToARGB32PM
ConvertAndStorePixelsFunc storeFromRGB32