44 #include <private/qpaintengine_raster_p.h> 45 #include <private/qblendfunctions_p.h> 47 #ifdef QT_HAVE_ARM_SIMD 49 #if defined(Q_OS_SYMBIAN) 50 #if !defined(__SWITCH_TO_ARM) 53 #define __SWITCH_TO_ARM asm("push {r0} ");\ 54 asm("add r0, pc, #4 ");\ 59 asm("ldr r0, [sp], #4 ") 60 #define __END_ARM asm(".code 16 ") 62 #define __SWITCH_TO_ARM asm(".code 32 "); 66 #define __SWITCH_TO_ARM 68 #endif //__MARM_THUMB__ 72 #if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) 73 __asm
void qt_blend_argb32_on_argb32_arm_simd(
uchar *destPixels,
int dbpl,
74 const uchar *srcPixels,
int sbpl,
84 stmfd sp!, {r4-r12, r14}
130 uxtb r11, r11, ror #24
143 uxtb16 r6, r9, ror #8
144 mla r10, r11, r10, r14
146 uxtab16 r10, r10, r10, ror #8
147 uxtab16 r9, r9, r9, ror #8
149 uxtab16 r10, r9, r10, ror #8
160 bgt argb32_next_pixel
173 beq argb32_blend_exit
175 ; const_alpha = (const_alpha * 255) >> 8;
180 argb32constalpha_next_row
184 argb32constalpha_next_pixel
190 uxtb16 r6, r9, ror #8
191 mla r10, r11, r10, r14
193 uxtab16 r10, r10, r10, ror #8
194 uxtab16 r9, r9, r9, ror #8
196 uxtab16 r8, r9, r10, ror #8
202 uxtb16 r6, r9, ror #8
208 mla r10, r9, r10, r14
210 uxtab16 r10, r10, r10, ror #8
211 uxtab16 r9, r9, r9, ror #8
213 uxtab16 r10, r9, r10, ror #8
220 bgt argb32constalpha_next_pixel
226 bgt argb32constalpha_next_row
231 ldmfd sp!, {r4-r12, lr}
237 void qt_blend_rgb32_on_rgb32_arm_simd(
uchar *destPixels,
int dbpl,
238 const uchar *srcPixels,
int sbpl,
242 if (const_alpha != 256) {
243 qt_blend_argb32_on_argb32_arm_simd(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
247 const uint *src = (
const uint *) srcPixels;
250 for (
int y=0; y<h; ++y) {
257 for (
int y=0; y<h; ++y) {
258 memcpy(dst, src, len);
265 #else // defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) 270 void qt_blend_argb32_on_argb32_arm_simd(
uchar *destPixels,
int dbpl,
271 const uchar *srcPixels,
int sbpl,
275 const uint *src = (
const uint *) srcPixels;
277 if (const_alpha == 256) {
278 for (
int y=0; y<h; ++y) {
279 for (
int x=0; x<w; ++x) {
289 }
else if (const_alpha != 0) {
290 const_alpha = (const_alpha * 255) >> 8;
291 for (
int y=0; y<h; ++y) {
292 for (
int x=0; x<w; ++x) {
302 void qt_blend_rgb32_on_rgb32_arm_simd(
uchar *destPixels,
int dbpl,
303 const uchar *srcPixels,
int sbpl,
307 if (const_alpha != 256) {
308 qt_blend_argb32_on_argb32_arm_simd(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
312 const uint *src = (
const uint *) srcPixels;
315 for (
int y=0; y<h; ++y) {
322 for (
int y=0; y<h; ++y) {
323 memcpy(dst, src, len);
332 #endif // QT_HAVE_ARMV_SIMD
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a)
static int cmp(const ushort *s1, const ushort *s2, size_t len)
void qt_memconvert(DST *dest, const SRC *src, int count)