[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.58, Thu Dec 9 23:02:54 2004 UTC revision 1.63, Mon May 23 12:06:02 2005 UTC
# Line 51  Line 51 
51  unsigned int xvid_debug = 0; /* xvid debug mask */  unsigned int xvid_debug = 0; /* xvid debug mask */
52  #endif  #endif
53    
54  #if defined(ARCH_IS_IA32) && defined(_MSC_VER)  #if (defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64)) && defined(_MSC_VER)
55  #       include <windows.h>  #       include <windows.h>
56  #elif defined(ARCH_IS_IA32) || defined(ARCH_IS_PPC)  #elif defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64) || defined(ARCH_IS_PPC)
57  #       include <signal.h>  #       include <signal.h>
58  #       include <setjmp.h>  #       include <setjmp.h>
59    
# Line 76  Line 76 
76   *   0 : SIGILL was *not* signalled   *   0 : SIGILL was *not* signalled
77   *   1 : SIGILL was signalled   *   1 : SIGILL was signalled
78   */   */
79  #if defined(ARCH_IS_IA32) && defined(_MSC_VER)  #if (defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64)) && defined(_MSC_VER)
80  static int  static int
81  sigill_check(void (*func)())  sigill_check(void (*func)())
82  {  {
# Line 89  Line 89 
89          }          }
90          return(0);          return(0);
91  }  }
92  #elif defined(ARCH_IS_IA32) || defined(ARCH_IS_PPC)  #elif defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64) || defined(ARCH_IS_PPC)
93  static int  static int
94  sigill_check(void (*func)())  sigill_check(void (*func)())
95  {  {
# Line 131  Line 131 
131          /* enable native assembly optimizations by default */          /* enable native assembly optimizations by default */
132          unsigned int cpu_flags = XVID_CPU_ASM;          unsigned int cpu_flags = XVID_CPU_ASM;
133    
134  #if defined(ARCH_IS_IA32)  #if defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64)
135          cpu_flags |= check_cpu_features();          cpu_flags |= check_cpu_features();
136          if ((cpu_flags & XVID_CPU_SSE) && sigill_check(sse_os_trigger))          if ((cpu_flags & XVID_CPU_SSE) && sigill_check(sse_os_trigger))
137                  cpu_flags &= ~XVID_CPU_SSE;                  cpu_flags &= ~XVID_CPU_SSE;
# Line 210  Line 210 
210          transfer_8to16sub  = transfer_8to16sub_c;          transfer_8to16sub  = transfer_8to16sub_c;
211          transfer_8to16subro  = transfer_8to16subro_c;          transfer_8to16subro  = transfer_8to16subro_c;
212          transfer_8to16sub2 = transfer_8to16sub2_c;          transfer_8to16sub2 = transfer_8to16sub2_c;
213            transfer_8to16sub2ro = transfer_8to16sub2ro_c;
214          transfer_16to8add  = transfer_16to8add_c;          transfer_16to8add  = transfer_16to8add_c;
215          transfer8x8_copy   = transfer8x8_copy_c;          transfer8x8_copy   = transfer8x8_copy_c;
216    
# Line 429  Line 430 
430    
431                  /* Buffer transfer */                  /* Buffer transfer */
432                  transfer_8to16sub2 = transfer_8to16sub2_xmm;                  transfer_8to16sub2 = transfer_8to16sub2_xmm;
433                    transfer_8to16sub2ro = transfer_8to16sub2ro_xmm;
434    
435                  /* Colorspace transformation */                  /* Colorspace transformation */
436                  yv12_to_yv12  = yv12_to_yv12_xmm;                  yv12_to_yv12  = yv12_to_yv12_xmm;
# Line 507  Line 509 
509                  sad16    = sad16_sse2;                  sad16    = sad16_sse2;
510                  dev16    = dev16_sse2;                  dev16    = dev16_sse2;
511    
512                  /* DCT operators                  /* DCT operators */
                  * no iDCT because it's not "Walken matching" */  
513                  fdct = fdct_sse2_skal;                  fdct = fdct_sse2_skal;
514                    /* idct = idct_sse2_skal; */   /* Is now IEEE1180 and Walken compliant. Disabled until fully tested. */
515    
516                  /* postprocessing */                  /* postprocessing */
517                  image_brightness = image_brightness_sse2;                  image_brightness = image_brightness_sse2;
# Line 595  Line 597 
597            dequant_h263_intra = dequant_h263_intra_altivec_c;            dequant_h263_intra = dequant_h263_intra_altivec_c;
598            dequant_h263_inter = dequant_h263_inter_altivec_c;            dequant_h263_inter = dequant_h263_inter_altivec_c;
599    
600                      dequant_mpeg_intra = dequant_mpeg_intra_altivec_c;
601                      dequant_mpeg_inter = dequant_mpeg_inter_altivec_c;
602    
603                    /* Qpel stuff */                    /* Qpel stuff */
604                    xvid_QP_Funcs = &xvid_QP_Funcs_Altivec_C;                    xvid_QP_Funcs = &xvid_QP_Funcs_Altivec_C;
605                    xvid_QP_Add_Funcs = &xvid_QP_Add_Funcs_Altivec_C;                    xvid_QP_Add_Funcs = &xvid_QP_Add_Funcs_Altivec_C;
606          }          }
607  #endif  #endif
608    
609    #if defined(ARCH_IS_X86_64)
610            /* For now, only XVID_CPU_ASM is looked for, so user can still
611             * disable asm usage the usual way. When Intel EMT64 cpus will
612             * be out, maybe we'll have to check more precisely what cpu
613             * features there really are. */
614            if (cpu_flags & XVID_CPU_ASM) {
615                    /* SIMD state flusher */
616                    emms = emms_3dn;
617    
618                    /* DCT operators */
619                    fdct = fdct_skal_x86_64;
620                    idct = idct_x86_64;
621    
622                    /* SAD operators */
623                    sad16      = sad16_x86_64;
624                    sad8       = sad8_x86_64;
625                    sad16bi    = sad16bi_x86_64;
626                    sad8bi     = sad8bi_x86_64;
627                    dev16      = dev16_x86_64;
628                    sad16v     = sad16v_x86_64;
629                    sse8_16bit = sse8_16bit_x86_64;
630                    sse8_8bit  = sse8_8bit_x86_64;
631    
632                    /* Interpolation operators */
633                    interpolate8x8_halfpel_h  = interpolate8x8_halfpel_h_x86_64;
634                    interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_x86_64;
635                    interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_x86_64;
636    
637                    interpolate8x8_halfpel_add = interpolate8x8_halfpel_add_x86_64;
638                    interpolate8x8_halfpel_h_add = interpolate8x8_halfpel_h_add_x86_64;
639                    interpolate8x8_halfpel_v_add = interpolate8x8_halfpel_v_add_x86_64;
640                    interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_x86_64;
641    
642                    interpolate8x8_6tap_lowpass_h = interpolate8x8_6tap_lowpass_h_x86_64;
643                    interpolate8x8_6tap_lowpass_v = interpolate8x8_6tap_lowpass_v_x86_64;
644    
645                    interpolate8x8_avg2 = interpolate8x8_avg2_x86_64;
646                    interpolate8x8_avg4 = interpolate8x8_avg4_x86_64;
647    
648                    /* Quantization related functions */
649                    quant_h263_intra   = quant_h263_intra_x86_64;
650                    quant_h263_inter   = quant_h263_inter_x86_64;
651                    dequant_h263_intra = dequant_h263_intra_x86_64;
652                    dequant_h263_inter = dequant_h263_inter_x86_64;
653                    quant_mpeg_intra   = quant_mpeg_intra_x86_64;
654                    quant_mpeg_inter   = quant_mpeg_inter_x86_64;
655                    dequant_mpeg_intra   = dequant_mpeg_intra_x86_64;
656                    dequant_mpeg_inter   = dequant_mpeg_inter_x86_64;
657    
658                    /* Block related functions */
659                    transfer_8to16copy  = transfer_8to16copy_x86_64;
660                    transfer_16to8copy  = transfer_16to8copy_x86_64;
661                    transfer_8to16sub   = transfer_8to16sub_x86_64;
662                    transfer_8to16subro = transfer_8to16subro_x86_64;
663                    transfer_8to16sub2  = transfer_8to16sub2_x86_64;
664                    transfer_8to16sub2ro= transfer_8to16sub2ro_x86_64;
665                    transfer_16to8add   = transfer_16to8add_x86_64;
666                    transfer8x8_copy    = transfer8x8_copy_x86_64;
667    
668                    /* Qpel stuff */
669                    xvid_QP_Funcs = &xvid_QP_Funcs_x86_64;
670                    xvid_QP_Add_Funcs = &xvid_QP_Add_Funcs_x86_64;
671    
672                    /* Interlacing Functions */
673                    MBFieldTest = MBFieldTest_x86_64;
674            }
675    #endif
676    
677  #if defined(_DEBUG)  #if defined(_DEBUG)
678      xvid_debug = init->debug;      xvid_debug = init->debug;
679  #endif  #endif
# Line 616  Line 689 
689                  return XVID_ERR_VERSION;                  return XVID_ERR_VERSION;
690    
691          info->actual_version = XVID_VERSION;          info->actual_version = XVID_VERSION;
692          info->build = "xvid-1.1-cvshead";          info->build = "xvid-1.1.0-beta2";
693          info->cpu_flags = detect_cpu_flags();          info->cpu_flags = detect_cpu_flags();
694    
695  #if defined(_SMP) && defined(WIN32)  #if defined(_SMP) && defined(WIN32)

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.63

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