[MPlayer-dev-eng] -vop scale

Felix Buenemann atmosfear at users.sourceforge.net
Wed Jul 17 23:34:29 CEST 2002


On Wednesday 17 July 2002 22:28, Michael Niedermayer wrote:
> Hi
>
> On Wednesday 17 July 2002 21:54, Arpi wrote:
> > Hi,
> >
> > > +    case IMGFMT_YUY2:		/* YUY2 needs w rounded to 2 */
> > > +	if(vf->priv->w==-3) vf->priv->w=(int)((double)vf->priv->h*w
> > > idth/height/2+0.5)*2; else
> >
> > it should be (vf->priv->h*width/height+1)&(~1) instead of using
> > double/float
>
> hmm, dosnt the double/float result in a more optimal resolution (can round
> down if the aspect is more accurate then) allthough for %2==0 it doesnt
> matter much imho but for %16==0 it might
>
> or perhaps
> ((vf->priv->h*width + 2*height) / (2*height))*2 might work too

my own method is value += value%2 :) but it isn't more accurate either and 
less efficient ;)

Anyways, why don't always round to two (regardsless of imgfmt) and only give 
another (sub-)option to speicify custom w and h rouding that is used if 
specified?

> Michael

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-dev-eng mailing list