mirror of https://github.com/mpv-player/mpv
Fixed zooming bug
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2305 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a46e600619
commit
d280041fcc
|
@ -385,7 +385,7 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
|
||||||
}
|
}
|
||||||
if(verbose)
|
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);
|
printf("vo_vesa: Total modes found: %u\n",num_modes);
|
||||||
mode_ptr = vib.VideoModePtr;
|
mode_ptr = vib.VideoModePtr;
|
||||||
printf("vo_vesa: Mode list:");
|
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");
|
printf("vo_vesa: Can't allocate temporary buffer\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if( vesa_zoom && format==IMGFMT_YV12 )
|
if( vesa_zoom )
|
||||||
{
|
{
|
||||||
/* software scale */
|
if( format==IMGFMT_YV12 )
|
||||||
image_width = video_mode_info.XResolution;
|
{
|
||||||
image_height = video_mode_info.YResolution;
|
/* software scale */
|
||||||
scale_xinc=(width << 16) / image_width - 2; /* needed for proper rounding */
|
image_width = video_mode_info.XResolution;
|
||||||
scale_yinc=(height << 16) / image_height + 2;
|
image_height = video_mode_info.YResolution;
|
||||||
SwScale_Init();
|
scale_xinc=(width << 16) / image_width - 2; /* needed for proper rounding */
|
||||||
if(verbose) printf("vo_vesa: Using SCALE\n");
|
scale_yinc=(height << 16) / image_height + 2;
|
||||||
}
|
SwScale_Init();
|
||||||
else
|
if(verbose) printf("vo_vesa: Using SCALE\n");
|
||||||
{
|
}
|
||||||
printf("vo_vesa: Can't apply zooming to non YV12 formats\n");
|
else
|
||||||
return -1;
|
{
|
||||||
|
printf("vo_vesa: Can't apply zooming to non YV12 formats\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if((video_mode_info.WinAAttributes & FRAME_MODE) == FRAME_MODE)
|
if((video_mode_info.WinAAttributes & FRAME_MODE) == FRAME_MODE)
|
||||||
win.idx = 0; /* frame A */
|
win.idx = 0; /* frame A */
|
||||||
|
|
Loading…
Reference in New Issue