19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: xvid.c,v 1.75 2008-11-26 01:04:34 Isibaar Exp $ |
* $Id: xvid.c,v 1.79 2008-11-30 16:36:44 Isibaar Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
661 |
return XVID_ERR_VERSION; |
return XVID_ERR_VERSION; |
662 |
|
|
663 |
info->actual_version = XVID_VERSION; |
info->actual_version = XVID_VERSION; |
664 |
info->build = "xvid-1.2.0-dev"; |
info->build = "xvid-1.3.0-dev"; |
665 |
info->cpu_flags = detect_cpu_flags(); |
info->cpu_flags = detect_cpu_flags(); |
666 |
info->num_threads = 0; |
info->num_threads = 0; |
667 |
|
|
668 |
#if defined(_WIN32) |
#if defined(_WIN32) |
669 |
|
|
670 |
{ |
{ |
671 |
DWORD dwProcessAffinityMask, dwSystemAffinityMask; |
SYSTEM_INFO siSysInfo; |
672 |
if (GetProcessAffinityMask(GetCurrentProcess(), (PDWORD_PTR) &dwProcessAffinityMask, (PDWORD_PTR) &dwSystemAffinityMask)) { |
GetSystemInfo(&siSysInfo); |
673 |
int i; |
info->num_threads = siSysInfo.dwNumberOfProcessors; /* number of _logical_ cores */ |
|
for(i=0; i<32; i++) { |
|
|
if ((dwProcessAffinityMask & (1<<i))) |
|
|
info->num_threads++; |
|
|
} |
|
|
} |
|
674 |
} |
} |
675 |
|
|
676 |
#else |
#else |
677 |
|
|
678 |
#include <unistd.h> |
#include <unistd.h> |