[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.13,1.14

Felix Buenemann atmosfear at users.sourceforge.net
Sat Apr 14 19:50:57 CEST 2001


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

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


Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** vo_sdl.c	2001/04/13 21:04:13	1.13
--- vo_sdl.c	2001/04/14 17:50:55	1.14
***************
*** 147,158 ****
  
  static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
!     struct sdl_priv_s *priv = &sdl_priv;
!     int x,y;
  	
!   if (priv->format==IMGFMT_YV12)
!     vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) *(priv->overlay->pixels))+priv->width*y0+x0,priv->width);
!   else
!     vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) *(priv->overlay->pixels))+2*(priv->width*y0+x0),2*priv->width);
! 
  }
  
--- 147,165 ----
  
  static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
! 	struct sdl_priv_s *priv = &sdl_priv;
! 	int x,y;
  	
! 	switch(priv->format) {
! 		case IMGFMT_YV12:  
! 		case IMGFMT_I420:
!         	case IMGFMT_IYUV:
!     			vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) *(priv->overlay->pixels))+priv->width*y0+x0,priv->width);
! 		break;
! 		case IMGFMT_YUY2:
!         	case IMGFMT_UYVY:
!         	case IMGFMT_YVYU:		
!     			vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) *(priv->overlay->pixels))+2*(priv->width*y0+x0),2*priv->width);
! 		break;	
!   	}	
  }
  
***************
*** 381,384 ****
--- 388,395 ----
  		printf("SDL: Using YUY2 image format\n");
  	  break;
+           case IMGFMT_UYVY:
+ 	  	sdl_format=SDL_UYVY_OVERLAY;
+ 		printf("SDL: Using UYVY image format\n");
+ 	  break;
            default:
              printf("SDL: Unsupported image format (0x%X)\n",format);
***************
*** 473,476 ****
--- 484,489 ----
          switch(priv->format){
          case IMGFMT_YV12:
+         case IMGFMT_I420:
+         case IMGFMT_IYUV:
  	    dst = (uint8_t *) *(priv->overlay->pixels);
  	    memcpy (dst, src[0], priv->framePlaneY);
***************
*** 480,484 ****
--- 493,500 ----
  	    memcpy (dst, src[1], priv->framePlaneUV);
              break;
+ 
          case IMGFMT_YUY2:
+         case IMGFMT_UYVY:
+         case IMGFMT_YVYU:
  	    dst = (uint8_t *) *(priv->overlay->pixels);
  	    memcpy (dst, src[0], priv->width*priv->height*2);
***************
*** 487,491 ****
          	
  	SDL_UnlockYUVOverlay (priv->overlay);
- 
  	return 0;
  }
--- 503,506 ----
***************
*** 712,716 ****
--- 727,735 ----
      switch(format){
      case IMGFMT_YV12:
+     case IMGFMT_I420:
+     case IMGFMT_IYUV:
      case IMGFMT_YUY2:
+     case IMGFMT_UYVY:
+     case IMGFMT_YVYU:
  //    case IMGFMT_RGB|24:
  //    case IMGFMT_BGR|24:


_______________________________________________
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