[Mplayer-cvslog] CVS: main/libvo vo_svga.c,1.8,1.9

Zoltan Mark Vician se7encode at users.sourceforge.net
Thu Apr 12 19:30:53 CEST 2001


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

Modified Files:
	vo_svga.c 
Log Message:

Bugfixes in draw_slice.

Index: vo_svga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_svga.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** vo_svga.c	2001/04/11 09:12:42	1.8
--- vo_svga.c	2001/04/12 17:30:50	1.9
***************
*** 16,19 ****
--- 16,20 ----
  
  #include "yuv2rgb.h"
+ #include "mmx.h"
  
  LIBVO_EXTERN(svga)
***************
*** 34,38 ****
  
  static uint32_t orig_w, orig_h, maxw, maxh; // Width, height
! static float scaling = 0;
  static uint32_t x_pos, y_pos; // Position
  
--- 35,39 ----
  
  static uint32_t orig_w, orig_h, maxw, maxh; // Width, height
! static float scaling = 1.0;
  static uint32_t x_pos, y_pos; // Position
  
***************
*** 83,87 ****
    if (format == IMGFMT_YV12) bpp = 32;
    else bpp = format & 255;
!   if (width > 800)
      switch (bpp) {
        case 32: vid_mode = 36; break;
--- 84,88 ----
    if (format == IMGFMT_YV12) bpp = 32;
    else bpp = format & 255;
!   if (d_width > 800)
      switch (bpp) {
        case 32: vid_mode = 36; break;
***************
*** 91,95 ****
      }
    else
!     if (width > 640)
        switch (bpp) {
          case 32: vid_mode = 35; break;
--- 92,96 ----
      }
    else
!     if (d_width > 640)
        switch (bpp) {
          case 32: vid_mode = 35; break;
***************
*** 150,155 ****
      yuvbuf = malloc(maxw * maxh * BYTESPERPIXEL);
    }
!   
! //  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);
--- 151,155 ----
      yuvbuf = malloc(maxw * maxh * BYTESPERPIXEL);
    }
! 
    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);
***************
*** 221,233 ****
                             int w, int h, int x, int y) {
    uint8_t *src = yuvbuf;
! 
    yuv2rgb(yuvbuf, image[0], image[1], image[2], w, h, orig_w * BYTESPERPIXEL, stride[0], stride[1]);
    if (scalebuf) {
!     gl_scalebox(w, h, yuvbuf,(int) (w * scaling), (int) (h * scaling), scalebuf);
      src = scalebuf;
    }
!   gl_putbox(x + x_pos, y + y_pos, (int) (w * scaling), (int) (h * scaling), src);
  }
- 
  
  static void flip_page(void) {
--- 221,236 ----
                             int w, int h, int x, int y) {
    uint8_t *src = yuvbuf;
!   uint32_t sw, sh;
!   
!   emms();
!   sw = (uint32_t) (w * scaling);
!   sh = (uint32_t) (h * scaling);
    yuv2rgb(yuvbuf, image[0], image[1], image[2], w, h, orig_w * BYTESPERPIXEL, stride[0], stride[1]);
    if (scalebuf) {
!     gl_scalebox(w, h, yuvbuf, sw, sh, scalebuf);
      src = scalebuf;
    }
!   gl_putbox((int)(x * scaling) + x_pos, (int)(y * scaling) + y_pos, sw, sh, src);
  }
  
  static void flip_page(void) {


_______________________________________________
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