[MPlayer-dev-eng] -vop scale
Michael Niedermayer
michaelni at gmx.at
Thu Jul 18 16:33:15 CEST 2002
Hi
On Thursday 18 July 2002 15:46, Kim Minh Kaplan wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> >>> + if(vf->priv->w==-3)
> >>> vf->priv->w=(int)((double)vf->priv->h*width/height/2+0.5)*2; else
> >>
> >> it should be (vf->priv->h*width/height+1)&(~1) instead of using
> >> double/float
>
> Right, I forgot about this trick. I'll commit with this instead.
>
> > hmm, dosnt the double/float result in a more optimal resolution (can
> > round down if the aspect is more accurate then)
>
> No, it does has the same rounding resolution:
>
> [1...3[ -> 2
> [3...5[ -> 4
> etc...
oops, seems u are right :)
so for general alignment to a=2^x (... + a/2)&(~(a-1)) should be accurate
Michael
More information about the MPlayer-dev-eng
mailing list