You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.6KB

  1. /*
  2. * This file is part of MPlayer.
  3. *
  4. * MPlayer is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * MPlayer is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with MPlayer; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. */
  18. #ifndef MPLAYER_CPUDETECT_H
  19. #define MPLAYER_CPUDETECT_H
  20. #define CPUTYPE_I386 3
  21. #define CPUTYPE_I486 4
  22. #define CPUTYPE_I586 5
  23. #define CPUTYPE_I686 6
  24. #include "libavutil/x86_cpu.h"
  25. typedef struct cpucaps_s {
  26. int cpuType;
  27. int cpuModel;
  28. int cpuStepping;
  29. int hasMMX;
  30. int hasMMX2;
  31. int has3DNow;
  32. int has3DNowExt;
  33. int hasSSE;
  34. int hasSSE2;
  35. int hasSSE3;
  36. int hasSSSE3;
  37. int hasSSE4;
  38. int hasSSE42;
  39. int hasSSE4a;
  40. int hasAVX;
  41. int isX86;
  42. unsigned cl_size; /* size of cache line */
  43. int hasAltiVec;
  44. int hasTSC;
  45. } CpuCaps;
  46. extern CpuCaps ff_gCpuCaps;
  47. void ff_do_cpuid(unsigned int ax, unsigned int *p);
  48. void ff_GetCpuCaps(CpuCaps *caps);
  49. /* returned value is malloc()'ed so free() it after use */
  50. char *ff_GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]);
  51. #endif /* MPLAYER_CPUDETECT_H */