summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage_avx.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2011-12-28 17:22:34 -0200
committerQt by Nokia <qt-info@nokia.com>2012-05-22 20:56:38 +0200
commit9b94570fdf085e4979b139a6f8ea3f9bab5a36a7 (patch)
tree1e3c82bb7dac5f6e8c82f9262da6120f8956423b /src/gui/image/qimage_avx.cpp
parent018cb899d482967eb7d8ebdc48cadf1743abe680 (diff)
Add AVX support for the painting and image code.
There are no new routines, this is just the old SSE2 and SSSE3 code compiled in AVX mode, meaning the instructions use the VEX prefix. Change-Id: I79a8bfaf6b30a050618db899f5a3bbc220449f0b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/image/qimage_avx.cpp')
-rw-r--r--src/gui/image/qimage_avx.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/gui/image/qimage_avx.cpp b/src/gui/image/qimage_avx.cpp
new file mode 100644
index 0000000000..f112a46d96
--- /dev/null
+++ b/src/gui/image/qimage_avx.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Intel Corporation
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <private/qsimd_p.h>
+
+#ifdef QT_HAVE_AVX
+
+#ifndef __AVX__
+#error "AVX not enabled in this file, cannot proceed"
+#endif
+
+#define convert_ARGB_to_ARGB_PM_inplace_sse2 convert_ARGB_to_ARGB_PM_inplace_avx
+#include "qimage_sse2.cpp"
+
+#define qt_convert_rgb888_to_rgb32_ssse3 qt_convert_rgb888_to_rgb32_avx
+#define convert_RGB888_to_RGB32_ssse3 convert_RGB888_to_RGB32_avx
+#include "qimage_ssse3.cpp"
+
+#endif