[FFmpeg-devel] [PATCH] lavu/eval: add clip function

Clément Bœsch u at pkh.me
Fri Jul 4 14:26:45 CEST 2014


On Fri, Jul 04, 2014 at 02:13:58PM +0200, Stefano Sabatini wrote:
> TODO: bump micro
> ---
>  doc/utils.texi   | 4 ++++
>  libavutil/eval.c | 6 +++++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/utils.texi b/doc/utils.texi
> index 5abfb0c..83ff8b0 100644
> --- a/doc/utils.texi
> +++ b/doc/utils.texi
> @@ -782,6 +782,10 @@ large numbers (usually 2^53 and larger).
>  Round the value of expression @var{expr} upwards to the nearest
>  integer. For example, "ceil(1.5)" is "2.0".
>  
> + at item clip(x, min, max)
> +Return the value of @var{x} clipped between @var{min} and
> + at var{max}. Result is undefined if @var{min} is greater than @var{max}.
> +

You should add an extra check, because depending on the build
configuration it can be used to make ffmpeg abort.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140704/92558b67/attachment.asc>


More information about the ffmpeg-devel mailing list