[FFmpeg-devel] [PATCH] Port gradfun to libavfilter (GCI)

Martin Storsjö martin
Wed Dec 8 21:23:42 CET 2010


On Tue, 7 Dec 2010, Stefano Sabatini wrote:

> On date Monday 2010-12-06 21:11:34 -0500, Nolan L encoded:
> > +    
> > +    gf->chroma_w = -((-inlink->w) >> hsub);
> > +    gf->chroma_h = -((-inlink->h) >> vsub);
> 
> is this -((-foo)>>bar) required? (why not simply foo>>bar)?

This rounds up properly, for the cases where the luma width isn't evenly 
divisible for chroma subsampling.

// Martin



More information about the ffmpeg-devel mailing list