[Mplayer-cvslog] CVS: main/libvo vo_svga.c,1.6,1.7

Zoltan Mark Vician se7encode at users.sourceforge.net
Tue Apr 10 11:51:12 CEST 2001


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

Modified Files:
	vo_svga.c 
Log Message:

OSD renderers for all modes added.


Index: vo_svga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_svga.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** vo_svga.c	2001/04/06 10:30:29	1.6
--- vo_svga.c	2001/04/10 09:51:09	1.7
***************
*** 55,58 ****
--- 55,59 ----
  static vid_mode_nums[VID_MODE_NUM] = {17,18,19,34,20,21,22,35,23,24,25,36};
  static uint8_t vid_mode;
+ static uint8_t bpp;
  
  static uint32_t pformat;
***************
*** 76,86 ****
                       uint32_t d_height, uint32_t fullscreen, char *title, 
  		     uint32_t format) {
-   static uint8_t bpp;
-   
    if (!checked) {
      checksupportedmodes(); // Looking for available video modes
    }
    pformat = format;
!   if (format == IMGFMT_YV12) bpp = 32; 
    else bpp = format & 255;
    if (d_width > 800)
--- 77,85 ----
                       uint32_t d_height, uint32_t fullscreen, char *title, 
  		     uint32_t format) {
    if (!checked) {
      checksupportedmodes(); // Looking for available video modes
    }
    pformat = format;
!   if (format == IMGFMT_YV12) bpp = 32;
    else bpp = format & 255;
    if (d_width > 800)
***************
*** 152,155 ****
--- 151,155 ----
    }
    
+ //  printf("Vid_mode: %d\n",vid_mode);
    printf("SVGAlib resolution: %dx%d %dbpp - ", WIDTH, HEIGHT, bpp);
    if (maxw != orig_w || maxh != orig_h) printf("Video scaled to: %dx%d\n",maxw,maxh);
***************
*** 190,210 ****
  static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src,
                         unsigned char *srca, int stride) {
!   int x, y, i;
!   uint8_t *dest, buf;
!   
! //  if (pformat == IMGFMT_YV12) {
!     for (y = 0; y < h; y++) {
!       dest = virt->vbuf + ((WIDTH * (y0 + y) + x0) * BYTESPERPIXEL);
!       for (x = 0; x < w; x++) {
!         if (srca[x]) {
! 	  for (i = 0; i < BYTESPERPIXEL; i++)
!             dest[i] = /*((dest[i] * srca[x]) >> 8) +*/ src[x] >> 6;
!         }
!         dest += BYTESPERPIXEL;
!       }
!       src += stride;
!       srca += stride;
!     }
! //  }
  }		
  
--- 190,207 ----
  static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src,
                         unsigned char *srca, int stride) {
!   switch (bpp) {
!     case 32: 
!       vo_draw_alpha_rgb32(w, h, src, srca, stride, virt->vbuf+4*(y0*WIDTH+x0), 4*WIDTH);
!       break;
!     case 24: 
!       vo_draw_alpha_rgb24(w, h, src, srca, stride, virt->vbuf+3*(y0*WIDTH+x0), 3*WIDTH);
!       break;
!     case 16:
!       vo_draw_alpha_rgb16(w, h, src, srca, stride, virt->vbuf+2*(y0*WIDTH+x0), 2*WIDTH);
!       break;
!     case 15:
!       vo_draw_alpha_rgb15(w, h, src, srca, stride, virt->vbuf+2*(y0*WIDTH+x0), 2*WIDTH);
!       break;
!   }
  }		
  
***************
*** 241,245 ****
        gl_fillbox(0, 0, x_pos, HEIGHT, 0);
        gl_fillbox(WIDTH - x_pos, 0, x_pos, HEIGHT, 0);
!     } 
    vo_draw_text(WIDTH, HEIGHT, draw_alpha);
    gl_copyscreen(screen);
--- 238,242 ----
        gl_fillbox(0, 0, x_pos, HEIGHT, 0);
        gl_fillbox(WIDTH - x_pos, 0, x_pos, HEIGHT, 0);
!     }
    vo_draw_text(WIDTH, HEIGHT, draw_alpha);
    gl_copyscreen(screen);


_______________________________________________
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