[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.48,1.49

Felix Buenemann atmosfear at users.sourceforge.net
Sun Jun 24 14:19:22 CEST 2001


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

Modified Files:
	vo_sdl.c 
Log Message:
Bugfixed YUV aalib, RGB/BGR32bit converted modes.


Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** vo_sdl.c	2001/06/23 10:18:23	1.48
--- vo_sdl.c	2001/06/24 12:19:19	1.49
***************
*** 198,201 ****
--- 198,204 ----
  	#define BGR 2
  
+ 	/* use direct blitting to surface */
+ 	int dblit;
+ 
  	/* current fullscreen mode, 0 = highest available fullscreen mode */
  	int fullmode;
***************
*** 258,262 ****
  		break;
  		default:
! 		if((priv->format&0xFF) == priv->bpp)		
  		switch(priv->format) {
  		case IMGFMT_RGB15:
--- 261,265 ----
  		break;
  		default:
! 		if(priv->dblit)		
  		switch(priv->format) {
  		case IMGFMT_RGB15:
***************
*** 376,381 ****
  		else {	*/
  			if(verbose) printf("SDL: using hardware-surface\n");
! 			priv->sdlflags = SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL|SDL_ANYFORMAT;
! 			priv->sdlfullflags = SDL_HWSURFACE|SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_ASYNCBLIT|SDL_HWACCEL|SDL_ANYFORMAT;
  		//}	
  	#endif	
--- 379,384 ----
  		else {	*/
  			if(verbose) printf("SDL: using hardware-surface\n");
! 			priv->sdlflags = SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL/*|SDL_ANYFORMAT*/;
! 			priv->sdlfullflags = SDL_HWSURFACE|SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_ASYNCBLIT|SDL_HWACCEL/*|SDL_ANYFORMAT*/;
  		//}	
  	#endif	
***************
*** 661,664 ****
--- 664,671 ----
  			return -1;
  	}
+ 	if(priv->mode) {
+ 		priv->sdlflags |= SDL_ANYFORMAT;
+ 		priv->sdlfullflags |= SDL_ANYFORMAT;
+ 	}
  
  #ifdef HAVE_X11
***************
*** 802,806 ****
  	    break;	
  	    case IMGFMT_RGB32:
! 		if (!(priv->rgbsurface = SDL_CreateRGBSurface (SDL_SRCCOLORKEY, width, height, 32, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000))) {
  			printf ("SDL: Couldn't create a RGB surface: %s\n", SDL_GetError());
  			return -1;
--- 809,813 ----
  	    break;	
  	    case IMGFMT_RGB32:
! 		if (!(priv->rgbsurface = SDL_CreateRGBSurface (SDL_SRCCOLORKEY, width, height, 32, 0x000000FF, 0x0000FF00, 0x00FF0000, 0/*0xFF000000*/))) {
  			printf ("SDL: Couldn't create a RGB surface: %s\n", SDL_GetError());
  			return -1;
***************
*** 808,812 ****
  	    break;	
  	    case IMGFMT_BGR32:
! 		if (!(priv->rgbsurface = SDL_CreateRGBSurface (SDL_SRCCOLORKEY, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000))) {
  			printf ("SDL: Couldn't create a RGB surface: %s\n", SDL_GetError());
  			return -1;
--- 815,819 ----
  	    break;	
  	    case IMGFMT_BGR32:
! 		if (!(priv->rgbsurface = SDL_CreateRGBSurface (SDL_SRCCOLORKEY, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0/*0xFF000000*/))) {
  			printf ("SDL: Couldn't create a RGB surface: %s\n", SDL_GetError());
  			return -1;
***************
*** 828,832 ****
  	
  	if(priv->mode) {
! 		if((priv->format&0xFF) != priv->bpp) printf("SDL: using depth/colorspace conversion, this will slow things down (%ibpp -> %ibpp).\n", priv->format&0xFF, priv->bpp);
  		priv->framePlaneRGB = width * height * priv->rgbsurface->format->BytesPerPixel;
  		priv->stridePlaneRGB = width * priv->rgbsurface->format->BytesPerPixel;
--- 835,840 ----
  	
  	if(priv->mode) {
! 		if((priv->format&0xFF) != priv->bpp) { priv->dblit = 0; printf("SDL: using depth/colorspace conversion, this will slow things down (%ibpp -> %ibpp).\n", priv->format&0xFF, priv->bpp); }
! 		else if(strcmp(priv->driver, "x11") == 0) priv->dblit = 1;
  		priv->framePlaneRGB = width * height * priv->rgbsurface->format->BytesPerPixel;
  		priv->stridePlaneRGB = width * priv->rgbsurface->format->BytesPerPixel;
***************
*** 912,916 ****
  	case IMGFMT_RGB32:
  	case IMGFMT_BGR32:
! 		if((priv->format&0xFF) == priv->bpp) {
  			SDL_SRF_LOCK(priv->surface)
  			dst = (uint8_t *) priv->surface->pixels;
--- 920,924 ----
  	case IMGFMT_RGB32:
  	case IMGFMT_BGR32:
! 		if(priv->dblit) {
  			SDL_SRF_LOCK(priv->surface)
  			dst = (uint8_t *) priv->surface->pixels;
***************
*** 1160,1164 ****
  	    case IMGFMT_RGB32:
  	    case IMGFMT_BGR32:
! 		if((priv->format&0xFF) != priv->bpp) {
  		  	/* blit to the RGB surface */
  			if(SDL_BlitSurface (priv->rgbsurface, NULL, priv->surface, NULL))
--- 1168,1172 ----
  	    case IMGFMT_RGB32:
  	    case IMGFMT_BGR32:
! 		if(!priv->dblit) {
  		  	/* blit to the RGB surface */
  			if(SDL_BlitSurface (priv->rgbsurface, NULL, priv->surface, NULL))


_______________________________________________
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