On 1/27/2016 1:21 PM, Clément Bœsch wrote: > On Wed, Jan 27, 2016 at 03:21:34PM +0000, Derek Buitenhuis wrote: >> Libav, for some reason, merged this as a public API function. This will >> aid in future merges. >> >> A define is left for backwards compat, just in case some person >> used it, since it is in a public header. >> >> Signed-off-by: Derek Buitenhuis <derek.buitenh...@gmail.com> > [...] >> diff --git a/libavutil/common.h b/libavutil/common.h >> index 7b7bcbe..0f30073 100644 >> --- a/libavutil/common.h >> +++ b/libavutil/common.h >> @@ -55,8 +55,10 @@ >> /* assume b>0 */ >> #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) >> /* Fast a/(1<<b) rounded toward +inf. Assume a>=0 and b>=0 */ >> -#define FF_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \ >> +#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \ >> : ((a) + (1<<(b)) - >> 1) >> (b)) >> +/* Backwards compat. */ >> +#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT >> #define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b)) > > please add a \n between the two lines above > > And yes, unfortunately, even if it wasn't documented in the chroma > subsampling doc, people seemed to end up using it > (https://github.com/search?q=FF_CEIL_RSHIFT&type=Code&utf8=%E2%9C%93) > > Anyway, patch is fine, thanks
It could be placed inside an FF_API_ guard and scheduled for removal in two years as per usual. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel