# HG changeset patch # User nick # Date 1004894542 0 # Node ID 6a5b6b16d85c72ae3f974041a7fe388d04e4d475 # Parent e9f6634c63742086bfe8aca8fdcbe2625807caf3 Use standard aspect code diff -r e9f6634c6374 -r 6a5b6b16d85c libvo/vo_vesa.c --- a/libvo/vo_vesa.c Sun Nov 04 17:01:12 2001 +0000 +++ b/libvo/vo_vesa.c Sun Nov 04 17:22:22 2001 +0000 @@ -34,6 +34,7 @@ #include "sub.h" #include "linux/vbelib.h" #include "bswap.h" +#include "aspect.h" #include "../postproc/swscale.h" #include "../postproc/rgb2rgb.h" @@ -414,23 +415,6 @@ return retval; } -static void vesa_aspect(uint32_t width,uint32_t height, - uint32_t xres,uint32_t yres, - uint32_t *image_width,uint32_t *image_height) -{ - float aspect_factor; - aspect_factor = (float)width / height; - *image_width = xres; - *image_height = xres /aspect_factor; - if(verbose) printf("vo_vesa: aspect factor = %f(%ux%u) *image=%ux%u screen=%ux%u\n",aspect_factor,width,height,*image_width,*image_height,xres,yres); - if((*image_height) > yres) - { - *image_height = yres; - *image_width = yres * aspect_factor; - if(verbose) printf("vo_vesa: Y > X therefore *image=%ux%u\n",*image_width,*image_height); - } -} - static void paintBkGnd( void ) { int x_res = video_mode_info.XResolution; @@ -686,9 +670,12 @@ { /* software scale */ if(vesa_zoom > 1) - vesa_aspect(image_width,image_height, - video_mode_info.XResolution,video_mode_info.YResolution, - &image_width,&image_height); + { + aspect_save_orig(width,height); + aspect_save_prescale(d_width,d_height); + aspect_save_screenres(video_mode_info.XResolution,video_mode_info.YResolution); + aspect(&image_width,&image_height,A_ZOOM); + } else if(fs_mode) {