[Mplayer-cvslog] CVS: main/libvo vo_vesa.c,1.14,1.15
Nick Kurshev
nick at mplayer.dev.hu
Sun Oct 21 16:02:27 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv10724/main/libvo
Modified Files:
vo_vesa.c
Log Message:
Again changed logic:
-screenw, -screenh - force user video mode
-x, -y - force userdefined prescaling
-zoom - activates prescaling
-fs - scales prescaling to fullscreen
(meaningless with -zoom)
So full command line should be:
mplayer -vo vesa -screenw WWW -screenh HHH -bpp BPP -x XXX -y YYY -zoom -fs filename
And you will be able to watch movies in 16:9 format with bold black
border at top and bottom of screen.
Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vo_vesa.c 21 Oct 2001 12:50:45 -0000 1.14
+++ vo_vesa.c 21 Oct 2001 14:02:09 -0000 1.15
@@ -343,7 +343,7 @@
* bit 0 (0x01) means fullscreen (-fs)
* bit 1 (0x02) means mode switching (-vm)
* bit 2 (0x04) enables software scaling (-zoom)
- * bit 3 (0x08) enables flipping (-flip)
+ * bit 3 (0x08) enables flipping (-flip) (NK: and for what?)
*/
static uint32_t
init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
@@ -362,7 +362,7 @@
printf("vo_vesa: switch -flip is not supported\n");
}
if(flags & 0x04) vesa_zoom = 1;
- if(flags & 0x01) vesa_zoom = 2;
+ if(flags & 0x01 && vesa_zoom) vesa_zoom = 2;
if((err=vbeInit()) != VBE_OK) { PRINT_VBE_ERR("vbeInit",err); return -1; }
memcpy(vib.VESASignature,"VBE2",4);
if((err=vbeGetControllerInfo(&vib)) != VBE_OK)
@@ -434,8 +434,15 @@
printf("\nvo_vesa: Modes in detail:\n");
}
mode_ptr = vib.VideoModePtr;
- w = vo_screenwidth ? vo_screenwidth : width;
- h = vo_screenheight ? vo_screenheight : height;
+ if(vesa_zoom)
+ {
+ image_width = d_width;
+ image_height= d_height;
+ }
+ if(vo_screenwidth) w = vo_screenwidth;
+ else w = max(image_width,width);
+ if(vo_screenheight) h = vo_screenheight;
+ else h = max(image_height,height);
for(i=0;i < num_modes;i++)
{
if((err=vbeGetModeInfo(mode_ptr[i],&vmib)) != VBE_OK)
@@ -497,14 +504,11 @@
{
/* software scale */
if(vesa_zoom > 1)
- {
- image_width = video_mode_info.XResolution;
- image_height = video_mode_info.YResolution;
- }
- else
- vesa_aspect(width,height,
+ vesa_aspect(image_width,image_height,
video_mode_info.XResolution,video_mode_info.YResolution,
&image_width,&image_height);
+/* 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();
@@ -553,6 +557,7 @@
PRINT_VBE_ERR("vbeSaveState",err);
return -1;
}
+/* Below 'return -1' is impossible */
if((err=vbeSetMode(video_mode,NULL)) != VBE_OK)
{
PRINT_VBE_ERR("vbeSetMode",err);
More information about the MPlayer-cvslog
mailing list