[MPlayer-dev-eng] [PATCH] dsize negative scale values
Oded Shimon
ods15 at ods15.dyndns.org
Mon Jul 4 05:43:38 CEST 2005
On Sun, Jul 03, 2005 at 01:29:54PM -0700, RC wrote:
> On Sun, 3 Jul 2005 22:36:32 +0300
> Oded Shimon <ods15 at ods15.dyndns.org> wrote:
>
> > But, it's impossible to do the 'keepaspect' thing with -1 or -2:
> > say I have this - I want a "bounding box" of 800x600 - which would
> > work for ANY aspect, WITHOUT distorting. It's IMPOSSIBLE currently,
> > and would still be impossible with your patch.
>
> Well, with mine: "dsize=800:-2" would keep the dimentions under 800x600
> for any videos with any aspect of 4/3 (1.333...) or above. I've never
> seen any videos with an aspect below 4/3, so I'd say you're very safe.
I have, quite a few. And it's quite annoying when it surprises me by
crashing MPlayer and locking up my terminal.. (I have to ssh from another
box to fix it!)
VO: [sdl] 800x654 => 800x654 BGR 16-bit [zoom]
A: 3.1 V: 3.1 A-V: 0.030 ct: 0.003 2/ 2 ??% ??% ??,?% 0 0
MPlayer interrupted by signal 11 in module: flip_page
(Please don't tell me to not use SDL. Not the point of this conversation)
> > and with my patch you can still do anything offered in your patch:
>
> I wish I could argue with you, but it will take me weeks to figure out
> how your dsize parameters are supposed to work.
>
> It also seems like you didn't do much testing with your patch.
>
> Any time I give a value for keepaspect of 0 or 2, and only one
> dimention (height OR width), it crashes (eg. dsize=400:0:2). Then
> again, maybe I just haven't figured out the parameters yet.
It crashes because it downscales, to 0:0 . That's a pretty crashing
resolution... I changed the params from what i said in this thread, i gave
imo a very good explanation of the params in the other thread, when i sent
the patch:
-1 - do nothing
0 - keep d_w/d_h aspect, by downscaling
1 - same, but upscale
2 - keep original w/h asoect, by downscaling
3 - same, but upscale
I honestly can't explain it better than that, it is not that complicated...
> A value of 0 for keepaspect doesn't seem to work right either.
> (eg "dsize=-1:-1:0")
hmm, those params are silly... -1 means original width or hieght. which are
most likely already identical to d_w and d_h, so dsize would effectively do
nothing.
> > yours: dsize=800:-2
> > mine: dsize=800:0:1 // or something like that, can't remember exact
> > "codes"
>
> It's scary that you wrote it, and you can't even figure out what
> parameters to use. I've been playing around with it for the past 15
> minutes, and I can't figure out what each of the parameters should do
> either. By trial, and error I've figured a few out, and even then,
> I'm not sure it would still work right if used on a video with a
> different aspect.
Yes, it all works, RTFS. :) I mentioned when i sent the patch, it still
needs better documenting. BTW, when i said I don't remember the "codes", I
was refferring to the '-2' which i didn't know what it meant. I just
checked, it's the same behavior.
I really don't want to flame, but seriously, this patch is not that
advanced...
On Sun, Jul 03, 2005 at 03:43:04PM -0700, Trent Piepho wrote:
> I do agree that all those dsize parameters were very complex. Why would you
> want something other than 0 = preserve aspect, 1 = don't preserve aspet?
There's a prescaled aspect and an original aspect, they are different, for
example in SVCD's. (the movie is res 480x480, so aspect is 1:1, but the
prescaled aspect is 4:3..). TBH, I see no reason you would ever want to use
the original aspect and not the prescaled one, but i offered the option
anyway - if it would really make it that much simpler, do you suggest I
remove it?...
- ods15
More information about the MPlayer-dev-eng
mailing list