[cvs] / xvidcore / src / xvid.c Repository:
ViewVC logotype

Diff of /xvidcore/src/xvid.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.75, Wed Nov 26 01:04:34 2008 UTC revision 1.80, Mon Dec 1 15:06:48 2008 UTC
# Line 28  Line 28 
28  #include <string.h>  #include <string.h>
29  #include <time.h>  #include <time.h>
30    
31    #if !defined(_WIN32)
32    #include <unistd.h>
33    #endif
34    
35  #include "xvid.h"  #include "xvid.h"
36  #include "decoder.h"  #include "decoder.h"
37  #include "encoder.h"  #include "encoder.h"
# Line 661  Line 665 
665                  return XVID_ERR_VERSION;                  return XVID_ERR_VERSION;
666    
667          info->actual_version = XVID_VERSION;          info->actual_version = XVID_VERSION;
668          info->build = "xvid-1.2.0-dev";          info->build = "xvid-1.3.0-dev";
669          info->cpu_flags = detect_cpu_flags();          info->cpu_flags = detect_cpu_flags();
670    info->num_threads = 0;    info->num_threads = 0;
671    
672  #if defined(_WIN32)  #if defined(_WIN32)
673    
674    {    {
675      DWORD dwProcessAffinityMask, dwSystemAffinityMask;          SYSTEM_INFO siSysInfo;
676      if (GetProcessAffinityMask(GetCurrentProcess(), (PDWORD_PTR) &dwProcessAffinityMask, (PDWORD_PTR) &dwSystemAffinityMask)) {          GetSystemInfo(&siSysInfo);
677        int i;          info->num_threads = siSysInfo.dwNumberOfProcessors; /* number of _logical_ cores */
       for(i=0; i<32; i++) {  
         if ((dwProcessAffinityMask & (1<<i)))  
           info->num_threads++;  
       }  
     }  
678    }    }
679    
680  #else  #else
681    
   #include <unistd.h>  
682    info->num_threads = sysconf(_SC_NPROCESSORS_CONF);    info->num_threads = sysconf(_SC_NPROCESSORS_CONF);
683    
684  #endif  #endif

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.80

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4