new monitorpixelaspect option, esp. useful for xinerama setups with upcoming patch

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18106 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-04-15 20:50:33 +00:00
parent a3713ceb29
commit 02c0f0258f
3 changed files with 12 additions and 0 deletions

View File

@ -2505,6 +2505,13 @@ Set the aspect ratio of your monitor or TV screen.
.PD 1
.
.TP
.B \-monitorpixelaspect <ratio> (also see \-aspect)
Set the aspect of a single pixel of your monitor or TV screen (default: disabled).
Overrides the \-monitoraspect setting.
A value of 0 disables, a value of 1 means square pixels
(correct for (almost?) all LCDs).
.
.TP
.B \-nodouble
Disables double buffering, mostly for debugging purposes.
Double buffering fixes flicker by storing two frames in memory, and

View File

@ -109,6 +109,7 @@ extern int nortc;
/* from libvo/aspect.c */
extern float monitor_aspect;
extern float monitor_pixel_aspect;
extern int sws_flags;
extern int readPPOpt(void *conf, char *arg);
@ -224,6 +225,7 @@ m_option_t mplayer_opts[]={
{"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
// set aspect ratio of monitor - useful for 16:9 TVout
{"monitoraspect", &monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, NULL},
{"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
// video mode switching: (x11,xv,dga)
{"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL},

View File

@ -19,6 +19,7 @@ float vo_panscanrange = 1.0;
#include "video_out.h"
float monitor_aspect=4.0/3.0;
float monitor_pixel_aspect=0;
extern float movie_aspect;
static struct {
@ -53,6 +54,8 @@ void aspect_save_screenres(int scrw, int scrh){
#endif
aspdat.scrw = scrw;
aspdat.scrh = scrh;
if (monitor_pixel_aspect)
monitor_aspect = monitor_pixel_aspect * scrw / scrh;
}
/* aspect is called with the source resolution and the