[Mplayer-cvslog] CVS: main/libvo vo_xv.c,1.3,1.4

GEREOFFY arpi_esp at users.sourceforge.net
Thu Mar 29 17:32:44 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv19778

Modified Files:
	vo_xv.c 
Log Message:
OSD/SUB support

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** vo_xv.c	2001/03/21 19:10:55	1.3
--- vo_xv.c	2001/03/29 15:32:42	1.4
***************
*** 254,259 ****
--- 254,294 ----
  }
  
+ 
+ static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
+     int x,y;
+ 
+   if (xv_format==IMGFMT_YV12){
+ 
+     for(y=0;y<h;y++){
+ 	uint8_t *dst = xvimage[0]->data + image_width * (y+y0) + x0;
+         for(x=0;x<w;x++){
+ //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
+             if(srca[x])
+             dst[x]=(dst[x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
+         }
+         src+=stride;
+         srca+=stride;
+     }
+ 
+   } else {
+ 
+     for(y=0;y<h;y++){
+ 	uint8_t *dst = xvimage[0]->data + 2*(image_width * (y+y0) + x0);
+         for(x=0;x<w;x++){
+ //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
+             if(srca[x])
+             dst[2*x]=(dst[2*x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
+         }
+         src+=stride;
+         srca+=stride;
+     }
+ 
+   }
+ 
+ }
+ 
  static void flip_page(void)
  {
+  vo_draw_text(image_width,image_height,draw_alpha);
   check_events();
   XvShmPutImage(mydisplay, xv_port, mywindow, mygc, xvimage[0],
***************
*** 264,267 ****
--- 299,304 ----
   return;
  }
+ 
+ 
  
  static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list