Coverage Report

Created: 2026-05-31 06:50

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qtbase/src/gui/painting/qmemrotate.cpp
Line
Count
Source
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#include "qmemrotate_p.h"
6
#include "qpixellayout_p.h"
7
8
QT_BEGIN_NAMESPACE
9
10
static const int tileSize = 32;
11
12
template<class T>
13
static inline void qt_memrotate90_tiled(const T *src, int w, int h, int isstride, T *dest, int idstride)
14
0
{
15
0
    const qsizetype sstride = isstride / sizeof(T);
16
0
    const qsizetype dstride = idstride / sizeof(T);
17
18
0
    const int pack = sizeof(quint32) / sizeof(T);
19
0
    const int unaligned =
20
0
        qMin(uint((quintptr(dest) & (sizeof(quint32)-1)) / sizeof(T)), uint(h));
21
0
    const int restX = w % tileSize;
22
0
    const int restY = (h - unaligned) % tileSize;
23
0
    const int unoptimizedY = restY % pack;
24
0
    const int numTilesX = w / tileSize + (restX > 0);
25
0
    const int numTilesY = (h - unaligned) / tileSize + (restY >= pack);
26
27
0
    for (int tx = 0; tx < numTilesX; ++tx) {
28
0
        const int startx = w - tx * tileSize - 1;
29
0
        const int stopx = qMax(startx - tileSize, 0);
30
31
0
        if (unaligned) {
32
0
            for (int x = startx; x >= stopx; --x) {
33
0
                T *d = dest + (w - x - 1) * dstride;
34
0
                for (int y = 0; y < unaligned; ++y) {
35
0
                    *d++ = src[y * sstride + x];
36
0
                }
37
0
            }
38
0
        }
39
40
0
        for (int ty = 0; ty < numTilesY; ++ty) {
41
0
            const int starty = ty * tileSize + unaligned;
42
0
            const int stopy = qMin(starty + tileSize, h - unoptimizedY);
43
44
0
            for (int x = startx; x >= stopx; --x) {
45
0
                quint32 *d = reinterpret_cast<quint32*>(dest + (w - x - 1) * dstride + starty);
46
0
                for (int y = starty; y < stopy; y += pack) {
47
0
                    quint32 c = src[y * sstride + x];
48
0
                    for (int i = 1; i < pack; ++i) {
49
0
                        const int shift = (sizeof(T) * 8 * i);
50
0
                        const T color = src[(y + i) * sstride + x];
51
0
                        c |= color << shift;
52
0
                    }
53
0
                    *d++ = c;
54
0
                }
55
0
            }
56
0
        }
57
58
0
        if (unoptimizedY) {
59
0
            const int starty = h - unoptimizedY;
60
0
            for (int x = startx; x >= stopx; --x) {
61
0
                T *d = dest + (w - x - 1) * dstride + starty;
62
0
                for (int y = starty; y < h; ++y) {
63
0
                    *d++ = src[y * sstride + x];
64
0
                }
65
0
            }
66
0
        }
67
0
    }
68
0
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate90_tiled<unsigned short>(unsigned short const*, int, int, int, unsigned short*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate90_tiled<unsigned char>(unsigned char const*, int, int, int, unsigned char*, int)
69
70
template<class T>
71
static inline void qt_memrotate90_tiled_unpacked(const T *src, int w, int h, int isstride, T *dest, int idstride)
72
7
{
73
7
    const qsizetype sstride = isstride;
74
7
    const qsizetype dstride = idstride;
75
7
    const int numTilesX = (w + tileSize - 1) / tileSize;
76
7
    const int numTilesY = (h + tileSize - 1) / tileSize;
77
78
35
    for (int tx = 0; tx < numTilesX; ++tx) {
79
28
        const int startx = w - tx * tileSize - 1;
80
28
        const int stopx = qMax(startx - tileSize, 0);
81
82
112
        for (int ty = 0; ty < numTilesY; ++ty) {
83
84
            const int starty = ty * tileSize;
84
84
            const int stopy = qMin(starty + tileSize, h);
85
86
2.83k
            for (int x = startx; x >= stopx; --x) {
87
2.75k
                T *d = (T *)((char*)dest + (w - x - 1) * dstride) + starty;
88
2.75k
                const char *s = (const char*)(src + x) + starty * sstride;
89
67.8k
                for (int y = starty; y < stopy; ++y) {
90
65.1k
                    *d++ = *(const T *)(s);
91
65.1k
                    s += sstride;
92
65.1k
                }
93
2.75k
            }
94
84
        }
95
28
    }
96
7
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate90_tiled_unpacked<QRgbaFloat<float> >(QRgbaFloat<float> const*, int, int, int, QRgbaFloat<float>*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate90_tiled_unpacked<unsigned long long>(unsigned long long const*, int, int, int, unsigned long long*, int)
qmemrotate.cpp:void qt_memrotate90_tiled_unpacked<unsigned int>(unsigned int const*, int, int, int, unsigned int*, int)
Line
Count
Source
72
7
{
73
7
    const qsizetype sstride = isstride;
74
7
    const qsizetype dstride = idstride;
75
7
    const int numTilesX = (w + tileSize - 1) / tileSize;
76
7
    const int numTilesY = (h + tileSize - 1) / tileSize;
77
78
35
    for (int tx = 0; tx < numTilesX; ++tx) {
79
28
        const int startx = w - tx * tileSize - 1;
80
28
        const int stopx = qMax(startx - tileSize, 0);
81
82
112
        for (int ty = 0; ty < numTilesY; ++ty) {
83
84
            const int starty = ty * tileSize;
84
84
            const int stopy = qMin(starty + tileSize, h);
85
86
2.83k
            for (int x = startx; x >= stopx; --x) {
87
2.75k
                T *d = (T *)((char*)dest + (w - x - 1) * dstride) + starty;
88
2.75k
                const char *s = (const char*)(src + x) + starty * sstride;
89
67.8k
                for (int y = starty; y < stopy; ++y) {
90
65.1k
                    *d++ = *(const T *)(s);
91
65.1k
                    s += sstride;
92
65.1k
                }
93
2.75k
            }
94
84
        }
95
28
    }
96
7
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate90_tiled_unpacked<quint24>(quint24 const*, int, int, int, quint24*, int)
97
98
template<class T>
99
static inline void qt_memrotate270_tiled(const T *src, int w, int h, int isstride, T *dest, int idstride)
100
0
{
101
0
    const qsizetype sstride = isstride / sizeof(T);
102
0
    const qsizetype dstride = idstride / sizeof(T);
103
104
0
    const int pack = sizeof(quint32) / sizeof(T);
105
0
    const int unaligned =
106
0
        qMin(uint((quintptr(dest) & (sizeof(quint32)-1)) / sizeof(T)), uint(h));
107
0
    const int restX = w % tileSize;
108
0
    const int restY = (h - unaligned) % tileSize;
109
0
    const int unoptimizedY = restY % pack;
110
0
    const int numTilesX = w / tileSize + (restX > 0);
111
0
    const int numTilesY = (h - unaligned) / tileSize + (restY >= pack);
112
113
0
    for (int tx = 0; tx < numTilesX; ++tx) {
114
0
        const int startx = tx * tileSize;
115
0
        const int stopx = qMin(startx + tileSize, w);
116
117
0
        if (unaligned) {
118
0
            for (int x = startx; x < stopx; ++x) {
119
0
                T *d = dest + x * dstride;
120
0
                for (int y = h - 1; y >= h - unaligned; --y) {
121
0
                    *d++ = src[y * sstride + x];
122
0
                }
123
0
            }
124
0
        }
125
126
0
        for (int ty = 0; ty < numTilesY; ++ty) {
127
0
            const int starty = h - 1 - unaligned - ty * tileSize;
128
0
            const int stopy = qMax(starty - tileSize, unoptimizedY);
129
130
0
            for (int x = startx; x < stopx; ++x) {
131
0
                quint32 *d = reinterpret_cast<quint32*>(dest + x * dstride
132
0
                                                        + h - 1 - starty);
133
0
                for (int y = starty; y >= stopy; y -= pack) {
134
0
                    quint32 c = src[y * sstride + x];
135
0
                    for (int i = 1; i < pack; ++i) {
136
0
                        const int shift = (sizeof(T) * 8 * i);
137
0
                        const T color = src[(y - i) * sstride + x];
138
0
                        c |= color << shift;
139
0
                    }
140
0
                    *d++ = c;
141
0
                }
142
0
            }
143
0
        }
144
0
        if (unoptimizedY) {
145
0
            const int starty = unoptimizedY - 1;
146
0
            for (int x = startx; x < stopx; ++x) {
147
0
                T *d = dest + x * dstride + h - 1 - starty;
148
0
                for (int y = starty; y >= 0; --y) {
149
0
                    *d++ = src[y * sstride + x];
150
0
                }
151
0
            }
152
0
        }
153
0
    }
154
0
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate270_tiled<unsigned short>(unsigned short const*, int, int, int, unsigned short*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate270_tiled<unsigned char>(unsigned char const*, int, int, int, unsigned char*, int)
155
156
template<class T>
157
static inline void qt_memrotate270_tiled_unpacked(const T *src, int w, int h, int isstride, T *dest, int idstride)
158
13
{
159
13
    const qsizetype sstride = isstride;
160
13
    const qsizetype dstride = idstride;
161
13
    const int numTilesX = (w + tileSize - 1) / tileSize;
162
13
    const int numTilesY = (h + tileSize - 1) / tileSize;
163
164
65
    for (int tx = 0; tx < numTilesX; ++tx) {
165
52
        const int startx = tx * tileSize;
166
52
        const int stopx = qMin(startx + tileSize, w);
167
168
208
        for (int ty = 0; ty < numTilesY; ++ty) {
169
156
            const int starty = h - 1 - ty * tileSize;
170
156
            const int stopy = qMax(starty - tileSize, 0);
171
172
5.02k
            for (int x = startx; x < stopx; ++x) {
173
4.87k
                T *d = (T*)((char*)dest + x * dstride) + h - 1 - starty;
174
4.87k
                const char *s = (const char*)(src + x) + starty * sstride;
175
123k
                for (int y = starty; y >= stopy; --y) {
176
118k
                    *d++ = *(const T*)s;
177
118k
                    s -= sstride;
178
118k
                }
179
4.87k
            }
180
156
        }
181
52
    }
182
13
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate270_tiled_unpacked<QRgbaFloat<float> >(QRgbaFloat<float> const*, int, int, int, QRgbaFloat<float>*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate270_tiled_unpacked<unsigned long long>(unsigned long long const*, int, int, int, unsigned long long*, int)
qmemrotate.cpp:void qt_memrotate270_tiled_unpacked<unsigned int>(unsigned int const*, int, int, int, unsigned int*, int)
Line
Count
Source
158
13
{
159
13
    const qsizetype sstride = isstride;
160
13
    const qsizetype dstride = idstride;
161
13
    const int numTilesX = (w + tileSize - 1) / tileSize;
162
13
    const int numTilesY = (h + tileSize - 1) / tileSize;
163
164
65
    for (int tx = 0; tx < numTilesX; ++tx) {
165
52
        const int startx = tx * tileSize;
166
52
        const int stopx = qMin(startx + tileSize, w);
167
168
208
        for (int ty = 0; ty < numTilesY; ++ty) {
169
156
            const int starty = h - 1 - ty * tileSize;
170
156
            const int stopy = qMax(starty - tileSize, 0);
171
172
5.02k
            for (int x = startx; x < stopx; ++x) {
173
4.87k
                T *d = (T*)((char*)dest + x * dstride) + h - 1 - starty;
174
4.87k
                const char *s = (const char*)(src + x) + starty * sstride;
175
123k
                for (int y = starty; y >= stopy; --y) {
176
118k
                    *d++ = *(const T*)s;
177
118k
                    s -= sstride;
178
118k
                }
179
4.87k
            }
180
156
        }
181
52
    }
182
13
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate270_tiled_unpacked<quint24>(quint24 const*, int, int, int, quint24*, int)
183
184
185
template <class T>
186
static
187
inline void qt_memrotate90_template(const T *src, int srcWidth, int srcHeight, int srcStride,
188
                                    T *dest, int dstStride)
189
0
{
190
0
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
191
    // packed algorithm assumes little endian and that sizeof(quint32)/sizeof(T) is an integer
192
0
    static_assert(sizeof(quint32) % sizeof(T) == 0);
193
0
    qt_memrotate90_tiled<T>(src, srcWidth, srcHeight, srcStride, dest, dstStride);
194
#else
195
    qt_memrotate90_tiled_unpacked<T>(src, srcWidth, srcHeight, srcStride, dest, dstStride);
196
#endif
197
0
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate90_template<unsigned short>(unsigned short const*, int, int, int, unsigned short*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate90_template<unsigned char>(unsigned char const*, int, int, int, unsigned char*, int)
198
199
template<class T>
200
static inline void qt_memrotate180_template(const T *src, int w, int h, int isstride, T *dest, int idstride)
201
0
{
202
0
    const qsizetype sstride = isstride;
203
0
    const qsizetype dstride = idstride;
204
205
0
    const char *s = (const char*)(src) + (h - 1) * sstride;
206
0
    for (int dy = 0; dy < h; ++dy) {
207
0
        T *d = reinterpret_cast<T*>((char *)(dest) + dy * dstride);
208
0
        src = reinterpret_cast<const T*>(s);
209
0
        for (int dx = 0; dx < w; ++dx) {
210
0
            d[dx] = src[w - 1 - dx];
211
0
        }
212
0
        s -= sstride;
213
0
    }
214
0
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate180_template<QRgbaFloat<float> >(QRgbaFloat<float> const*, int, int, int, QRgbaFloat<float>*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate180_template<unsigned long long>(unsigned long long const*, int, int, int, unsigned long long*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate180_template<unsigned int>(unsigned int const*, int, int, int, unsigned int*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate180_template<quint24>(quint24 const*, int, int, int, quint24*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate180_template<unsigned short>(unsigned short const*, int, int, int, unsigned short*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate180_template<unsigned char>(unsigned char const*, int, int, int, unsigned char*, int)
215
216
template <class T>
217
static
218
inline void qt_memrotate270_template(const T *src, int srcWidth, int srcHeight, int srcStride,
219
                                     T *dest, int dstStride)
220
0
{
221
0
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
222
    // packed algorithm assumes little endian and that sizeof(quint32)/sizeof(T) is an integer
223
0
    static_assert(sizeof(quint32) % sizeof(T) == 0);
224
0
    qt_memrotate270_tiled<T>(src, srcWidth, srcHeight, srcStride, dest, dstStride);
225
#else
226
    qt_memrotate270_tiled_unpacked<T>(src, srcWidth, srcHeight, srcStride, dest, dstStride);
227
#endif
228
0
}
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate270_template<unsigned short>(unsigned short const*, int, int, int, unsigned short*, int)
Unexecuted instantiation: qmemrotate.cpp:void qt_memrotate270_template<unsigned char>(unsigned char const*, int, int, int, unsigned char*, int)
229
230
#define QT_IMPL_MEMROTATE(type)                                     \
231
Q_GUI_EXPORT void qt_memrotate90(const type *src, int w, int h, int sstride, \
232
0
                                 type *dest, int dstride)           \
233
0
{                                                                   \
234
0
    qt_memrotate90_template(src, w, h, sstride, dest, dstride);     \
235
0
}                                                                   \
Unexecuted instantiation: qt_memrotate90(unsigned short const*, int, int, int, unsigned short*, int)
Unexecuted instantiation: qt_memrotate90(unsigned char const*, int, int, int, unsigned char*, int)
236
Q_GUI_EXPORT void qt_memrotate180(const type *src, int w, int h, int sstride, \
237
0
                                  type *dest, int dstride)          \
238
0
{                                                                   \
239
0
    qt_memrotate180_template(src, w, h, sstride, dest, dstride);    \
240
0
}                                                                   \
Unexecuted instantiation: qt_memrotate180(unsigned short const*, int, int, int, unsigned short*, int)
Unexecuted instantiation: qt_memrotate180(unsigned char const*, int, int, int, unsigned char*, int)
241
Q_GUI_EXPORT void qt_memrotate270(const type *src, int w, int h, int sstride, \
242
0
                                  type *dest, int dstride)          \
243
0
{                                                                   \
244
0
    qt_memrotate270_template(src, w, h, sstride, dest, dstride);    \
245
0
}
Unexecuted instantiation: qt_memrotate270(unsigned short const*, int, int, int, unsigned short*, int)
Unexecuted instantiation: qt_memrotate270(unsigned char const*, int, int, int, unsigned char*, int)
246
247
#define QT_IMPL_SIMPLE_MEMROTATE(type)                              \
248
Q_GUI_EXPORT void qt_memrotate90(const type *src, int w, int h, int sstride,  \
249
7
                                 type *dest, int dstride)           \
250
7
{                                                                   \
251
7
    qt_memrotate90_tiled_unpacked(src, w, h, sstride, dest, dstride); \
252
7
}                                                                   \
Unexecuted instantiation: qt_memrotate90(QRgbaFloat<float> const*, int, int, int, QRgbaFloat<float>*, int)
Unexecuted instantiation: qt_memrotate90(unsigned long long const*, int, int, int, unsigned long long*, int)
qt_memrotate90(unsigned int const*, int, int, int, unsigned int*, int)
Line
Count
Source
249
7
                                 type *dest, int dstride)           \
250
7
{                                                                   \
251
7
    qt_memrotate90_tiled_unpacked(src, w, h, sstride, dest, dstride); \
252
7
}                                                                   \
Unexecuted instantiation: qt_memrotate90(quint24 const*, int, int, int, quint24*, int)
253
Q_GUI_EXPORT void qt_memrotate180(const type *src, int w, int h, int sstride, \
254
0
                                  type *dest, int dstride)          \
255
0
{                                                                   \
256
0
    qt_memrotate180_template(src, w, h, sstride, dest, dstride);    \
257
0
}                                                                   \
Unexecuted instantiation: qt_memrotate180(QRgbaFloat<float> const*, int, int, int, QRgbaFloat<float>*, int)
Unexecuted instantiation: qt_memrotate180(unsigned long long const*, int, int, int, unsigned long long*, int)
Unexecuted instantiation: qt_memrotate180(unsigned int const*, int, int, int, unsigned int*, int)
Unexecuted instantiation: qt_memrotate180(quint24 const*, int, int, int, quint24*, int)
258
Q_GUI_EXPORT void qt_memrotate270(const type *src, int w, int h, int sstride, \
259
13
                                  type *dest, int dstride)          \
260
13
{                                                                   \
261
13
    qt_memrotate270_tiled_unpacked(src, w, h, sstride, dest, dstride); \
262
13
}
Unexecuted instantiation: qt_memrotate270(QRgbaFloat<float> const*, int, int, int, QRgbaFloat<float>*, int)
Unexecuted instantiation: qt_memrotate270(unsigned long long const*, int, int, int, unsigned long long*, int)
qt_memrotate270(unsigned int const*, int, int, int, unsigned int*, int)
Line
Count
Source
259
13
                                  type *dest, int dstride)          \
260
13
{                                                                   \
261
13
    qt_memrotate270_tiled_unpacked(src, w, h, sstride, dest, dstride); \
262
13
}
Unexecuted instantiation: qt_memrotate270(quint24 const*, int, int, int, quint24*, int)
263
264
QT_IMPL_SIMPLE_MEMROTATE(QRgbaFloat32)
265
QT_IMPL_SIMPLE_MEMROTATE(quint64)
266
QT_IMPL_SIMPLE_MEMROTATE(quint32)
267
QT_IMPL_SIMPLE_MEMROTATE(quint24)
268
QT_IMPL_MEMROTATE(quint16)
269
QT_IMPL_MEMROTATE(quint8)
270
271
void qt_memrotate90_8(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
272
0
{
273
0
    qt_memrotate90(srcPixels, w, h, sbpl, destPixels, dbpl);
274
0
}
275
276
void qt_memrotate180_8(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
277
0
{
278
0
    qt_memrotate180(srcPixels, w, h, sbpl, destPixels, dbpl);
279
0
}
280
281
void qt_memrotate270_8(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
282
0
{
283
0
    qt_memrotate270(srcPixels, w, h, sbpl, destPixels, dbpl);
284
0
}
285
286
void qt_memrotate90_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
287
0
{
288
0
    qt_memrotate90((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
289
0
}
290
291
void qt_memrotate180_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
292
0
{
293
0
    qt_memrotate180((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
294
0
}
295
296
void qt_memrotate270_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
297
0
{
298
0
    qt_memrotate270((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
299
0
}
300
301
void qt_memrotate90_24(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
302
0
{
303
0
    qt_memrotate90((const quint24 *)srcPixels, w, h, sbpl, (quint24 *)destPixels, dbpl);
304
0
}
305
306
void qt_memrotate180_24(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
307
0
{
308
0
    qt_memrotate180((const quint24 *)srcPixels, w, h, sbpl, (quint24 *)destPixels, dbpl);
309
0
}
310
311
void qt_memrotate270_24(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
312
0
{
313
0
    qt_memrotate270((const quint24 *)srcPixels, w, h, sbpl, (quint24 *)destPixels, dbpl);
314
0
}
315
316
void qt_memrotate90_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
317
7
{
318
7
    qt_memrotate90((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
319
7
}
320
321
void qt_memrotate180_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
322
0
{
323
0
    qt_memrotate180((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
324
0
}
325
326
void qt_memrotate270_32(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
327
13
{
328
13
    qt_memrotate270((const uint *)srcPixels, w, h, sbpl, (uint *)destPixels, dbpl);
329
13
}
330
331
332
void qt_memrotate90_64(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
333
0
{
334
0
    qt_memrotate90((const quint64 *)srcPixels, w, h, sbpl, (quint64 *)destPixels, dbpl);
335
0
}
336
337
void qt_memrotate180_64(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
338
0
{
339
0
    qt_memrotate180((const quint64 *)srcPixels, w, h, sbpl, (quint64 *)destPixels, dbpl);
340
0
}
341
342
void qt_memrotate270_64(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
343
0
{
344
0
    qt_memrotate270((const quint64 *)srcPixels, w, h, sbpl, (quint64 *)destPixels, dbpl);
345
0
}
346
347
void qt_memrotate90_128(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
348
0
{
349
0
    qt_memrotate90((const QRgbaFloat32 *)srcPixels, w, h, sbpl, (QRgbaFloat32 *)destPixels, dbpl);
350
0
}
351
352
void qt_memrotate180_128(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
353
0
{
354
0
    qt_memrotate180((const QRgbaFloat32 *)srcPixels, w, h, sbpl, (QRgbaFloat32 *)destPixels, dbpl);
355
0
}
356
357
void qt_memrotate270_128(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
358
0
{
359
0
    qt_memrotate270((const QRgbaFloat32 *)srcPixels, w, h, sbpl, (QRgbaFloat32 *)destPixels, dbpl);
360
0
}
361
362
MemRotateFunc qMemRotateFunctions[QPixelLayout::BPPCount][3] =
363
// 90, 180, 270
364
{
365
    { nullptr, nullptr, nullptr },      // BPPNone,
366
    { nullptr, nullptr, nullptr },      // BPP1MSB,
367
    { nullptr, nullptr, nullptr },      // BPP1LSB,
368
    { qt_memrotate90_8, qt_memrotate180_8, qt_memrotate270_8 },         // BPP8,
369
    { qt_memrotate90_16, qt_memrotate180_16, qt_memrotate270_16 },      // BPP16,
370
    { qt_memrotate90_24, qt_memrotate180_24, qt_memrotate270_24 },      // BPP24
371
    { qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 },      // BPP32
372
    { qt_memrotate90_64, qt_memrotate180_64, qt_memrotate270_64 },      // BPP64
373
    { qt_memrotate90_64, qt_memrotate180_64, qt_memrotate270_64 },      // BPP16FPx4
374
    { qt_memrotate90_128, qt_memrotate180_128, qt_memrotate270_128 },   // BPP32FPx4
375
};
376
377
QT_END_NAMESPACE