[MPlayer-dev-eng] [PATCH] panscanrange option
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Sep 26 11:50:41 CEST 2005
Hi,
On Sun, Sep 25, 2005 at 08:48:57PM -0400, The Wanderer wrote:
> Reimar Döffinger wrote:
> > .TP
> >+.B \-panscanrange <-19.0\-99.0> (experimental)
> >+Change the range of the pan-and-scan functionality.
> >+Positive values means you can zoom up to this many time the factor needed
> >+to remove the borders.
>
> This sentence a) is ungrammatical (at bare minimum, it needs "times"
> instead of "times" and either "mean" instead of "means" or "A positive
> value" instead of "Positive values"), and b) is not necessarily clear.
> Does it in fact mean "there is a factor which is necessary to remove the
> borders, and this specifies the multiple of that factor to which it is
> possible to zoom"? If not, then I don't know what is actually meant. (If
Yes, that is right.
> Do I understand correctly that negative values are just a different way
> of specifying some of the positive values - i.e., the results of
> '-panscanrange -3' would be identical to the results of '-panscanrange
> 4'? If not, then I don't understand what is being said here.
Yes, with one execption: when playing e.g. a 4:3 video on a 4:3 screen
you always have a border size of 0. No matter which positive value you
specify the 'w' and 'e' keys will do nothing at all (since x * 0 is
still 0).
And if -panscanrange -3 corresponds to -panscanrange 4 depends on movie
and monitor aspect.
Best try it out, I actually find only negative values really useful, but
others might have different opinions.
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.252
diff -u -r1.252 cfg-mplayer.h
--- cfg-mplayer.h 23 Sep 2005 22:35:02 -0000 1.252
+++ cfg-mplayer.h 25 Sep 2005 16:42:18 -0000
@@ -37,6 +37,7 @@
extern int vo_dbpp;
extern int vo_directrendering;
extern float vo_panscan;
+extern float vo_panscanrange;
/* only used at startup (setting these values from configfile) */
extern int vo_gamma_brightness;
extern int vo_gamma_saturation;
@@ -239,6 +240,7 @@
{"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"panscan", &vo_panscan, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 1.0, NULL},
+ {"panscanrange", &vo_panscanrange, CONF_TYPE_FLOAT, CONF_RANGE, -19.0, 99.0, NULL},
{"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"nograbpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 1, 0, NULL},
Index: DOCS/man/en/mplayer.1
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v
retrieving revision 1.1117
diff -u -r1.1117 mplayer.1
--- DOCS/man/en/mplayer.1 25 Sep 2005 16:20:41 -0000 1.1117
+++ DOCS/man/en/mplayer.1 25 Sep 2005 16:43:22 -0000
@@ -2280,6 +2280,15 @@
video output drivers.
.
.TP
+.B \-panscanrange <-19.0\-99.0> (experimental)
+Change the range of the pan-and-scan functionality (default: 1).
+Positive values mean multiples of the default range.
+Negative numbers mean you can zoom in up to a factor of -panscanrange+1.
+E.g. \-panscanrange -3 allows a zoom factor of up to 4.
+This feature is experimental.
+Do not report bugs unless you are using -vo gl.
+.
+.TP
.B \-refreshrate <Hz>
Set the monitor refreshrate in Hz.
Currently only supported by \-vo directx combined with the \-vm option.
Index: libvo/aspect.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/aspect.c,v
retrieving revision 1.17
diff -u -r1.17 aspect.c
--- libvo/aspect.c 28 Oct 2004 01:15:51 -0000 1.17
+++ libvo/aspect.c 25 Sep 2005 16:44:01 -0000
@@ -14,6 +14,7 @@
int vo_panscan_x = 0;
int vo_panscan_y = 0;
float vo_panscan_amount = 0;
+float vo_panscanrange = 1.0;
#include "video_out.h"
@@ -123,8 +124,12 @@
int fwidth,fheight;
int vo_panscan_area;
+ if (vo_panscanrange > 0) {
aspect(&fwidth,&fheight,A_ZOOM);
vo_panscan_area = (aspdat.scrh-fheight);
+ vo_panscan_area *= vo_panscanrange;
+ } else
+ vo_panscan_area = -vo_panscanrange * aspdat.scrh;
vo_panscan_amount = vo_fs ? vo_panscan : 0;
vo_panscan_x = vo_panscan_area * vo_panscan_amount * aspdat.asp;
More information about the MPlayer-dev-eng
mailing list