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

Diff of /trunk/xvidcore/src/xvid.c

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

revision 1656, Tue Nov 22 10:53:10 2005 UTC revision 1713, Mon Jul 10 08:09:59 2006 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.66 2005-11-22 10:53:10 suxen_drol Exp $   * $Id: xvid.c,v 1.70 2006-07-10 08:09:59 syskin Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 40  Line 40 
40  #include "utils/mbfunctions.h"  #include "utils/mbfunctions.h"
41  #include "quant/quant.h"  #include "quant/quant.h"
42  #include "motion/motion.h"  #include "motion/motion.h"
43    #include "motion/gmc.h"
44  #include "motion/sad.h"  #include "motion/sad.h"
45  #include "utils/emms.h"  #include "utils/emms.h"
46  #include "utils/timer.h"  #include "utils/timer.h"
# Line 306  Line 307 
307          sse8_16bit = sse8_16bit_c;          sse8_16bit = sse8_16bit_c;
308          sse8_8bit  = sse8_8bit_c;          sse8_8bit  = sse8_8bit_c;
309    
310            init_GMC(cpu_flags);
311    
312  #if defined(ARCH_IS_IA32)  #if defined(ARCH_IS_IA32)
313    
314          if ((cpu_flags & XVID_CPU_MMX) || (cpu_flags & XVID_CPU_MMXEXT) ||          if ((cpu_flags & XVID_CPU_MMX) || (cpu_flags & XVID_CPU_MMXEXT) ||
# Line 436  Line 439 
439                  interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_xmm;                  interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_xmm;
440    
441                  /* Quantization */                  /* Quantization */
                 quant_mpeg_intra = quant_mpeg_intra_xmm;  
442                  quant_mpeg_inter = quant_mpeg_inter_xmm;                  quant_mpeg_inter = quant_mpeg_inter_xmm;
443    
444                  dequant_h263_intra = dequant_h263_intra_xmm;                  dequant_h263_intra = dequant_h263_intra_xmm;
# Line 636  Line 638 
638           * features there really are. */           * features there really are. */
639          if (cpu_flags & XVID_CPU_ASM) {          if (cpu_flags & XVID_CPU_ASM) {
640                  /* SIMD state flusher */                  /* SIMD state flusher */
641                  emms = emms_3dn;                  emms = emms_mmx;
642    
643                  /* DCT operators */                  /* DCT operators */
644                  fdct = fdct_skal_x86_64;                  fdct = fdct_skal_x86_64;
# Line 673  Line 675 
675                  quant_h263_inter   = quant_h263_inter_x86_64;                  quant_h263_inter   = quant_h263_inter_x86_64;
676                  dequant_h263_intra = dequant_h263_intra_x86_64;                  dequant_h263_intra = dequant_h263_intra_x86_64;
677                  dequant_h263_inter = dequant_h263_inter_x86_64;                  dequant_h263_inter = dequant_h263_inter_x86_64;
678                  quant_mpeg_intra   = quant_mpeg_intra_x86_64;                  /*quant_mpeg_intra   = quant_mpeg_intra_x86_64; fix me! */
679                  quant_mpeg_inter   = quant_mpeg_inter_x86_64;                  quant_mpeg_inter   = quant_mpeg_inter_x86_64;
680                  dequant_mpeg_intra   = dequant_mpeg_intra_x86_64;                  dequant_mpeg_intra   = dequant_mpeg_intra_x86_64;
681                  dequant_mpeg_inter   = dequant_mpeg_inter_x86_64;                  dequant_mpeg_inter   = dequant_mpeg_inter_x86_64;
# Line 714  Line 716 
716          info->actual_version = XVID_VERSION;          info->actual_version = XVID_VERSION;
717          info->build = "xvid-1.2.0-dev";          info->build = "xvid-1.2.0-dev";
718          info->cpu_flags = detect_cpu_flags();          info->cpu_flags = detect_cpu_flags();
   
 #if defined(_SMP) && defined(WIN32)  
         info->num_threads = pthread_num_processors_np();;  
 #else  
719          info->num_threads = 0;          info->num_threads = 0;
720    
721    #if defined(WIN32)
722      {
723        DWORD dwProcessAffinityMask, dwSystemAffinityMask;
724        if (GetProcessAffinityMask(GetCurrentProcess(), &dwProcessAffinityMask, &dwSystemAffinityMask)) {
725          int i;
726          for(i=0; i<32; i++) {
727            if ((dwProcessAffinityMask & (1<<i)))
728              info->num_threads++;
729          }
730        }
731      }
732  #endif  #endif
733    
734          return 0;          return 0;

Legend:
Removed from v.1656  
changed lines
  Added in v.1713

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