Mercurial > mplayer.hg
annotate cpudetect.h @ 32963:ce00479b68ce
Cosmetic: Format to MPlayer coding style.
Additionally: sort prototype declarations, remove useless comment at top of
file, add comment to include file, group and sort includes, move assignment
outside condition, group statements by adding or removing new lines to ease
reading and remove needless parentheses and braces.
author | ib |
---|---|
date | Tue, 08 Mar 2011 12:29:44 +0000 |
parents | f3aed7bffcbb |
children | 064be070d8c8 |
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 |
31077 | 24 #define CPUTYPE_I386 3 |
25 #define CPUTYPE_I486 4 | |
26 #define CPUTYPE_I586 5 | |
2281 | 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 { |
31077 | 32 int cpuType; |
33 int cpuModel; | |
34 int cpuStepping; | |
35 int hasMMX; | |
36 int hasMMX2; | |
37 int has3DNow; | |
38 int has3DNowExt; | |
39 int hasSSE; | |
40 int hasSSE2; | |
41 int hasSSE3; | |
42 int hasSSSE3; | |
43 int hasSSE4a; | |
44 int isX86; | |
45 unsigned cl_size; /* size of cache line */ | |
46 int hasAltiVec; | |
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 |
31826
f3aed7bffcbb
Reuse do_cpuid from cpudetect.c in loader/win32.c.
reimar
parents:
31077
diff
changeset
|
52 void do_cpuid(unsigned int ax, unsigned int *p); |
f3aed7bffcbb
Reuse do_cpuid from cpudetect.c in loader/win32.c.
reimar
parents:
31077
diff
changeset
|
53 |
2301 | 54 void GetCpuCaps(CpuCaps *caps); |
2303 | 55 |
56 /* returned value is malloc()'ed so free() it after use */ | |
2301 | 57 char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]); |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
58 |
26029 | 59 #endif /* MPLAYER_CPUDETECT_H */ |