Mercurial > mplayer.hg
changeset 2689:6a5b6b16d85c
Use standard aspect code
author | nick |
---|---|
date | Sun, 04 Nov 2001 17:22:22 +0000 |
parents | e9f6634c6374 |
children | a2bb142ce67d |
files | libvo/vo_vesa.c |
diffstat | 1 files changed, 7 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- 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) {