[MPlayer-dev-eng] autoexpand patch

jan gregor pamela at rak.bb.euroweb.sk
Sun Nov 7 19:06:12 CET 2004


Hello.

> > as 4/3 == 1.333, it's not an integer of course. set type to float, and
> > it will work.
Thanks, i didn't know, that sscanf can handle float numbers written like
x/y. Will be included in new patch.

> 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
This is handled by original code, which remains in filter, aspect is
added after these calculations.

> - 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

Shouldn't the test be height*aspect<width ? With > there comes one
problem:
original video size: 12x7
filter parameters:   expand=12:8::::4/3
8*4/3 < 12, that means that width is going to change. Then it changes to
10, so new video size is 10:8. There is a workaround for this - checking
new size against original and then adjusting, but that seems a bit ugly
to me.
Please, correct me if I got ssomething wrong.


Best regards

Jan Gregor




More information about the MPlayer-dev-eng mailing list