[MPlayer-dev-eng] [PATCH] video filter: aspect correction

Christian Ohm chr.ohm at gmx.net
Thu Dec 19 10:02:13 CET 2002


hi.

> > i attached another patch i made while trying to implement this in vf_scale.c
> > (scale.diff). this reduces the code for the parameter calculation a bit. i
> > don't know if you call this cosmetics, if so, just ignore it :)
> 
> its' not only codmetics, but it changes the effect of that code.
> ie it does teh &~1 masking ONLY if it calculated the sizes. it allowed users
> to give odd resolutions. your version doesn't...
> i was close to aplpy it, but htere was a discussion about this part of the
> code long time ago i remembered.

ok... perhaps i'll look at it again when i have some time (not this weekend).

> > 	d_height = d_width * vf->priv->aspect * d_height / d_width;
> 
> in short: d_height*=vf->priv->aspect;
> 
> why to overcomplicate by *d_width and /d_width ?
> it's very misleading and useless.

well, it was the way i thought about it: i wanted the aspect (d_height /
d_width) multiplied by vf->priv->aspect, then multiply d_width by this to
get the new d_height... i actually noticed those two d_width's but didn't
think of changing it later... i you want to change it, go ahead; if you want
me to do it, you'll have to wait until after the weekend.

bye
christian ohm

-- 
Jehovah is an alien and still threatens this planet!



More information about the MPlayer-dev-eng mailing list