[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 1675, Mon Jan 9 00:39:43 2006 UTC revision 1762, Sat Nov 11 22:06:44 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.67 2006-01-09 00:39:43 Isibaar Exp $   * $Id: xvid.c,v 1.71 2006-11-11 22:06:44 chl 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 256  Line 257 
257          yv12_to_yv12    = yv12_to_yv12_c;          yv12_to_yv12    = yv12_to_yv12_c;
258          rgb555_to_yv12  = rgb555_to_yv12_c;          rgb555_to_yv12  = rgb555_to_yv12_c;
259          rgb565_to_yv12  = rgb565_to_yv12_c;          rgb565_to_yv12  = rgb565_to_yv12_c;
260            rgb_to_yv12     = rgb_to_yv12_c;
261          bgr_to_yv12     = bgr_to_yv12_c;          bgr_to_yv12     = bgr_to_yv12_c;
262          bgra_to_yv12    = bgra_to_yv12_c;          bgra_to_yv12    = bgra_to_yv12_c;
263          abgr_to_yv12    = abgr_to_yv12_c;          abgr_to_yv12    = abgr_to_yv12_c;
# Line 277  Line 279 
279          /* All colorspace transformation functions YV12->User format */          /* All colorspace transformation functions YV12->User format */
280          yv12_to_rgb555  = yv12_to_rgb555_c;          yv12_to_rgb555  = yv12_to_rgb555_c;
281          yv12_to_rgb565  = yv12_to_rgb565_c;          yv12_to_rgb565  = yv12_to_rgb565_c;
282            yv12_to_rgb     = yv12_to_rgb_c;
283          yv12_to_bgr     = yv12_to_bgr_c;          yv12_to_bgr     = yv12_to_bgr_c;
284          yv12_to_bgra    = yv12_to_bgra_c;          yv12_to_bgra    = yv12_to_bgra_c;
285          yv12_to_abgr    = yv12_to_abgr_c;          yv12_to_abgr    = yv12_to_abgr_c;
# Line 306  Line 309 
309          sse8_16bit = sse8_16bit_c;          sse8_16bit = sse8_16bit_c;
310          sse8_8bit  = sse8_8bit_c;          sse8_8bit  = sse8_8bit_c;
311    
312            init_GMC(cpu_flags);
313    
314  #if defined(ARCH_IS_IA32)  #if defined(ARCH_IS_IA32)
315    
316          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 441 
441                  interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_xmm;                  interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_xmm;
442    
443                  /* Quantization */                  /* Quantization */
                 quant_mpeg_intra = quant_mpeg_intra_xmm;  
444                  quant_mpeg_inter = quant_mpeg_inter_xmm;                  quant_mpeg_inter = quant_mpeg_inter_xmm;
445    
446                  dequant_h263_intra = dequant_h263_intra_xmm;                  dequant_h263_intra = dequant_h263_intra_xmm;
# Line 673  Line 677 
677                  quant_h263_inter   = quant_h263_inter_x86_64;                  quant_h263_inter   = quant_h263_inter_x86_64;
678                  dequant_h263_intra = dequant_h263_intra_x86_64;                  dequant_h263_intra = dequant_h263_intra_x86_64;
679                  dequant_h263_inter = dequant_h263_inter_x86_64;                  dequant_h263_inter = dequant_h263_inter_x86_64;
680                  quant_mpeg_intra   = quant_mpeg_intra_x86_64;                  /*quant_mpeg_intra   = quant_mpeg_intra_x86_64; fix me! */
681                  quant_mpeg_inter   = quant_mpeg_inter_x86_64;                  quant_mpeg_inter   = quant_mpeg_inter_x86_64;
682                  dequant_mpeg_intra   = dequant_mpeg_intra_x86_64;                  dequant_mpeg_intra   = dequant_mpeg_intra_x86_64;
683                  dequant_mpeg_inter   = dequant_mpeg_inter_x86_64;                  dequant_mpeg_inter   = dequant_mpeg_inter_x86_64;
# Line 714  Line 718 
718          info->actual_version = XVID_VERSION;          info->actual_version = XVID_VERSION;
719          info->build = "xvid-1.2.0-dev";          info->build = "xvid-1.2.0-dev";
720          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  
721          info->num_threads = 0;          info->num_threads = 0;
722    
723    #if defined(WIN32)
724      {
725        DWORD dwProcessAffinityMask, dwSystemAffinityMask;
726        if (GetProcessAffinityMask(GetCurrentProcess(), &dwProcessAffinityMask, &dwSystemAffinityMask)) {
727          int i;
728          for(i=0; i<32; i++) {
729            if ((dwProcessAffinityMask & (1<<i)))
730              info->num_threads++;
731          }
732        }
733      }
734  #endif  #endif
735    
736          return 0;          return 0;

Legend:
Removed from v.1675  
changed lines
  Added in v.1762

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