summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper_sse4.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add unvectorized fallback in case FP exceptions are not maskedAllan Sandfeld Jensen2019-05-101-0/+18
| | | | | | | | | | If an application enables FP exceptions our FP-based unpremul will raise the INVALID exception. Since disabling them locally might be slow just take a slow path when detected. Fixes: QTBUG-75592 Change-Id: Ie22a032a4f62229f68ad21ede359c62291adc9bf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix change-of-sign warnings in ICC 19Thiago Macieira2019-01-231-1/+1
| | | | | | | error #68: integer conversion resulted in a change of sign Change-Id: I4ac1156702324f0fb814fffd156f80962df6b4a7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Implement support for 16bpc image formatsAllan Sandfeld Jensen2018-08-111-0/+14
| | | | | | | | | | | | | | Adds support for 16bit per color image formats in QImage. This makes it possible to read and write 16bpc PNGs, and take full advantage of the 16bpc paint engine. [ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with 16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL formats. Task-number: QTBUG-45858 Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Optimize unpremultiply using SSE rcpAllan Sandfeld Jensen2018-05-231-8/+182
| | | | | Change-Id: I255031d354b0fde7abe8366ea2c86a35f9f24afd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reapply SSE4 acceleration to ARGB32->ARGB32PM conversionAllan Sandfeld Jensen2018-05-201-2/+16
| | | | | | | | | After the merger of fetch and convert, we were missing the hook to the accelerated merged version of ARGB32->ARGB32PM conversion, causing a minor performance regression. Change-Id: I3965d1a95f2305306005db09640f2775aa645d2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of argb32->argb32pm routines in qimageAllan Sandfeld Jensen2018-05-071-0/+8
| | | | | | | | We already have better optimized versions in drawhelper. Removing these versions is a performance gain. Change-Id: I431c74e440529648d9bc5e22c0e700a72d376934 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Merge drawhelper convert-from and storeAllan Sandfeld Jensen2018-05-021-28/+24
| | | | | | | Avoids using an intermediate buffer on store and simplifies the code. Change-Id: I2dc4e735eb770f90dc99fe0f513b4df3b35ee793 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Manually vectorize ARGB32toARGB32PM for SSE4.1 and NEONAllan Sandfeld Jensen2017-01-311-2/+53
| | | | | | | | | | | | Manually vectorizing is significantly faster because we can optimize for common cases like long stretches of opaque or transparent pixels. This is both smaller and faster than the auto-vectorized version, it is also much faster than the autovectorized version for AVX2 which then can be removed. Change-Id: I0fa80ce273a8387cc6cd084879822ad9bade385c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cleanup conversion parametersAllan Sandfeld Jensen2016-04-111-8/+8
| | | | | | | | Removes the now unused QPixelLayout parameter, simplifies the colorTable passing and prepares for adding dithering. Change-Id: Iaf7698b248b857804d8921bf118e7cfabbabff87 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix premul conversion from ARGB32 to A2RGB30 formats.Allan Sandfeld Jensen2015-06-031-0/+16
| | | | | | | | | When a premultiplied alpha changes value because it is rounded to fewer bits the premultiplied colors may need to be recalculated with the new value. Otherwise the color will both be wrong and potentially invalid. Change-Id: I9ec74a22aac73cd7ffab04e180cf2bf35bb4c315 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Revert "Remove separate SSE4 unpremultiply function"Allan Sandfeld Jensen2015-04-231-3/+4
| | | | | | | | | | | Could causedSSE4 instructions to be used on non SSE4 machines in cases when qUnpremultiplywas not inlined. This reverts commit 964ccc58534aac436529007000d1c38d76c88834. Change-Id: Ic676ade8f75129e8d37c4d96cbfb2bdb5b794919 Task-number: QTBUG-45741 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove separate SSE4 unpremultiply functionAllan Sandfeld Jensen2015-04-161-4/+3
| | | | | | | | | | | Merges the SSE4 specific unpremultiply with the normal version, and adds a SSE2 fallback. There was no reason to split the two since compile time options will ensure the right version is inlined. Also adds short-cut for 0 and 255 values. Change-Id: Ie5aa262f6964219fd3062d4a498f697cf79a4595 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add AVX2 autovectorized versions of premultiplyAllan Sandfeld Jensen2015-03-101-0/+79
Following up on using GCC's autovectorizing for faster SSE4.1 premultiply, this patch adds specialized autovectorized versions of premultiply for AVX2, giving another almost doubling in speed. To make the speed up for AVX2 and also SSE4_1 available to non-GCC compilers, the target-specific methods have been moved to separate files. Change-Id: I97ce05be67f4adeeb9a096eef80fd5fb662099f3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>