[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.33.2.5, Wed Sep 25 22:02:04 2002 UTC revision 1.33.2.11, Thu Nov 7 10:28:15 2002 UTC
# Line 225  Line 225 
225          interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_c;          interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_c;
226          interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_c;          interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_c;
227    
228            interpolate16x16_lowpass_h = interpolate16x16_lowpass_h_c;
229            interpolate16x16_lowpass_v = interpolate16x16_lowpass_v_c;
230            interpolate16x16_lowpass_hv = interpolate16x16_lowpass_hv_c;
231    
232            interpolate8x8_lowpass_h = interpolate8x8_lowpass_h_c;
233            interpolate8x8_lowpass_v = interpolate8x8_lowpass_v_c;
234            interpolate8x8_lowpass_hv = interpolate8x8_lowpass_hv_c;
235    
236            interpolate8x8_6tap_lowpass_h = interpolate8x8_6tap_lowpass_h_c;
237            interpolate8x8_6tap_lowpass_v = interpolate8x8_6tap_lowpass_v_c;
238    
239            interpolate8x8_avg2 = interpolate8x8_avg2_c;
240            interpolate8x8_avg4 = interpolate8x8_avg4_c;
241    
242          /* Initialize internal colorspace transformation tables */          /* Initialize internal colorspace transformation tables */
243          colorspace_init();          colorspace_init();
244    
245          /* All colorspace transformation functions User Format->YV12 */          /* All colorspace transformation functions User Format->YV12 */
246            yv12_to_yv12    = yv12_to_yv12_c;
247          rgb555_to_yv12 = rgb555_to_yv12_c;          rgb555_to_yv12 = rgb555_to_yv12_c;
248          rgb565_to_yv12 = rgb565_to_yv12_c;          rgb565_to_yv12 = rgb565_to_yv12_c;
249          rgb24_to_yv12  = rgb24_to_yv12_c;          bgr_to_yv12     = bgr_to_yv12_c;
250          rgb32_to_yv12  = rgb32_to_yv12_c;          bgra_to_yv12    = bgra_to_yv12_c;
251          yuv_to_yv12    = yuv_to_yv12_c;          abgr_to_yv12    = abgr_to_yv12_c;
252            rgba_to_yv12    = rgba_to_yv12_c;
253          yuyv_to_yv12   = yuyv_to_yv12_c;          yuyv_to_yv12   = yuyv_to_yv12_c;
254          uyvy_to_yv12   = uyvy_to_yv12_c;          uyvy_to_yv12   = uyvy_to_yv12_c;
255    
256            rgb555i_to_yv12 = rgb555i_to_yv12_c;
257            rgb565i_to_yv12 = rgb565i_to_yv12_c;
258            bgri_to_yv12    = bgri_to_yv12_c;
259            bgrai_to_yv12   = bgrai_to_yv12_c;
260            abgri_to_yv12   = abgri_to_yv12_c;
261            rgbai_to_yv12   = rgbai_to_yv12_c;
262            yuyvi_to_yv12   = yuyvi_to_yv12_c;
263            uyvyi_to_yv12   = uyvyi_to_yv12_c;
264    
265    
266          /* All colorspace transformation functions YV12->User format */          /* All colorspace transformation functions YV12->User format */
267          yv12_to_rgb555 = yv12_to_rgb555_c;          yv12_to_rgb555 = yv12_to_rgb555_c;
268          yv12_to_rgb565 = yv12_to_rgb565_c;          yv12_to_rgb565 = yv12_to_rgb565_c;
269          yv12_to_rgb24  = yv12_to_rgb24_c;          yv12_to_bgr     = yv12_to_bgr_c;
270          yv12_to_rgb32  = yv12_to_rgb32_c;          yv12_to_bgra    = yv12_to_bgra_c;
271          yv12_to_yuv    = yv12_to_yuv_c;          yv12_to_abgr    = yv12_to_abgr_c;
272            yv12_to_rgba    = yv12_to_rgba_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    
276            yv12_to_rgb555i = yv12_to_rgb555i_c;
277            yv12_to_rgb565i = yv12_to_rgb565i_c;
278            yv12_to_bgri    = yv12_to_bgri_c;
279            yv12_to_bgrai   = yv12_to_bgrai_c;
280            yv12_to_abgri   = yv12_to_abgri_c;
281            yv12_to_rgbai   = yv12_to_rgbai_c;
282            yv12_to_yuyvi   = yv12_to_yuyvi_c;
283            yv12_to_uyvyi   = yv12_to_uyvyi_c;
284    
285          /* Functions used in motion estimation algorithms */          /* Functions used in motion estimation algorithms */
286          calc_cbp = calc_cbp_c;          calc_cbp = calc_cbp_c;
287          sad16    = sad16_c;          sad16    = sad16_c;
# Line 258  Line 294 
294  //      Halfpel8_Refine = Halfpel8_Refine_c;  //      Halfpel8_Refine = Halfpel8_Refine_c;
295    
296  #ifdef ARCH_X86  #ifdef ARCH_X86
297    
298            if ((cpu_flags & XVID_CPU_MMX) || (cpu_flags & XVID_CPU_MMXEXT) ||
299                    (cpu_flags & XVID_CPU_3DNOW) || (cpu_flags & XVID_CPU_3DNOWEXT) ||
300                    (cpu_flags & XVID_CPU_SSE) || (cpu_flags & XVID_CPU_SSE2))
301            {
302                    /* Restore FPU context : emms_c is a nop functions */
303                    emms = emms_mmx;
304            }
305    
306          if ((cpu_flags & XVID_CPU_MMX) > 0) {          if ((cpu_flags & XVID_CPU_MMX) > 0) {
307    
308                  /* Forward and Inverse Discrete Cosine Transformation functions */                  /* Forward and Inverse Discrete Cosine Transformation functions */
309                  fdct = fdct_mmx;                  fdct = fdct_mmx;
310                  idct = idct_mmx;                  idct = idct_mmx;
311    
                 /* To restore FPU context after mmx use */  
                 emms = emms_mmx;  
   
312                  /* Quantization related functions */                  /* Quantization related functions */
313                  quant_intra   = quant_intra_mmx;                  quant_intra   = quant_intra_mmx;
314                  dequant_intra = dequant_intra_mmx;                  dequant_intra = dequant_intra_mmx;
# Line 294  Line 336 
336                  interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_mmx;                  interpolate8x8_halfpel_v  = interpolate8x8_halfpel_v_mmx;
337                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_mmx;                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_mmx;
338    
339                  /* Image RGB->YV12 related functions */                  interpolate8x8_6tap_lowpass_h = interpolate8x8_6tap_lowpass_h_mmx;
340                  rgb24_to_yv12 = rgb24_to_yv12_mmx;                  interpolate8x8_6tap_lowpass_v = interpolate8x8_6tap_lowpass_v_mmx;
341                  rgb32_to_yv12 = rgb32_to_yv12_mmx;  
342                  yuv_to_yv12   = yuv_to_yv12_mmx;  //              interpolate8x8_avg2 = interpolate8x8_avg2_mmx;
343                    interpolate8x8_avg4 = interpolate8x8_avg4_mmx;
344    
345                    /* image input xxx_to_yv12 related functions */
346                    yv12_to_yv12  = yv12_to_yv12_mmx;
347                    bgr_to_yv12   = bgr_to_yv12_mmx;
348                    bgra_to_yv12  = bgra_to_yv12_mmx;
349                  yuyv_to_yv12  = yuyv_to_yv12_mmx;                  yuyv_to_yv12  = yuyv_to_yv12_mmx;
350                  uyvy_to_yv12  = uyvy_to_yv12_mmx;                  uyvy_to_yv12  = uyvy_to_yv12_mmx;
351    
352                  /* Image YV12->RGB related functions */                  /* image output yv12_to_xxx related functions */
353                  yv12_to_rgb24 = yv12_to_rgb24_mmx;                  yv12_to_bgr   = yv12_to_bgr_mmx;
354                  yv12_to_rgb32 = yv12_to_rgb32_mmx;                  yv12_to_bgra  = yv12_to_bgra_mmx;
355                  yv12_to_yuyv  = yv12_to_yuyv_mmx;                  yv12_to_yuyv  = yv12_to_yuyv_mmx;
356                  yv12_to_uyvy  = yv12_to_uyvy_mmx;                  yv12_to_uyvy  = yv12_to_uyvy_mmx;
357    
358                    yv12_to_yuyvi = yv12_to_yuyvi_mmx;
359                    yv12_to_uyvyi = yv12_to_uyvyi_mmx;
360    
361                  /* Motion estimation related functions */                  /* Motion estimation related functions */
362                  calc_cbp = calc_cbp_mmx;                  calc_cbp = calc_cbp_mmx;
363                  sad16    = sad16_mmx;                  sad16    = sad16_mmx;
# Line 324  Line 375 
375                  /* ME functions */                  /* ME functions */
376                  sad16bi = sad16bi_3dn;                  sad16bi = sad16bi_3dn;
377                  sad8bi  = sad8bi_3dn;                  sad8bi  = sad8bi_3dn;
378    
379                    yuyv_to_yv12  = yuyv_to_yv12_3dn;
380                    uyvy_to_yv12  = uyvy_to_yv12_3dn;
381          }          }
382    
383    
# Line 345  Line 399 
399                  transfer_8to16sub2 = transfer_8to16sub2_xmm;                  transfer_8to16sub2 = transfer_8to16sub2_xmm;
400    
401                  /* Colorspace transformation */                  /* Colorspace transformation */
402                  yuv_to_yv12 = yuv_to_yv12_xmm;                  yv12_to_yv12  = yv12_to_yv12_xmm;
403                    yuyv_to_yv12  = yuyv_to_yv12_xmm;
404                    uyvy_to_yv12  = yuyv_to_yv12_xmm;
405    
406                  /* ME functions */                  /* ME functions */
407                  sad16 = sad16_xmm;                  sad16 = sad16_xmm;
# Line 354  Line 410 
410                  sad8bi  = sad8bi_xmm;                  sad8bi  = sad8bi_xmm;
411                  dev16 = dev16_xmm;                  dev16 = dev16_xmm;
412                  sad16v   = sad16v_xmm;                  sad16v   = sad16v_xmm;
                 fprintf(stderr,"sad16v=XMM\n");  
   
413          }          }
414    
415          if ((cpu_flags & XVID_CPU_3DNOW) > 0) {          if ((cpu_flags & XVID_CPU_3DNOW) > 0) {
# Line 451  Line 505 
505  {  {
506          switch (opt) {          switch (opt) {
507          case XVID_DEC_DECODE:          case XVID_DEC_DECODE:
508                  return decoder_decode((DECODER *) handle, (XVID_DEC_FRAME *) param1);                  return decoder_decode((DECODER *) handle, (XVID_DEC_FRAME *) param1, (XVID_DEC_STATS*) param2);
509    
510          case XVID_DEC_CREATE:          case XVID_DEC_CREATE:
511                  return decoder_create((XVID_DEC_PARAM *) param1);                  return decoder_create((XVID_DEC_PARAM *) param1);
# Line 483  Line 537 
537  {  {
538          switch (opt) {          switch (opt) {
539          case XVID_ENC_ENCODE:          case XVID_ENC_ENCODE:
540  #ifdef BFRAMES  
541                  if (((Encoder *) handle)->mbParam.max_bframes >= 0)                  if (((Encoder *) handle)->mbParam.max_bframes >= 0)
542                  return encoder_encode_bframes((Encoder *) handle, (XVID_ENC_FRAME *) param1,                  return encoder_encode_bframes((Encoder *) handle, (XVID_ENC_FRAME *) param1,
543                                                            (XVID_ENC_STATS *) param2);                                                            (XVID_ENC_STATS *) param2);
544                  else                  else
 #endif  
545                  return encoder_encode((Encoder *) handle, (XVID_ENC_FRAME *) param1,                  return encoder_encode((Encoder *) handle, (XVID_ENC_FRAME *) param1,
546                                                            (XVID_ENC_STATS *) param2);                                                            (XVID_ENC_STATS *) param2);
547    

Legend:
Removed from v.1.33.2.5  
changed lines
  Added in v.1.33.2.11

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