[FFmpeg-devel] [PATCH] avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT

Clément Bœsch u at pkh.me
Wed Jan 27 17:21:42 CET 2016


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.buitenhuis at 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

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160127/00edb40b/attachment.sig>


More information about the ffmpeg-devel mailing list