summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-04 09:00:05 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-04 09:00:05 (GMT)
commitc1bac607f3f3889d367e20c128acf30dc9537ddc (patch)
treee57d847c0a24a6b5e129eb7d58e671f5c075b3c4
parentf47200c7eb91c3709f88647c9472786038f15478 (diff)
parent2a671ee511a62fe04d53e9994b99e2cf8d525cb9 (diff)
downloadQt-c1bac607f3f3889d367e20c128acf30dc9537ddc.zip
Qt-c1bac607f3f3889d367e20c128acf30dc9537ddc.tar.gz
Qt-c1bac607f3f3889d367e20c128acf30dc9537ddc.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Add the qt_ prefix to convert_rgb888_to_rgb32_ssse3 Update changes-4.7.0 Use the fast conversion from RGB888 to RGB32 for Jpeg images Move the SIMD defines to the common declaration of Qt symbols Fixed: QT_DEPRECATED_WARNINGS defines QT3_SUPPORT
-rw-r--r--dist/changes-4.7.03
-rw-r--r--mkspecs/features/qt.prf13
-rw-r--r--src/corelib/corelib.pro37
-rw-r--r--src/corelib/global/qglobal.h6
-rw-r--r--src/gui/gui.pro11
-rw-r--r--src/gui/image/qimage_ssse3.cpp5
-rw-r--r--src/gui/image/qjpeghandler.cpp29
7 files changed, 48 insertions, 56 deletions
diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0
index 518d362..790aabc 100644
--- a/dist/changes-4.7.0
+++ b/dist/changes-4.7.0
@@ -474,6 +474,9 @@ QtCore:
ABIs, but it also allowed for unaligned access. Qt never generates
or uses unaligned access and the new EABI aligns as expected, so
the flag was removed.
+ - QTextBoundaryFinder is now consistent with ICU when it comes to
+ line breaking, reporting the index of the boundary at which the line
+ break should occur rather than the index of the character.
QtNetwork:
- Qt does no longer provide its own CA bundle, but uses system APIs for
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index e8946de..aa0f06e 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -209,3 +209,16 @@ wince*:static:gui {
mac {
!isEmpty(QT_NAMESPACE_MAC_CRC):DEFINES *= QT_NAMESPACE_MAC_CRC=$$QT_NAMESPACE_MAC_CRC
}
+
+#SIMD defines:
+neon: DEFINES += QT_HAVE_NEON
+mmx:DEFINES += QT_HAVE_MMX
+3dnow:DEFINES += QT_HAVE_3DNOW
+sse:DEFINES += QT_HAVE_SSE QT_HAVE_MMXEXT
+sse2:DEFINES += QT_HAVE_SSE2
+sse3:DEFINES += QT_HAVE_SSE3
+ssse3:DEFINES += QT_HAVE_SSSE3
+sse4_1:DEFINES += QT_HAVE_SSE4_1
+sse4_2:DEFINES += QT_HAVE_SSE4_2
+avx:DEFINES += QT_HAVE_AVX
+iwmmxt:DEFINES += QT_HAVE_IWMMXT
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index bbf445f..bc8ef9f 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -53,39 +53,6 @@ symbian: {
DEPLOYMENT = partial_upgrade $$DEPLOYMENT
}
-mmx {
- DEFINES += QT_HAVE_MMX
-}
-3dnow {
- DEFINES += QT_HAVE_3DNOW
-}
-sse {
- DEFINES += QT_HAVE_SSE
- DEFINES += QT_HAVE_MMXEXT
-}
-sse2 {
- DEFINES += QT_HAVE_SSE2
-}
-sse3 {
- DEFINES += QT_HAVE_SSE3
-}
-ssse3 {
- DEFINES += QT_HAVE_SSSE3
-}
-sse4_1 {
- DEFINES += QT_HAVE_SSE4_1
-}
-sse4_2 {
- DEFINES += QT_HAVE_SSE4_2
-}
-avx {
- DEFINES += QT_HAVE_AVX
-}
-iwmmxt {
- DEFINES += QT_HAVE_IWMMXT
-}
-neon {
- DEFINES += QT_HAVE_NEON
- QMAKE_CXXFLAGS *= -mfpu=neon
-}
+neon: QMAKE_CXXFLAGS *= -mfpu=neon
+
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 7b915cd..8f27b03 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -981,9 +981,11 @@ redefine to built-in booleans to make autotests work properly */
# undef QT_DEPRECATED_VARIABLE
# undef QT_DEPRECATED_CONSTRUCTOR
#elif defined(QT_DEPRECATED_WARNINGS)
+# ifdef QT3_SUPPORT
/* enable Qt3 support warnings as well */
-# undef QT3_SUPPORT_WARNINGS
-# define QT3_SUPPORT_WARNINGS
+# undef QT3_SUPPORT_WARNINGS
+# define QT3_SUPPORT_WARNINGS
+# endif
# undef QT_DEPRECATED
# define QT_DEPRECATED Q_DECL_DEPRECATED
# undef QT_DEPRECATED_VARIABLE
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 1b43ef2..28440cc 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -80,17 +80,6 @@ symbian {
contains(QMAKE_MAC_XARCH, no) {
DEFINES += QT_NO_MAC_XARCH
} else {
- mmx:DEFINES += QT_HAVE_MMX
- 3dnow:DEFINES += QT_HAVE_3DNOW
- sse:DEFINES += QT_HAVE_SSE QT_HAVE_MMXEXT
- sse2:DEFINES += QT_HAVE_SSE2
- sse3:DEFINES += QT_HAVE_SSE3
- ssse3:DEFINES += QT_HAVE_SSSE3
- sse4_1:DEFINES += QT_HAVE_SSE4_1
- sse4_2:DEFINES += QT_HAVE_SSE4_2
- avx:DEFINES += QT_HAVE_AVX
- iwmmxt:DEFINES += QT_HAVE_IWMMXT
-
win32-g++*|!win32:!*-icc* {
mmx {
mmx_compiler.commands = $$QMAKE_CXX -c -Winline
diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp
index 1c664f2..9aed011 100644
--- a/src/gui/image/qimage_ssse3.cpp
+++ b/src/gui/image/qimage_ssse3.cpp
@@ -45,13 +45,12 @@
#ifdef QT_HAVE_SSSE3
-#include <stdio.h>
QT_BEGIN_NAMESPACE
// Convert a scanline of RGB888 (src) to RGB32 (dst)
// src must be at least len * 3 bytes
// dst must be at least len * 4 bytes
-inline void convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len)
+Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len)
{
quint32 *const end = dst + len;
@@ -139,7 +138,7 @@ void convert_RGB888_to_RGB32_ssse3(QImageData *dest, const QImageData *src, Qt::
quint32 *dest_data = (quint32 *) dest->data;
for (int i = 0; i < src->height; ++i) {
- convert_rgb888_to_rgb32_ssse3(dest_data, src_data, src->width);
+ qt_convert_rgb888_to_rgb32_ssse3(dest_data, src_data, src->width);
src_data += src->bytes_per_line;
dest_data = (quint32 *)((uchar*)dest_data + dest->bytes_per_line);
}
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index 972dd65..d358a5e 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -45,6 +45,7 @@
#include <qvariant.h>
#include <qvector.h>
#include <qbuffer.h>
+#include <private/qsimd_p.h>
#include <stdio.h> // jpeglib needs this to be pre-included
#include <setjmp.h>
@@ -75,6 +76,19 @@ extern "C" {
QT_BEGIN_NAMESPACE
+void QT_FASTCALL convert_rgb888_to_rgb32_C(quint32 *dst, const uchar *src, int len)
+{
+ // Expand 24->32 bpp.
+ for (int i = 0; i < len; ++i) {
+ *dst++ = qRgb(src[0], src[1], src[2]);
+ src += 3;
+ }
+}
+
+typedef void (QT_FASTCALL *Rgb888ToRgb32Converter)(quint32 *dst, const uchar *src, int len);
+
+static Rgb888ToRgb32Converter rgb888ToRgb32ConverterPtr = convert_rgb888_to_rgb32_C;
+
struct my_error_mgr : public jpeg_error_mgr {
jmp_buf setjmp_buffer;
};
@@ -393,13 +407,9 @@ static bool read_jpeg_image(QImage *outImage,
continue; // Haven't reached the starting line yet.
if (info->output_components == 3) {
- // Expand 24->32 bpp.
uchar *in = rows[0] + clip.x() * 3;
QRgb *out = (QRgb*)outImage->scanLine(y);
- for (int i = 0; i < clip.width(); ++i) {
- *out++ = qRgb(in[0], in[1], in[2]);
- in += 3;
- }
+ rgb888ToRgb32ConverterPtr(out, in, clip.width());
} else if (info->out_color_space == JCS_CMYK) {
// Convert CMYK->RGB.
uchar *in = rows[0] + clip.x() * 4;
@@ -793,6 +803,15 @@ bool QJpegHandlerPrivate::read(QImage *image)
QJpegHandler::QJpegHandler()
: d(new QJpegHandlerPrivate(this))
{
+#if defined(QT_HAVE_SSSE3)
+ const uint features = qDetectCPUFeatures();
+
+ // from qimage_ssse3.cpp
+ Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len);
+
+ if (features & SSSE3)
+ rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_ssse3;
+#endif // QT_HAVE_SSSE3
}
QJpegHandler::~QJpegHandler()