[MPlayer-dev-eng] autoexpand patch

Arpi arpi at mplayerhq.hu
Fri Nov 5 16:25:30 CET 2004


Hi,

> > I have inserted aspect option to vf_expand.c as suggested here, with one
> > exception: aspect is not defined like x/y, but there are 2 separate
> > parameters named ratio_x and ratio_y. Functionality is the same, only
> > "/" did problems with buitin checks on parameters, because it expected
> > it to be one integer value. Maybe there was some workaround (type of
> > parameter other than integer), but I am not too familiar with mplayer
> > source code, so I simply split it.
> 
> as 4/3 == 1.333, it's not an integer of course. set type to float, and
> it will work.

also, it should take care of optional width and height params:

- if width is given, then your code should calculate height as width/aspect
- if height is given, it should calculate width as height*aspect
- if both width & height given, it should check both cases, and choose the
  one which fits to the width*height window:
     if(height*aspect>width)
        height=width/aspect
     else
        width=height*aspect


A'rpi / MPlayer, Astral & ESP-team

--
MPlayer's new image: happiness & peace & cosmetics & vmiklos




More information about the MPlayer-dev-eng mailing list