[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.31, Thu Jul 18 13:47:46 2002 UTC revision 1.38, Wed Oct 9 14:35:57 2002 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-2002 Peter Ross <pross@xvid.org>
7     *
8   *  This program is an implementation of a part of one or more MPEG-4   *  This program is an implementation of a part of one or more MPEG-4
9   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending
10   *  to use this software module in hardware or software products are   *  to use this software module in hardware or software products are
# Line 26  Line 28 
28   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
29   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
30   *   *
  ****************************************************************************/  
   
 /*****************************************************************************  
  *  
  *  History  
  *  
  *      - 23.06.2002    added XVID_CPU_CHKONLY  
  *  - 17.03.2002        Added interpolate8x8_halfpel_hv_xmm  
  *  - 22.12.2001  API change: added xvid_init() - Isibaar  
  *  - 16.12.2001        inital version; (c)2001 peter ross <pross@cs.rmit.edu.au>  
  *  
31   *  $Id$   *  $Id$
32   *   *
33   ****************************************************************************/   ****************************************************************************/
# Line 81  Line 72 
72    
73    
74  /*  /*
75  calls the funcptr, and returns whether SIGILL (illegal instruction) was signalled   * Calls the funcptr, and returns whether SIGILL (illegal instruction) was signalled
76  return values:   * Return values:
77  -1 : could not determine   * -1 : could not determine
78  0  : SIGILL was *not* signalled   * 0  : SIGILL was *not* signalled
79  1  : SIGILL was signalled   * 1  : SIGILL was signalled
80  */  */
81    
82  int  int
# Line 245  Line 236 
236          /* Functions used in motion estimation algorithms */          /* Functions used in motion estimation algorithms */
237          calc_cbp = calc_cbp_c;          calc_cbp = calc_cbp_c;
238          sad16    = sad16_c;          sad16    = sad16_c;
         sad16bi  = sad16bi_c;  
239          sad8     = sad8_c;          sad8     = sad8_c;
240            sad16bi  = sad16bi_c;
241            sad8bi   = sad8bi_c;
242          dev16    = dev16_c;          dev16    = dev16_c;
243    
244          Halfpel8_Refine = Halfpel8_Refine_c;          Halfpel8_Refine = Halfpel8_Refine_c;
245    
246  #ifdef ARCH_X86  #ifdef ARCH_X86
# Line 302  Line 295 
295                  calc_cbp = calc_cbp_mmx;                  calc_cbp = calc_cbp_mmx;
296                  sad16    = sad16_mmx;                  sad16    = sad16_mmx;
297                  sad8     = sad8_mmx;                  sad8     = sad8_mmx;
298                    sad16bi = sad16bi_mmx;
299                    sad8bi  = sad8bi_mmx;
300                  dev16    = dev16_mmx;                  dev16    = dev16_mmx;
301    
302          }          }
303    
304            /* these 3dnow functions are faster than mmx, but slower than xmm. */
305            if ((cpu_flags & XVID_CPU_3DNOW) > 0) {
306    
307                    /* ME functions */
308                    sad16bi = sad16bi_3dn;
309                    sad8bi  = sad8bi_3dn;
310            }
311    
312    
313          if ((cpu_flags & XVID_CPU_MMXEXT) > 0) {          if ((cpu_flags & XVID_CPU_MMXEXT) > 0) {
314    
315                  /* Inverse DCT */                  /* Inverse DCT */
# Line 328  Line 332 
332    
333                  /* ME functions */                  /* ME functions */
334                  sad16 = sad16_xmm;                  sad16 = sad16_xmm;
                 sad16bi = sad16bi_xmm;  
335                  sad8  = sad8_xmm;                  sad8  = sad8_xmm;
336                    sad16bi = sad16bi_xmm;
337                    sad8bi  = sad8bi_xmm;
338                  dev16 = dev16_xmm;                  dev16 = dev16_xmm;
339    
340          }          }
# Line 369  Line 374 
374          if ((cpu_flags & XVID_CPU_IA64) > 0) { //use assembler routines?          if ((cpu_flags & XVID_CPU_IA64) > 0) { //use assembler routines?
375            idct_ia64_init();            idct_ia64_init();
376            fdct = fdct_ia64;            fdct = fdct_ia64;
377            idct = idct_ia64;   //not yet working, crashes            idct = idct_ia64;
378            interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_ia64;            interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_ia64;
379            interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_ia64;            interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_ia64;
380            interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_ia64;            interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_ia64;
# Line 388  Line 393 
393            transfer_8to16sub2 = transfer_8to16sub2_ia64;            transfer_8to16sub2 = transfer_8to16sub2_ia64;
394            transfer_16to8add = transfer_16to8add_ia64;            transfer_16to8add = transfer_16to8add_ia64;
395            transfer8x8_copy = transfer8x8_copy_ia64;            transfer8x8_copy = transfer8x8_copy_ia64;
396            DEBUG("Using IA-64 assembler routines.\n");  //        DEBUG("Using IA-64 assembler routines.\n");
397          }          }
398  #endif  #endif
399    
# Line 459  Line 464 
464  {  {
465          switch (opt) {          switch (opt) {
466          case XVID_ENC_ENCODE:          case XVID_ENC_ENCODE:
 #ifdef BFRAMES  
                 if (((Encoder *) handle)->mbParam.max_bframes >= 0)  
                 return encoder_encode_bframes((Encoder *) handle, (XVID_ENC_FRAME *) param1,  
                                                           (XVID_ENC_STATS *) param2);  
                 else  
 #endif  
467                  return encoder_encode((Encoder *) handle, (XVID_ENC_FRAME *) param1,                  return encoder_encode((Encoder *) handle, (XVID_ENC_FRAME *) param1,
468                                                            (XVID_ENC_STATS *) param2);                                                            (XVID_ENC_STATS *) param2);
469    

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.38

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