Mercurial > mplayer.hg
annotate cpudetect.h @ 30754:dff9ee89b7c1
Move stream_read_line implementation from stream.h to stream.c,
it is not speed critical and the function call overhead is not
relevant for its overall speed anyway.
author | reimar |
---|---|
date | Sun, 28 Feb 2010 13:54:55 +0000 |
parents | c1a3f1bbba26 |
children | dd7f15a3fb1b |
rev | line source |
---|---|
30429
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
1 /* |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
2 * This file is part of MPlayer. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
3 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
7 * (at your option) any later version. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
8 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
12 * GNU General Public License for more details. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
13 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
17 */ |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
18 |
26029 | 19 #ifndef MPLAYER_CPUDETECT_H |
20 #define MPLAYER_CPUDETECT_H | |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
21 |
28629
b089d639e810
Add necessary header for ARCH_X86_64 preprocessor check.
diego
parents:
28288
diff
changeset
|
22 #include "config.h" |
b089d639e810
Add necessary header for ARCH_X86_64 preprocessor check.
diego
parents:
28288
diff
changeset
|
23 |
2281 | 24 #define CPUTYPE_I386 3 |
25 #define CPUTYPE_I486 4 | |
26 #define CPUTYPE_I586 5 | |
27 #define CPUTYPE_I686 6 | |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
28 |
29039
ce682f8d1f68
Directly include libavutil/x86_cpu.h in cpudetect.h instead of duplicating it
reimar
parents:
28901
diff
changeset
|
29 #include "libavutil/x86_cpu.h" |
13720
821f464b4d90
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
aurel
parents:
10885
diff
changeset
|
30 |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
31 typedef struct cpucaps_s { |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
32 int cpuType; |
18538
739849dfb699
Retrieve CPU built-in namestring, and if it exists, print it during cpu detection; t it doesn't exist, fallback to the cpu table. Patch by Zuxy Meng
gpoirier
parents:
18391
diff
changeset
|
33 int cpuModel; |
3403 | 34 int cpuStepping; |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
35 int hasMMX; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
36 int hasMMX2; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
37 int has3DNow; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
38 int has3DNowExt; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
39 int hasSSE; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
40 int hasSSE2; |
28901
e1b7d9bf263b
SSE3 support patch by Zhou Zongyi, zhouzongyi pset.suntec net
diego
parents:
28629
diff
changeset
|
41 int hasSSE3; |
27926
a02c39208d49
Add detection of x86 CPU features SSSE3 and SSE4a.
gpoirier
parents:
26029
diff
changeset
|
42 int hasSSSE3; |
a02c39208d49
Add detection of x86 CPU features SSSE3 and SSE4a.
gpoirier
parents:
26029
diff
changeset
|
43 int hasSSE4a; |
3146
3164eaa93396
non x86 fix (otherwise we would need #ifdef ARCH_X86 around every if(gCpuCaps.has...))
michael
parents:
2303
diff
changeset
|
44 int isX86; |
8860 | 45 unsigned cl_size; /* size of cache line */ |
9003 | 46 int hasAltiVec; |
10885
685c416f12b5
cpuspeed detection for X86 TSC capable CPUs (also added TSC detection, should best be verified by some people with TSC/nonTSC capable CPUs)
atmos4
parents:
9003
diff
changeset
|
47 int hasTSC; |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
48 } CpuCaps; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
49 |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
50 extern CpuCaps gCpuCaps; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
51 |
2301 | 52 void GetCpuCaps(CpuCaps *caps); |
2303 | 53 |
54 /* returned value is malloc()'ed so free() it after use */ | |
2301 | 55 char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]); |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
56 |
26029 | 57 #endif /* MPLAYER_CPUDETECT_H */ |