summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qjpeghandler.cpp
diff options
context:
space:
mode:
authorAdrian Perez de Castro <aperez@igalia.com>2013-01-18 19:36:54 +0200
committerThiago Macieira <thiago.macieira@intel.com>2014-06-27 08:26:49 +0200
commit416c112aea592e41a66d65a21a885f31d9a566d0 (patch)
tree0375db3fc4f39e92c401aff0b6ca1c470c3cb350 /src/gui/image/qjpeghandler.cpp
parentea6352109b6b73e72b578534fe6d1c90767a22a3 (diff)
MIPS: Support recognition of the DSP ASE at run-time
Add detection of MIPS DSPr2 at run-time in qsimd.cpp. This makes it possible to have generic Qt builds for MIPS that can enable the fast code paths for processors with the DSP ASE at run-time. Also, this makes it possible to manually disable them by setting the environment variable "QT_NO_CPU_FEATURE=dspr2". Last, but not least, functions requiring DSPr2 are not enabled when running in CPUs with version-1 DSP. Change-Id: Ia5a01d84119553c22ab83386c74a6cb8ba5fee53 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/image/qjpeghandler.cpp')
-rw-r--r--src/gui/image/qjpeghandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index dfacf34097..c1d3ff9a85 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -876,7 +876,9 @@ QJpegHandler::QJpegHandler()
}
#endif // QT_COMPILER_SUPPORTS_SSSE3
#if defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2)
- rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_mips_dspr2_asm;
+ if (qCpuHasFeature(DSPR2)) {
+ rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_mips_dspr2_asm;
+ }
#endif // QT_COMPILER_SUPPORTS_DSPR2
}