# HG changeset patch # User nick # Date 1003647760 0 # Node ID 00f64d5858b88c71e67eceeb4566849eb45c5667 # Parent 2332ba356d037c4466a3b86160cb67ec81e5aa67 Bad fix of libmpeg2 zooming diff -r 2332ba356d03 -r 00f64d5858b8 libvo/vo_vesa.c --- a/libvo/vo_vesa.c Sun Oct 21 00:32:47 2001 +0000 +++ b/libvo/vo_vesa.c Sun Oct 21 07:02:40 2001 +0000 @@ -72,6 +72,8 @@ static int vesa_zoom=0; /* software scaling */ static unsigned int scale_xinc=0; static unsigned int scale_yinc=0; +static float aspect_factor; + static uint32_t image_width, image_height; /* source image dimension */ static uint32_t x_offset,y_offset; /* to center image on screen */ @@ -233,10 +235,36 @@ } } } + +static void __vbeCopySliceData(uint8_t *image,int x, int y, int w, int h) +{ + unsigned long i,j,image_offset,offset; + unsigned pixel_size,image_line_size,screen_line_size,x_shift; + pixel_size = (video_mode_info.BitsPerPixel+7)/8; + screen_line_size = video_mode_info.XResolution*pixel_size; + image_line_size = w*pixel_size; +#if 0 + if(image_width == video_mode_info.XResolution && w == image_width) + { + /* Special case for zooming */ + __vbeCopyBlock((y_offset+y)*screen_line_size,image,image_line_size*image_height); + } + else +#endif + { + x_shift = (x_offset+x)*pixel_size; + for(j=0,i=y_offset+y;j yres) { *image_height = yres; - *image_width = yres * factor; + *image_width = yres * aspect_factor; if(verbose) printf("vo_vesa: Y > X tehrefore *image=%ux%u\n",*image_width,*image_height); } }