[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.17, Thu Jun 13 21:35:01 2002 UTC revision 1.22, Sun Jun 23 19:48:06 2002 UTC
# Line 31  Line 31 
31   *   *
32   *  History   *  History
33   *   *
34     *      - 23.06.2002    added XVID_CPU_CHKONLY
35   *  - 17.03.2002        Added interpolate8x8_halfpel_hv_xmm   *  - 17.03.2002        Added interpolate8x8_halfpel_hv_xmm
36   *  - 22.12.2001  API change: added xvid_init() - Isibaar   *  - 22.12.2001  API change: added xvid_init() - Isibaar
37   *  - 16.12.2001        inital version; (c)2001 peter ross <pross@cs.rmit.edu.au>   *  - 16.12.2001        inital version; (c)2001 peter ross <pross@cs.rmit.edu.au>
# Line 80  Line 81 
81    
82          init_param = (XVID_INIT_PARAM *) param1;          init_param = (XVID_INIT_PARAM *) param1;
83    
84            /* Inform the client the API version */
85            init_param->api_version = API_VERSION;
86    
87            /* Inform the client the core build - unused because we're still alpha */
88            init_param->core_build = 1000;
89    
90            if ((init_param->cpu_flags & XVID_CPU_CHKONLY))
91            {
92                    init_param->cpu_flags = check_cpu_features();
93                    return XVID_ERR_OK;
94            }
95    
96          /* Do we have to force CPU features  ? */          /* Do we have to force CPU features  ? */
97          if ((init_param->cpu_flags & XVID_CPU_FORCE) > 0) {          if ((init_param->cpu_flags & XVID_CPU_FORCE) > 0) {
98                  cpu_flags = init_param->cpu_flags;                  cpu_flags = init_param->cpu_flags;
# Line 184  Line 197 
197                  transfer_8to16copy = transfer_8to16copy_mmx;                  transfer_8to16copy = transfer_8to16copy_mmx;
198                  transfer_16to8copy = transfer_16to8copy_mmx;                  transfer_16to8copy = transfer_16to8copy_mmx;
199                  transfer_8to16sub  = transfer_8to16sub_mmx;                  transfer_8to16sub  = transfer_8to16sub_mmx;
200                    transfer_8to16sub2 = transfer_8to16sub2_mmx;
201                  transfer_16to8add  = transfer_16to8add_mmx;                  transfer_16to8add  = transfer_16to8add_mmx;
202                  transfer8x8_copy   = transfer8x8_copy_mmx;                  transfer8x8_copy   = transfer8x8_copy_mmx;
203    
204    
205                  /* Image Interpolation related functions */                  /* Image Interpolation related functions */
206                  interpolate8x8_halfpel_h  = interpolate8x8_halfpel_h_mmx;                  interpolate8x8_halfpel_h  = interpolate8x8_halfpel_h_mmx;
207                  interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_mmx;                  interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_mmx;
# Line 223  Line 238 
238                  interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_xmm;                  interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_xmm;
239                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_xmm;                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_xmm;
240    
241                    /* Buffer transfer */
242                    transfer_8to16sub2 = transfer_8to16sub2_xmm;
243    
244                  /* Colorspace transformation */                  /* Colorspace transformation */
245                  yuv_to_yv12 = yuv_to_yv12_xmm;                  yuv_to_yv12 = yuv_to_yv12_xmm;
246    
# Line 263  Line 281 
281    
282  #endif  #endif
283    
284    #ifdef ARCH_IA64
285            if ((cpu_flags & XVID_CPU_IA64) > 0) { //use assembler routines?
286              idct_ia64_init();
287              fdct = fdct_ia64;
288              idct = idct_ia64;   //not yet working, crashes
289              interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_ia64;
290              interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_ia64;
291              interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_ia64;
292              sad16 = sad16_ia64;
293              sad16bi = sad16bi_ia64;
294              sad8 = sad8_ia64;
295              dev16 = dev16_ia64;
296              quant_intra = quant_intra_ia64;
297              dequant_intra = dequant_intra_ia64;
298              quant_inter = quant_inter_ia64;
299              dequant_inter = dequant_inter_ia64;
300              transfer_8to16copy = transfer_8to16copy_ia64;
301              transfer_16to8copy = transfer_16to8copy_ia64;
302              transfer_8to16sub = transfer_8to16sub_ia64;
303              transfer_8to16sub2 = transfer_8to16sub2_ia64;
304              transfer_16to8add = transfer_16to8add_ia64;
305              transfer8x8_copy = transfer8x8_copy_ia64;
306              DEBUG("Using IA-64 assembler routines.\n");
307            }
308    #endif
309    
310  #ifdef ARCH_PPC  #ifdef ARCH_PPC
311  #ifdef ARCH_PPC_ALTIVEC  #ifdef ARCH_PPC_ALTIVEC
312          calc_cbp = calc_cbp_altivec;          calc_cbp = calc_cbp_altivec;
# Line 277  Line 321 
321  #endif  #endif
322  #endif  #endif
323    
         /* Inform the client the API version */  
         init_param->api_version = API_VERSION;  
   
         /* Inform the client the core build - unused because we're still alpha */  
         init_param->core_build = 1000;  
   
324          return XVID_ERR_OK;          return XVID_ERR_OK;
325  }  }
326    
# Line 336  Line 374 
374  {  {
375          switch (opt) {          switch (opt) {
376          case XVID_ENC_ENCODE:          case XVID_ENC_ENCODE:
377    #ifdef BFRAMES
378                    if (((Encoder *) handle)->mbParam.max_bframes >= 0)
379                    return encoder_encode_bframes((Encoder *) handle, (XVID_ENC_FRAME *) param1,
380                                                              (XVID_ENC_STATS *) param2);
381                    else
382    #endif
383                  return encoder_encode((Encoder *) handle, (XVID_ENC_FRAME *) param1,                  return encoder_encode((Encoder *) handle, (XVID_ENC_FRAME *) param1,
384                                                            (XVID_ENC_STATS *) param2);                                                            (XVID_ENC_STATS *) param2);
385    

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.22

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