[MPlayer-dev-eng] [PATCH] dsize negative scale values

Oded Shimon ods15 at ods15.dyndns.org
Mon Jul 4 12:50:52 CEST 2005


On Mon, Jul 04, 2005 at 03:33:29AM -0700, Trent Piepho wrote:
> On Mon, 4 Jul 2005, Oded Shimon wrote:
> > On Mon, Jul 04, 2005 at 12:22:57AM -0700, Trent Piepho wrote:
> > > How about....
> > > 
> > > dsize=x:y:aspect_method
> > > 
> > > x or y = 0, as if you had specified the original size
> > > aspect_method = 0 Preserve aspect, treat x:y as a minimum size (default)
> > .. as in, upscale
> > > aspect_method = 1 Preserve aspect, treat x:y as a maximum size
> > as in, downscale...
> > > apsect_method = 2 Ignore the aspect ratio, just use x:y
> > 
> > If you haven't noticed, what you just described is (almost) EXACTLY the 
> > same as what I've done!! Only described differently and using different 
> > numbers...
> 
> Well, you have a lot more numbers.  It's not clear to me how x = -2 and
> aspect_method = 3 are supposed to interact.

My patch didn't include any x=-2 .. that was only in his patch.. i think 
you're confusing patches and that's why you think it's complicated :)

Once again, in my _original_ patch:
dsize=w:h:a

w and h can be -2 or bigger. -2 means original display resolution, -1 mean 
original resolution (just like '0' in what you described.)

a can be: -1, do nothing. 0 - keep aspect, use w:h as MAXIMUM, 1 - keep 
aspect, use w:h as MINIMUM. 2, 3 - same thing, only a different aspect...

> > > If you want to:
> > > Upscale to the correct aspect, dsize=0:0:0
> > > Downscale to the correct aspect, dsize=0:0:1
> > > Fit in 800x600 with the correct aspect, dsize=800:600:1
> > > Just horizontally scale to get the correct aspect, dsize=9999:0:1
> > > Just use 640x480 no matter what, dsize=640:480:2
> > > 
> > > Is there any reasonable thing that a person would want to do that you can't
> > > easily do this way?
> > 
> > You forgot only one thing - there are TWO different kinds of aspects. 
> > original aspect and display aspect. This is the only "complexity" added, 
> 
> Why is it necessary?  The pixel aspect ratio of a NTSC SVCD is 15:11, which
> gives it a picture aspect ratio near 4:3.  If you wanted to pretend a SVCD had
> square 1:1 pixels, which they don't, then the picture aspect ratio would be
> 1:1.  But why would you ever want to do that?  What you'd be asking is,
> "pretend the pixels are an aspect they're not, and then preserve this pretend
> aspect." It just doesn't seem a reasonable thing to do.  Can anyone tell me,
> why you would want to do this?

TBH, I have absoloutely no idea what you just babbled about 15:11 or 
whatever. Lemme explain it like this - vf_dsize recieves _FOUR_ numbers 
from mplayer's internals:
width
height
d_width
d_height

width and height are the resolution of the actual picture.
d_width and d_height are the intended picture display resolution.

ALL what dsize does, is change d_width and d_height.

In the case of a 480x480 SVCD movie:
width=480
height=480
d_width=640
d_height=480

from this, dsize can calculate 2 different "aspects":
width/height
and
d_width/d_height

The only useful aspect for me personally, is d_width/d_height . I really 
don't care about the "original resolution". However, for some people, it IS 
useful (RC mentioned he needed this, could you explain why BTW? I'm 
curious..).

So, in order to please everybody, I let the USER choose which aspect should 
dsize use.


Please please please tell me that's clear enough. I'm tired of typing...

- ods15




More information about the MPlayer-dev-eng mailing list