[MPlayer-dev-eng] -vop scale
Michael Niedermayer
michaelni at gmx.at
Wed Jul 17 22:28:30 CEST 2002
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
[...]
Michael
More information about the MPlayer-dev-eng
mailing list