forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qmake: better way to detect sse2 sse4.1 for qt4/5
- Loading branch information
Showing
8 changed files
with
108 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,34 @@ | ||
SOURCES = sse4_1.cpp | ||
#SSE4_1_SOURCES = sse4_1.cpp | ||
CONFIG -= qt dylib release debug_and_release | ||
CONFIG += debug console | ||
#qt5 only has gcc, qcc, vc, linux icc. clang? | ||
win32-icc: QMAKE_CFLAGS_SSE4_1 *= -arch:SSE4.1 | ||
CONFIG += debug console sse4_1 | ||
|
||
# for Qt4. we can only detect sse2 in Qt4 | ||
#qt5 only has gcc, qcc, vc, linux icc. | ||
win32-icc { | ||
QMAKE_CFLAGS_SSE4_1 = -arch:SSE4.1 | ||
} else:*-icc { #mac, linux | ||
QMAKE_CFLAGS_SSE4_1 = -xSSE4.1 | ||
} else:*msvc* { | ||
QMAKE_CFLAGS_SSE4_1 = -arch:SSE2 | ||
} else { | ||
QMAKE_CFLAGS_SSE4_1 = -msse4.1 | ||
} | ||
|
||
sse4_1 { | ||
HEADERS += $$SSE4_1_HEADERS | ||
|
||
sse4_1_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS) | ||
!contains(QT_CPU_FEATURES, sse4_1):sse4_1_compiler.commands += $$QMAKE_CFLAGS_SSE4_1 | ||
sse4_1_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} | ||
sse4_1_compiler.dependency_type = TYPE_C | ||
sse4_1_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} | ||
sse4_1_compiler.input = SSE4_1_SOURCES | ||
sse4_1_compiler.variable_out = OBJECTS | ||
sse4_1_compiler.name = compiling[sse4_1] ${QMAKE_FILE_IN} | ||
silent:sse4_1_compiler.commands = @echo compiling[sse4_1] ${QMAKE_FILE_IN} && $$sse4_1_compiler.commands | ||
QMAKE_EXTRA_COMPILERS += sse4_1_compiler | ||
} | ||
|
||
isEmpty(QMAKE_CFLAGS_SSE4_1):error("This compiler does not support SSE4.1") | ||
else:QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE4_1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2012-2014 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 2.1 of the License, or (at your option) any later version. | ||
This library is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public | ||
License along with this library; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
******************************************************************************/ | ||
|
||
#include "GPUMemCopy.h" | ||
|
||
#include <stdlib.h> | ||
|
@@ -13,7 +34,6 @@ | |
#include <smmintrin.h> //stream load | ||
#endif | ||
|
||
|
||
/* Branch prediction */ | ||
#ifdef __GNUC__ | ||
# define likely(p) __builtin_expect(!!(p), 1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2012-2014 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 2.1 of the License, or (at your option) any later version. | ||
This library is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public | ||
License along with this library; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
******************************************************************************/ | ||
|
||
#ifndef GPUMemCopy_H | ||
#define GPUMemCopy_H | ||
|
||
|
@@ -9,7 +30,6 @@ class GPUMemCopy | |
{ | ||
public: | ||
static bool isAvailable(); | ||
|
||
GPUMemCopy(); | ||
~GPUMemCopy(); | ||
|
||
|