[MPlayer-cvslog] CVS: main/libmpcodecs vf_expand.c,1.29,1.30

Diego Biurrun diego at biurrun.de
Fri Jul 8 12:39:21 CEST 2005


On Fri, Jul 08, 2005 at 09:39:26AM +0300, Oded Shimon wrote:
> On Thu, Jul 07, 2005 at 11:32:03PM +0200, Reimar D?ffinger wrote:
> > and also: what on earth are you trying to do with
> > that code?? simply rounding down? Then just do
> > vf->priv->exp_w -= vf->priv->exp_w % vf->priv->round;
> 
> No, round up. These are the possible ways to do it:
> 
> if (x % r) x += (r - x % r);
> x  = (1 + (x - 1) / r) * r;
> x += (r - 1 - (x + 1) % r);
> 
> I couldn't decide on which one is most readable... Maybe I should just add 
> a comment?...

A comment never hurts, so add one.

Diego




More information about the MPlayer-cvslog mailing list