[svn] / branches / release-1_3-branch / xvidcore / src / xvid.c Repository:
ViewVC logotype

Diff of /branches/release-1_3-branch/xvidcore/src/xvid.c

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

revision 1821, Fri Nov 28 18:16:42 2008 UTC revision 1827, Sun Nov 30 16:38:31 2008 UTC
# Line 19  Line 19 
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.78 2008-11-28 18:16:42 Isibaar Exp $   * $Id: xvid.c,v 1.79 2008-11-30 16:36:44 Isibaar Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 666  Line 666 
666    info->num_threads = 0;    info->num_threads = 0;
667    
668  #if defined(_WIN32)  #if defined(_WIN32)
669    
670    {    {
     DWORD dwProcessAffinityMask, dwSystemAffinityMask;  
     if (GetProcessAffinityMask(GetCurrentProcess(), (PDWORD_PTR) &dwProcessAffinityMask, (PDWORD_PTR) &dwSystemAffinityMask)) {  
       int i;  
       for(i=0; i<32; i++) {  
         if ((dwProcessAffinityMask & (1<<i)))  
           info->num_threads++;  
       }  
       if (info->num_threads == 0) {  
671          SYSTEM_INFO siSysInfo;          SYSTEM_INFO siSysInfo;
672          GetSystemInfo(&siSysInfo);          GetSystemInfo(&siSysInfo);
673          info->num_threads = siSysInfo.dwNumberOfProcessors; /* number of _logical_ cores */          info->num_threads = siSysInfo.dwNumberOfProcessors; /* number of _logical_ cores */
674        }        }
675      }  
   }  
676  #else  #else
677    
678    #include <unistd.h>    #include <unistd.h>

Legend:
Removed from v.1821  
changed lines
  Added in v.1827

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