[MPlayer-dev-eng] vo_sdl aspect
Felix Buenemann
atmosfear at users.sourceforge.net
Sat Sep 29 05:39:18 CEST 2001
On Friday, 28. September 2001 15:45, Stephen Davies wrote:
> > btw. Steve, can you point me to a good website about these issues, I'm
> > sure you have digged far enough in this direction to have found one.
>
> Hi Felix,
>
> I've appended the README I wrote to try to explain this for my previous
> patch.
>
looking at the facts I came to the following conclusions:
> For me, I got to understand it properly like so:
>
> 1) Aspect ratio of input files
[snip]
For source aspect ratio we'll assume 1:1 as default, as it's used by divx.
Now in case of mpeg1/2 we parse the aspect field from the header and map it
to the correct aspect ratio, ie:
2 -> used with 720x576 PAL DVD -> 4:3 -> 768x576
3 -> used with 720x576 PAL Widescreen DVD -> 16:9 -> 1024x576
8 -> used with 352x288 PAL VCD -> 4:3 -> 384x288
12 -> used with 352x240 NTSC VCD -> 4:3 (?) -> 352x264
I need this test video samples to discover missing aspect header values (or a
list of those values with associated aspect):
(1:1 aspect means no resizing whereas 4:3 means for me divide height by 3 and
multiply it by 4 to get width or vice versa (ie. NTSC case))
- VGA mpeg for viewing on pc with 1:1 aspect ie. 320x240
- NTSC DVD sample 4:3
- NTSC DVD sample 16:9
- PAL SVCD sample 4:3
- PAL SVCD sample 16:9
- NTSC SVCD sample 4:3
- NTSC SVCD sample 16:9
- PAL VCD sample 16:9
- NTSC VCD sample 16:9
Additionally there should be a switch to specify aspect manually like for bad
aspect VGA divx or whatever so ie. -aspect 2.35:1 or -aspect 1.85:1 or 16:9,
you get the idea...
The x and y values go into the dstwidth and dstheight, of course only if not
overridden by -x and -y or -xy commandline switch.
>
> 2) Aspect ratio of output display
[snip]
Yes this should be devided into this two parts:
1. correct for non 4:3 resolutions like 1280x1024, doesn't need switch for
override.
2. correct for non 4:3 monitor visible area, therefore add a switch
-monitoraspect with default 4:3, sample usage: -monitoraspect 43.2:29.5 if
you had 43.2cm visible width and 29.5cm visible height.
these two points are already implemented in vo_sdl.c's aspect() and only need
addition of the cmdline switch and maybe little rewrite so it won't downscale
(already done locally).
In generalizing this stuff aspect code should be able to do this:
1. no scaling, for vo's that don't do scaling anyways
2. downscaling for vo's that support it (I guess SVGAlib and OpenGL do)
3. upscaling for vo's that support it (XVideo, mga?, xmga?, generally HW YUV
scalers)
Though not all xvideo drivers/cards do not allow, so maybe add an additional
switch like -scale none/up/down. down here assumes that upscaling is also
supported, if there are cases where that's untrue also option both could be
added and downscaling limited to what the name says.
Maybe a feature interesting for tv out users could use a 720x576 res with
monitoraspect 4:3 to get correct scaling. Can this be assumed correct?
>
> Regards,
> Steve Davies
>
--
Best Regards,
Atmos
_____
The three great virtues of a programmer: laziness, impatience, and hubris.
- Larry Wall
More information about the MPlayer-dev-eng
mailing list