[Mplayer-cvslog] CVS: main/libvo vo_xv.c,1.11,1.12

Felix Buenemann atmosfear at users.sourceforge.net
Sat Apr 14 19:51:20 CEST 2001


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

Modified Files:
	vo_xv.c 
Log Message:
- applied overlay patch by Jens H


Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** vo_xv.c	2001/04/13 00:54:05	1.11
--- vo_xv.c	2001/04/14 17:51:18	1.12
***************
*** 266,273 ****
      int x,y;
  
!   if (xv_format==IMGFMT_YV12)
!     vo_draw_alpha_yv12(w,h,src,srca,stride,xvimage[0]->data+image_width*y0+x0,image_width);
!   else
!     vo_draw_alpha_yuy2(w,h,src,srca,stride,xvimage[0]->data+2*(image_width*y0+x0),2*image_width);
  
  }
--- 266,281 ----
      int x,y;
  
!   switch (xv_format) {
! 	case IMGFMT_YV12:  
! 	case IMGFMT_I420:
!         case IMGFMT_IYUV:
!     		vo_draw_alpha_yv12(w,h,src,srca,stride,xvimage[0]->data+image_width*y0+x0,image_width);
! 	break;
! 	case IMGFMT_YUY2:
!         case IMGFMT_UYVY:
!         case IMGFMT_YVYU:	
!     		vo_draw_alpha_yuy2(w,h,src,srca,stride,xvimage[0]->data+2*(image_width*y0+x0),2*image_width);
! 	break;
!   }		
  
  }
***************
*** 333,361 ****
   int foo;
  
!  if(xv_format==IMGFMT_YUY2)
!   {
!    // YUY2 packed, flipped
  #if 0
!    int i;
!    unsigned short *s=(unsigned short *)src[0];
!    unsigned short *d=(unsigned short *)xvimage[0]->data;
!    s+=image_width*image_height;
!    for(i=0;i<image_height;i++)
!     {
!      s-=image_width;
!      memcpy(d,s,image_width*2);
!      d+=image_width;
!     }
  #else
!    memcpy(xvimage[0]->data,src[0],image_width*image_height*2);
  #endif
!   }
!    else
!     {
       // YV12 planar
       memcpy(xvimage[0]->data,src[0],image_width*image_height);
       memcpy(xvimage[0]->data+image_width*image_height,src[2],image_width*image_height/4);
       memcpy(xvimage[0]->data+image_width*image_height*5/4,src[1],image_width*image_height/4);
!     }
  
    return 0;
--- 341,375 ----
   int foo;
  
!  switch (xv_format) {
!  case IMGFMT_YUY2:
!  case IMGFMT_UYVY:
!  case IMGFMT_YVYU:
! 
!      // YUY2 packed, flipped
  #if 0
!      int i;
!      unsigned short *s=(unsigned short *)src[0];
!      unsigned short *d=(unsigned short *)xvimage[0]->data;
!      s+=image_width*image_height;
!      for(i=0;i<image_height;i++) {
! 	 s-=image_width;
! 	 memcpy(d,s,image_width*2);
! 	 d+=image_width;
!      }
  #else
!      memcpy(xvimage[0]->data,src[0],image_width*image_height*2);
  #endif
!      break;
! 
!  case IMGFMT_YV12:
!  case IMGFMT_I420:
!  case IMGFMT_IYUV:
! 
       // YV12 planar
       memcpy(xvimage[0]->data,src[0],image_width*image_height);
       memcpy(xvimage[0]->data+image_width*image_height,src[2],image_width*image_height/4);
       memcpy(xvimage[0]->data+image_width*image_height*5/4,src[1],image_width*image_height/4);
!      break;
!  }
  
    return 0;
***************
*** 364,373 ****
  static uint32_t query_format(uint32_t format)
  {
   switch(format)
    {
     case IMGFMT_YV12:
!    case IMGFMT_YUY2: return 1;
    }
   return 0;
  }
  
--- 378,393 ----
  static uint32_t query_format(uint32_t format)
  {
+ 
+ // umm, this is a kludge, we need to ask the server.. (see init function above)
+     return 1;
+ /*
   switch(format)
    {
     case IMGFMT_YV12:
!    case IMGFMT_YUY2: 
!        return 1;
    }
   return 0;
+ */
  }
  


_______________________________________________
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