[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.1, Sat Feb 22 08:49:44 2003 UTC revision 1.45.2.7, Mon Jun 9 19:42:08 2003 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - Native API implementation  -   *  - Native API implementation  -
5   *   *
6     *  Copyright(C) 2001-2003 Peter Ross <pross@xvid.org>
7     *
8   *  This program is free software ; you can redistribute it and/or modify   *  This program is free software ; you can redistribute it and/or modify
9   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
10   *  the Free Software Foundation ; either version 2 of the License, or   *  the Free Software Foundation ; either version 2 of the License, or
# Line 45  Line 47 
47  #include "utils/timer.h"  #include "utils/timer.h"
48  #include "bitstream/mbcoding.h"  #include "bitstream/mbcoding.h"
49    
50    #if defined(_DEBUG)
51    unsigned int xvid_debug = 0; /* xvid debug mask */
52    #endif
53    
54  #if defined(ARCH_IS_IA32)  #if defined(ARCH_IS_IA32)
55    
56  #if defined(_MSC_VER)  #if defined(_MSC_VER)
# Line 282  Line 288 
288    
289  #if defined(ARCH_IS_IA32)  #if defined(ARCH_IS_IA32)
290    
291          if ((cpu_flags & XVID_CPU_ASM))          if ((cpu_flags & XVID_CPU_ASM)) {
         {  
292                  vfilter_31 = xvid_VFilter_31_x86;                  vfilter_31 = xvid_VFilter_31_x86;
293                  hfilter_31 = xvid_HFilter_31_x86;                  hfilter_31 = xvid_HFilter_31_x86;
294          }          }
# Line 300  Line 305 
305    
306                  /* Forward and Inverse Discrete Cosine Transformation functions */                  /* Forward and Inverse Discrete Cosine Transformation functions */
307                  fdct = fdct_mmx;                  fdct = fdct_mmx;
308                  idct = idct_mmx;                  idct = simple_idct_mmx;
309    
310                  /* Quantization related functions */                  /* Quantization related functions */
311                  quant_intra   = quant_intra_mmx;                  quant_intra   = quant_intra_mmx;
# Line 386  Line 391 
391          if ((cpu_flags & XVID_CPU_MMXEXT)) {          if ((cpu_flags & XVID_CPU_MMXEXT)) {
392    
393                  /* Inverse DCT */                  /* Inverse DCT */
394    #if 0 /* We don't use  Walken idct anymore! */
395                  idct = idct_xmm;                  idct = idct_xmm;
396    #endif
397    
398                  /* Interpolation */                  /* Interpolation */
399                  interpolate8x8_halfpel_h  = interpolate8x8_halfpel_h_xmm;                  interpolate8x8_halfpel_h  = interpolate8x8_halfpel_h_xmm;
# Line 432  Line 439 
439          if ((cpu_flags & XVID_CPU_3DNOWEXT)) {          if ((cpu_flags & XVID_CPU_3DNOWEXT)) {
440    
441                  /* Inverse DCT */                  /* Inverse DCT */
442    #if 0 /* We don't use  Walken idct anymore! */
443                  idct =  idct_3dne;                  idct =  idct_3dne;
444    #endif
445    
446                  /* Buffer transfer */                  /* Buffer transfer */
447                  transfer_8to16copy =  transfer_8to16copy_3dne;                  transfer_8to16copy =  transfer_8to16copy_3dne;
# Line 482  Line 491 
491                  dev16    = dev16_sse2;                  dev16    = dev16_sse2;
492  #endif  #endif
493                  /* Forward and Inverse DCT */                  /* Forward and Inverse DCT */
494    #if 0 /* Both function are known to be unprecise, better keep them deactivated */
495                  idct  = idct_sse2;                  idct  = idct_sse2;
496                  fdct = fdct_sse2;                  fdct = fdct_sse2;
497    #endif
498          }          }
499  #endif  #endif
500    
# Line 532  Line 543 
543          }          }
544  #endif  #endif
545    
546    #if defined(_DEBUG)
547        xvid_debug = init->debug;
548    #endif
549    
550          return 0;          return 0;
551  }  }
552    
# Line 568  Line 583 
583          if (XVID_MAJOR(convert->version) != 1)   /* v1.x.x */          if (XVID_MAJOR(convert->version) != 1)   /* v1.x.x */
584                return XVID_ERR_VERSION;                return XVID_ERR_VERSION;
585    
586          // const int flip1 = (convert->input.colorspace & XVID_CSP_VFLIP) ^ (convert->output.colorspace & XVID_CSP_VFLIP);  #if 0
587            const int flip1 = (convert->input.colorspace & XVID_CSP_VFLIP) ^ (convert->output.colorspace & XVID_CSP_VFLIP);
588    #endif
589          width = convert->width;          width = convert->width;
590          height = convert->height;          height = convert->height;
591          width2 = convert->width/2;          width2 = convert->width/2;
# Line 640  Line 657 
657  {  {
658          int i, diff = 0;          int i, diff = 0;
659          for (i = 0; i < size; i++)          for (i = 0; i < size; i++)
660                  diff += ABS(blockA[i]-blockB[i]);                  diff += abs(blockA[i]-blockB[i]);
661          return diff;          return diff;
662  }  }
663    
# Line 1055  Line 1072 
1072                                                            (xvid_enc_stats_t *) param2);                                                            (xvid_enc_stats_t *) param2);
1073    
1074          case XVID_ENC_CREATE:          case XVID_ENC_CREATE:
1075                  return enc_create((xvid_enc_create_t *) param1, (xvid_enc_rc_t*)param2);                  return enc_create((xvid_enc_create_t *) param1);
1076    
1077          case XVID_ENC_DESTROY:          case XVID_ENC_DESTROY:
1078                  return enc_destroy((Encoder *) handle);                  return enc_destroy((Encoder *) handle);

Legend:
Removed from v.1.45.2.1  
changed lines
  Added in v.1.45.2.7

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