[Mplayer-cvslog] CVS: main/libvo vo_fbdev.c,1.39,1.40

Szabolcs Berecz szabii at users.sourceforge.net
Tue May 15 00:40:10 CEST 2001


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

Modified Files:
	vo_fbdev.c 
Log Message:
flip support if (screen depth == frame depth)

Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** vo_fbdev.c	2001/04/29 21:16:21	1.39
--- vo_fbdev.c	2001/05/14 22:40:08	1.40
***************
*** 589,592 ****
--- 589,594 ----
  static int out_height;
  static uint32_t pixel_format;
+ static int fs;
+ static int flip;
  
  /*
***************
*** 705,716 ****
  }
  
- static void clear_bg(void)
- {
- 	int i, offset = 0;
- 
- 	for (i = 0; i < out_height; i++, offset += fb_screen_width)
- 		memset(frame_buffer + offset, 0x0, out_width * fb_pixel_size);
- }
- 
  static void lots_of_printf(void)
  {
--- 707,710 ----
***************
*** 784,790 ****
--- 778,786 ----
  #define VM	(fullscreen & 0x02)
  #define ZOOM	(fullscreen & 0x04)
+ #define FLIP	(fullscreen & 0x08)
  
  	struct fb_cmap *cmap;
  
+ 	fs = FS;
  	if (!fb_preinit_done)
  		if (fb_preinit())
***************
*** 793,796 ****
--- 789,794 ----
  		return 1;
  
+ 	flip = FLIP;
+ 
  	if (ZOOM) {
  		printf(FBDEV "-zoom is not supported\n");
***************
*** 805,815 ****
  		if (parse_fbmode_cfg(fb_mode_cfgfile) < 0)
  			return 1;
! #if 0
! 	if ((!d_width + !d_height) == 1) {
! 		printf(FBDEV "use both -x and -y, or none of them\n");
! 		return 1;
! 	}
! #endif
! 	if (d_width) {
  		out_width = d_width;
  		out_height = d_height;
--- 803,807 ----
  		if (parse_fbmode_cfg(fb_mode_cfgfile) < 0)
  			return 1;
! 	if (d_width && (fs || VM)) {
  		out_width = d_width;
  		out_height = d_height;
***************
*** 892,899 ****
  			free(cmap);
  			break;
- //		case FB_VISUAL_PSEUDOCOLOR:
- //			printf(FBDEV "visual is FB_VISUAL_PSEUDOCOLOR."
- //					"it's not tested!\n");
- //			break;
  		default:
  			printf(FBDEV "visual: %d not yet supported\n",
--- 884,887 ----
***************
*** 902,906 ****
  	}
  
! 	if (FS || (d_width && VM)) {
  		out_width = fb_vinfo.xres;
  		out_height = fb_vinfo.yres;
--- 890,894 ----
  	}
  
! 	if (VM || fs) {
  		out_width = fb_vinfo.xres;
  		out_height = fb_vinfo.yres;
***************
*** 962,968 ****
  	}
  
  	if (format == IMGFMT_YV12)
  		yuv2rgb_init(fb_bpp, MODE_RGB);
- 	clear_bg();
  	return 0;
  }
--- 950,960 ----
  	}
  
+ 	if (flip & (((pixel_format & 0xff) + 7) / 8) != fb_pixel_size) {
+ 		printf(FBDEV "Flipped output with depth conversion is not "
+ 				"supported\n");
+ 		return 1;
+ 	}
  	if (format == IMGFMT_YV12)
  		yuv2rgb_init(fb_bpp, MODE_RGB);
  	return 0;
  }
***************
*** 1013,1016 ****
--- 1005,1018 ----
  				in_height, in_width * fb_pixel_size,
  				in_width, in_width / 2);
+ 	} else if (flip) {
+ 		int h = in_height;
+ 		int len = in_width * fb_pixel_size;
+ 		char *d = next_frame + (in_height - 1) * len;
+ 		char *s = src[0];
+ 		while (h--) {
+ 			memcpy(d, s, len);
+ 			s += len;
+ 			d -= len;
+ 		}
  	} else {
  		int sbpp = ((pixel_format & 0xff) + 7) / 8;


_______________________________________________
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