diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-04 17:22:22 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-04 17:22:22 +0000 |
commit | 44101a8d684671f5ee8249e503612fd3fcee119c (patch) | |
tree | 0fc741e7a3fca4db528f350ea83f5ca4b84af764 /libvo | |
parent | ab6ccafde348407bfbbca8b448301841fefe82ca (diff) | |
download | mpv-44101a8d684671f5ee8249e503612fd3fcee119c.tar.bz2 mpv-44101a8d684671f5ee8249e503612fd3fcee119c.tar.xz |
Use standard aspect code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2690 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_vesa.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c index 55a47fbce3..0d6dd029e2 100644 --- a/libvo/vo_vesa.c +++ b/libvo/vo_vesa.c @@ -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 @@ static uint32_t query_format(uint32_t format) 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 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3 { /* 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) { |