annotate cpudetect.h @ 29039:ce682f8d1f68

Directly include libavutil/x86_cpu.h in cpudetect.h instead of duplicating it incompletely.
author reimar
date Fri, 27 Mar 2009 20:33:13 +0000
parents e1b7d9bf263b
children c1a3f1bbba26
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25530
diff changeset
1 #ifndef MPLAYER_CPUDETECT_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25530
diff changeset
2 #define MPLAYER_CPUDETECT_H
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
3
28629
b089d639e810 Add necessary header for ARCH_X86_64 preprocessor check.
diego
parents: 28288
diff changeset
4 #include "config.h"
b089d639e810 Add necessary header for ARCH_X86_64 preprocessor check.
diego
parents: 28288
diff changeset
5
2281
arpi
parents: 2280
diff changeset
6 #define CPUTYPE_I386 3
arpi
parents: 2280
diff changeset
7 #define CPUTYPE_I486 4
arpi
parents: 2280
diff changeset
8 #define CPUTYPE_I586 5
arpi
parents: 2280
diff changeset
9 #define CPUTYPE_I686 6
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
10
29039
ce682f8d1f68 Directly include libavutil/x86_cpu.h in cpudetect.h instead of duplicating it
reimar
parents: 28901
diff changeset
11 #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
12
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
13 typedef struct cpucaps_s {
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
14 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
15 int cpuModel;
3403
c4ca766a2d05 added cpuStepping to CpuCaps struct (needed win32.c)
alex
parents: 3146
diff changeset
16 int cpuStepping;
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
17 int hasMMX;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
18 int hasMMX2;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
19 int has3DNow;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
20 int has3DNowExt;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
21 int hasSSE;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
22 int hasSSE2;
28901
e1b7d9bf263b SSE3 support patch by Zhou Zongyi, zhouzongyi pset.suntec net
diego
parents: 28629
diff changeset
23 int hasSSE3;
27926
a02c39208d49 Add detection of x86 CPU features SSSE3 and SSE4a.
gpoirier
parents: 26029
diff changeset
24 int hasSSSE3;
a02c39208d49 Add detection of x86 CPU features SSSE3 and SSE4a.
gpoirier
parents: 26029
diff changeset
25 int hasSSE4a;
3146
3164eaa93396 non x86 fix (otherwise we would need #ifdef ARCH_X86 around every if(gCpuCaps.has...))
michael
parents: 2303
diff changeset
26 int isX86;
8860
778989dba3a2 cpu cache line length detection
arpi
parents: 3403
diff changeset
27 unsigned cl_size; /* size of cache line */
9003
c428933c7e54 AltiVec detection code ("borrowed" from FFmpeg and
arpi
parents: 8860
diff changeset
28 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
29 int hasTSC;
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
30 } CpuCaps;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
31
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
32 extern CpuCaps gCpuCaps;
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
33
2301
b4c4c832cce7 Detect and show cpu name.
atmos4
parents: 2281
diff changeset
34 void GetCpuCaps(CpuCaps *caps);
2303
456e22bfb147 returns a malloc()'ed string instead of an auto char[]
pl
parents: 2301
diff changeset
35
456e22bfb147 returns a malloc()'ed string instead of an auto char[]
pl
parents: 2301
diff changeset
36 /* returned value is malloc()'ed so free() it after use */
2301
b4c4c832cce7 Detect and show cpu name.
atmos4
parents: 2281
diff changeset
37 char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]);
2268
72ff2179d396 cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff changeset
38
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25530
diff changeset
39 #endif /* MPLAYER_CPUDETECT_H */