[Mplayer-cvslog] CVS: main/libvo vesa_lvo.c,1.9,1.10

Nick Kurshev nick at mplayer.dev.hu
Tue Nov 27 19:36:38 CET 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv11035/main/libvo

Modified Files:
	vesa_lvo.c 
Log Message:
Direct i420 support for Radeons

Index: vesa_lvo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vesa_lvo.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vesa_lvo.c	20 Nov 2001 10:34:00 -0000	1.9
+++ vesa_lvo.c	27 Nov 2001 18:36:35 -0000	1.10
@@ -23,10 +23,8 @@
 #include "img_format.h"
 #include "../drivers/mga_vid.h" /* <- should be changed to "linux/'something'.h" */
 #include "fastmemcpy.h"
-#include "../mmx_defs.h"
-#include "../postproc/rgb2rgb.h"
 
-#define WIDTH_ALIGN 16 /* should be 16 for radeons */
+#define WIDTH_ALIGN 32 /* should be 16 for rage:422 and 32 for rage:420 */
 #define NUM_FRAMES 2
 static uint8_t *frames[NUM_FRAMES];
 
@@ -37,8 +35,6 @@
 static unsigned image_bpp,image_height,image_width,src_format;
 extern int verbose;
 
-#define HAVE_RADEON 1
-
 #define PIXEL_SIZE() ((video_mode_info.BitsPerPixel+7)/8)
 #define SCREEN_LINE_SIZE(pixel_size) (video_mode_info.XResolution*(pixel_size) )
 #define IMAGE_LINE_SIZE(pixel_size) (image_width*(pixel_size))
@@ -67,22 +63,12 @@
         src_format = mga_vid_config.format=format;
         awidth = (src_width + (WIDTH_ALIGN-1)) & ~(WIDTH_ALIGN-1);
         switch(format){
-#ifdef HAVE_RADEON
-        case IMGFMT_YV12:
-        case IMGFMT_I420:
-        case IMGFMT_IYUV:
-	    image_bpp=16;
-	    mga_vid_config.format = IMGFMT_YUY2;
-	    mga_vid_config.frame_size = awidth*src_height*2;
-	    break;
-#else
         case IMGFMT_YV12:
         case IMGFMT_I420:
         case IMGFMT_IYUV:
 	    image_bpp=16;
 	    mga_vid_config.frame_size = awidth*src_height+(awidth*src_height)/2;
 	    break;
-#endif	    
         case IMGFMT_YUY2:
         case IMGFMT_UYVY:
 	    image_bpp=16;
@@ -144,7 +130,7 @@
 	if(lvo_handler != -1) close(lvo_handler);
 }
 
-uint32_t vlvo_draw_slice_mga(uint8_t *image[], int stride[], int w,int h,int x,int y)
+uint32_t vlvo_draw_slice_420(uint8_t *image[], int stride[], int w,int h,int x,int y)
 {
     uint8_t *src;
     uint8_t *dest;
@@ -191,16 +177,10 @@
  if(verbose > 1) printf("vesa_lvo: vlvo_draw_slice() was called\n");
  bytpp = (image_bpp+7)/8;
  dst = lvo_mem + (image_width * y + x)*bytpp;
-#ifdef HAVE_RADEON
-    if(src_format == IMGFMT_YV12)
-      yv12toyuy2(image[0],image[1],image[2],dst
-                 ,w,h,stride[0],stride[1],w*2);
-    else
-#else
-    if(src_format == IMGFMT_YV12)
-      vlvo_draw_slice_mga(image,stride,w,h,x,y);
+    if(src_format == IMGFMT_YV12 || src_format == IMGFMT_I420 || src_format == IMGFMT_IYUV)
+      vlvo_draw_slice_420(image,stride,w,h,x,y);
     else
-#endif
+      /* vlvo_draw_slice_422(image,stride,w,h,x,y); just for speed */
       memcpy(dst,image[0],mga_vid_config.frame_size);
  return 0;
 }




More information about the MPlayer-cvslog mailing list