[MPlayer-dev-eng] -vop scale

Michael Niedermayer michaelni at gmx.at
Thu Jul 18 00:26:38 CEST 2002


Hi

On Wednesday 17 July 2002 23:34, Felix Buenemann wrote:
> 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
hmm agree, files with odd dimensions are bad (user might transcode it to some 
yv12 based format and then problems appear ...

> give another (sub-)option to speicify custom w and h rouding that is used
> if specified?
hmm agree but perhaps we should find some cleaner format than just a:b:c:d its 
confusing if we add a few more options, and imho all scaler specific options 
should be passed through -vop scale instead of globally setting them

[...]

Michael



More information about the MPlayer-dev-eng mailing list