summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-20 11:58:45 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-20 11:58:45 +0000
commitd280041fcc796e5d99d6c7da52bc00b9ce2b4903 (patch)
tree8c58d0a5520ae5bd27691ac89ffc09fe20b400d8 /libvo
parenta46e600619929beaf8dc27655b743eeb32683149 (diff)
downloadmpv-d280041fcc796e5d99d6c7da52bc00b9ce2b4903.tar.bz2
mpv-d280041fcc796e5d99d6c7da52bc00b9ce2b4903.tar.xz
Fixed zooming bug
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2305 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_vesa.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 8370599a4f..150ef358fd 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -385,7 +385,7 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
}
if(verbose)
{
- printf("vo_vesa: Requested mode: %ux%u@%x bpp=%u\n",width,height,format,bpp);
+ printf("vo_vesa: Requested mode: %ux%u@%u (%s)\n",width,height,bpp,vo_format_name(format));
printf("vo_vesa: Total modes found: %u\n",num_modes);
mode_ptr = vib.VideoModePtr;
printf("vo_vesa: Mode list:");
@@ -454,20 +454,23 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
printf("vo_vesa: Can't allocate temporary buffer\n");
return -1;
}
- if( vesa_zoom && format==IMGFMT_YV12 )
+ if( vesa_zoom )
{
- /* software scale */
- image_width = video_mode_info.XResolution;
- image_height = video_mode_info.YResolution;
- scale_xinc=(width << 16) / image_width - 2; /* needed for proper rounding */
- scale_yinc=(height << 16) / image_height + 2;
- SwScale_Init();
- if(verbose) printf("vo_vesa: Using SCALE\n");
- }
- else
- {
- printf("vo_vesa: Can't apply zooming to non YV12 formats\n");
- return -1;
+ if( format==IMGFMT_YV12 )
+ {
+ /* software scale */
+ image_width = video_mode_info.XResolution;
+ image_height = video_mode_info.YResolution;
+ scale_xinc=(width << 16) / image_width - 2; /* needed for proper rounding */
+ scale_yinc=(height << 16) / image_height + 2;
+ SwScale_Init();
+ if(verbose) printf("vo_vesa: Using SCALE\n");
+ }
+ else
+ {
+ printf("vo_vesa: Can't apply zooming to non YV12 formats\n");
+ return -1;
+ }
}
if((video_mode_info.WinAAttributes & FRAME_MODE) == FRAME_MODE)
win.idx = 0; /* frame A */