[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.45.2.16, Tue Oct 7 13:02:35 2003 UTC revision 1.48.2.2, Sun Apr 11 11:19:57 2004 UTC
# Line 46  Line 46 
46  #include "utils/timer.h"  #include "utils/timer.h"
47  #include "bitstream/mbcoding.h"  #include "bitstream/mbcoding.h"
48  #include "image/qpel.h"  #include "image/qpel.h"
49    #include "image/postprocessing.h"
50    
51  #if defined(_DEBUG)  #if defined(_DEBUG)
52  unsigned int xvid_debug = 0; /* xvid debug mask */  unsigned int xvid_debug = 0; /* xvid debug mask */
# Line 247  Line 248 
248          bgra_to_yv12    = bgra_to_yv12_c;          bgra_to_yv12    = bgra_to_yv12_c;
249          abgr_to_yv12    = abgr_to_yv12_c;          abgr_to_yv12    = abgr_to_yv12_c;
250          rgba_to_yv12    = rgba_to_yv12_c;          rgba_to_yv12    = rgba_to_yv12_c;
251            argb_to_yv12    = argb_to_yv12_c;
252          yuyv_to_yv12    = yuyv_to_yv12_c;          yuyv_to_yv12    = yuyv_to_yv12_c;
253          uyvy_to_yv12    = uyvy_to_yv12_c;          uyvy_to_yv12    = uyvy_to_yv12_c;
254    
# Line 256  Line 258 
258          bgrai_to_yv12   = bgrai_to_yv12_c;          bgrai_to_yv12   = bgrai_to_yv12_c;
259          abgri_to_yv12   = abgri_to_yv12_c;          abgri_to_yv12   = abgri_to_yv12_c;
260          rgbai_to_yv12   = rgbai_to_yv12_c;          rgbai_to_yv12   = rgbai_to_yv12_c;
261            argbi_to_yv12   = argbi_to_yv12_c;
262          yuyvi_to_yv12   = yuyvi_to_yv12_c;          yuyvi_to_yv12   = yuyvi_to_yv12_c;
263          uyvyi_to_yv12   = uyvyi_to_yv12_c;          uyvyi_to_yv12   = uyvyi_to_yv12_c;
264    
   
265          /* All colorspace transformation functions YV12->User format */          /* All colorspace transformation functions YV12->User format */
266          yv12_to_rgb555  = yv12_to_rgb555_c;          yv12_to_rgb555  = yv12_to_rgb555_c;
267          yv12_to_rgb565  = yv12_to_rgb565_c;          yv12_to_rgb565  = yv12_to_rgb565_c;
# Line 267  Line 269 
269          yv12_to_bgra    = yv12_to_bgra_c;          yv12_to_bgra    = yv12_to_bgra_c;
270          yv12_to_abgr    = yv12_to_abgr_c;          yv12_to_abgr    = yv12_to_abgr_c;
271          yv12_to_rgba    = yv12_to_rgba_c;          yv12_to_rgba    = yv12_to_rgba_c;
272            yv12_to_argb    = yv12_to_argb_c;
273          yv12_to_yuyv    = yv12_to_yuyv_c;          yv12_to_yuyv    = yv12_to_yuyv_c;
274          yv12_to_uyvy    = yv12_to_uyvy_c;          yv12_to_uyvy    = yv12_to_uyvy_c;
275    
# Line 276  Line 279 
279          yv12_to_bgrai   = yv12_to_bgrai_c;          yv12_to_bgrai   = yv12_to_bgrai_c;
280          yv12_to_abgri   = yv12_to_abgri_c;          yv12_to_abgri   = yv12_to_abgri_c;
281          yv12_to_rgbai   = yv12_to_rgbai_c;          yv12_to_rgbai   = yv12_to_rgbai_c;
282            yv12_to_argbi   = yv12_to_argbi_c;
283          yv12_to_yuyvi   = yv12_to_yuyvi_c;          yv12_to_yuyvi   = yv12_to_yuyvi_c;
284          yv12_to_uyvyi   = yv12_to_uyvyi_c;          yv12_to_uyvyi   = yv12_to_uyvyi_c;
285    
# Line 287  Line 291 
291          sad8bi   = sad8bi_c;          sad8bi   = sad8bi_c;
292          dev16    = dev16_c;          dev16    = dev16_c;
293          sad16v   = sad16v_c;          sad16v   = sad16v_c;
294            sse8_16bit = sse8_16bit_c;
 /*      Halfpel8_Refine = Halfpel8_Refine_c; */  
295    
296  #if defined(ARCH_IS_IA32)  #if defined(ARCH_IS_IA32)
297    
# Line 308  Line 311 
311          if ((cpu_flags & XVID_CPU_MMX)) {          if ((cpu_flags & XVID_CPU_MMX)) {
312    
313                  /* Forward and Inverse Discrete Cosine Transformation functions */                  /* Forward and Inverse Discrete Cosine Transformation functions */
314                  fdct = fdct_mmx;                  fdct = fdct_mmx_skal;
315                  idct = idct_mmx;                  idct = idct_mmx;
316    
317                  /* Qpel stuff */                  /* Qpel stuff */
# Line 380  Line 383 
383                  sad8bi  = sad8bi_mmx;                  sad8bi  = sad8bi_mmx;
384                  dev16    = dev16_mmx;                  dev16    = dev16_mmx;
385                  sad16v   = sad16v_mmx;                  sad16v   = sad16v_mmx;
386                    sse8_16bit = sse8_16bit_mmx;
387          }          }
388    
389          /* these 3dnow functions are faster than mmx, but slower than xmm. */          /* these 3dnow functions are faster than mmx, but slower than xmm. */
# Line 398  Line 402 
402    
403          if ((cpu_flags & XVID_CPU_MMXEXT)) {          if ((cpu_flags & XVID_CPU_MMXEXT)) {
404    
405                  /* Inverse DCT */                  /* DCT */
406                    fdct = fdct_xmm_skal;
407                  idct = idct_xmm;                  idct = idct_xmm;
408    
409                  /* Interpolation */                  /* Interpolation */
# Line 444  Line 449 
449    
450          if ((cpu_flags & XVID_CPU_3DNOWEXT)) {          if ((cpu_flags & XVID_CPU_3DNOWEXT)) {
451    
                 /* Inverse DCT */  
                 idct =  idct_3dne;  
   
452                  /* Buffer transfer */                  /* Buffer transfer */
453                  transfer_8to16copy =  transfer_8to16copy_3dne;                  transfer_8to16copy =  transfer_8to16copy_3dne;
454                  transfer_16to8copy = transfer_16to8copy_3dne;                  transfer_16to8copy = transfer_16to8copy_3dne;
455                  transfer_8to16sub =  transfer_8to16sub_3dne;                  transfer_8to16sub =  transfer_8to16sub_3dne;
456                  transfer_8to16subro =  transfer_8to16subro_3dne;                  transfer_8to16subro =  transfer_8to16subro_3dne;
                 transfer_8to16sub2 =  transfer_8to16sub2_3dne;  
457                  transfer_16to8add = transfer_16to8add_3dne;                  transfer_16to8add = transfer_16to8add_3dne;
458                  transfer8x8_copy = transfer8x8_copy_3dne;                  transfer8x8_copy = transfer8x8_copy_3dne;
459    
460                    if ((cpu_flags & XVID_CPU_MMXEXT)) {
461                            /* Inverse DCT */
462                            idct =  idct_3dne;
463    
464                            /* Buffer transfer */
465                            transfer_8to16sub2 =  transfer_8to16sub2_3dne;
466    
467                            /* Interpolation */
468                            interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_3dne;
469                            interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_3dne;
470                            interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_3dne;
471    
472                  /* Quantization */                  /* Quantization */
473                  quant_h263_intra = quant_h263_intra_3dne;                          quant_h263_intra = quant_h263_intra_3dne;               // cmov only
474                  quant_h263_inter = quant_h263_inter_3dne;                  quant_h263_inter = quant_h263_inter_3dne;
475                  dequant_mpeg_intra = dequant_mpeg_intra_3dne;                          dequant_mpeg_intra = dequant_mpeg_intra_3dne;   // cmov only
476                  dequant_mpeg_inter = dequant_mpeg_inter_3dne;                  dequant_mpeg_inter = dequant_mpeg_inter_3dne;
477                  dequant_h263_intra = dequant_h263_intra_3dne;                  dequant_h263_intra = dequant_h263_intra_3dne;
478                  dequant_h263_inter = dequant_h263_inter_3dne;                  dequant_h263_inter = dequant_h263_inter_3dne;
479    
480                  /* ME functions */                  /* ME functions */
481                  calc_cbp = calc_cbp_3dne;                  calc_cbp = calc_cbp_3dne;
482    
483                  sad16 = sad16_3dne;                  sad16 = sad16_3dne;
484                  sad8 = sad8_3dne;                  sad8 = sad8_3dne;
485                  sad16bi = sad16bi_3dne;                  sad16bi = sad16bi_3dne;
486                  sad8bi = sad8bi_3dne;                  sad8bi = sad8bi_3dne;
487                  dev16 = dev16_3dne;                  dev16 = dev16_3dne;
488                    }
                 /* Interpolation */  
                 interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_3dne;  
                 interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_3dne;  
                 interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_3dne;  
489          }          }
490    
 #if defined(EXPERIMENTAL_SSE2_CODE) /* mark the whole SSE2 stuff as experimental. At least on  
                                                                            my P4, it crashes... */  
491          if ((cpu_flags & XVID_CPU_SSE2)) {          if ((cpu_flags & XVID_CPU_SSE2)) {
492    
493                  calc_cbp = calc_cbp_sse2;                  calc_cbp = calc_cbp_sse2;
# Line 490  Line 498 
498                  dequant_h263_intra = dequant_h263_intra_sse2;                  dequant_h263_intra = dequant_h263_intra_sse2;
499                  dequant_h263_inter = dequant_h263_inter_sse2;                  dequant_h263_inter = dequant_h263_inter_sse2;
500    
501                  /* ME; slower than xmm */                  /* SAD operators */
502                  sad16    = sad16_sse2;                  sad16    = sad16_sse2;
503                  dev16    = dev16_sse2;                  dev16    = dev16_sse2;
504                  /* Forward and Inverse DCT */  
505  #if 0 /* Both function are known to be unprecise, better keep them deactivated */                  /* DCT operators
506                  idct  = idct_sse2;                   * no iDCT because it's not "Walken matching" */
507                  fdct = fdct_sse2;                  fdct = fdct_sse2_skal;
 #endif  
508          }          }
509  #endif  #endif /* ARCH_IS_IA32 */
 #endif  
510    
511  #if defined(ARCH_IS_IA64)  #if defined(ARCH_IS_IA64)
512          if ((cpu_flags & XVID_CPU_ASM)) { /* use assembler routines? */          if ((cpu_flags & XVID_CPU_ASM)) { /* use assembler routines? */
# Line 561  Line 567 
567                  return XVID_ERR_VERSION;                  return XVID_ERR_VERSION;
568    
569          info->actual_version = XVID_VERSION;          info->actual_version = XVID_VERSION;
570          info->build = "dev-api-4";          info->build = "xvid-1.0.0";
571          info->cpu_flags = detect_cpu_flags();          info->cpu_flags = detect_cpu_flags();
572    
573  #if defined(_SMP) && defined(WIN32)  #if defined(_SMP) && defined(WIN32)

Legend:
Removed from v.1.45.2.16  
changed lines
  Added in v.1.48.2.2

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