diff options
Diffstat (limited to 'doc/eval.texi')
-rw-r--r-- | doc/eval.texi | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/doc/eval.texi b/doc/eval.texi index d8c693f304..ac27750851 100644 --- a/doc/eval.texi +++ b/doc/eval.texi @@ -1,7 +1,7 @@ @chapter Expression Evaluation @c man begin EXPRESSION EVALUATION -When evaluating an arithemetic expression, Libav uses an internal +When evaluating an arithemetic expression, FFmpeg uses an internal formula evaluator, implemented through the @file{libavutil/eval.h} interface. @@ -72,6 +72,17 @@ integer. For example, "floor(-1.5)" is "-2.0". @item trunc(expr) Round the value of expression @var{expr} towards zero to the nearest integer. For example, "trunc(-1.5)" is "-1.0". + +@item sqrt(expr) +Compute the square root of @var{expr}. This is equivalent to +"(@var{expr})^.5". + +@item not(expr) +Return 1.0 if @var{expr} is zero, 0.0 otherwise. + +@item pow(x, y) +Compute the power of @var{x} elevated @var{y}, it is equivalent to +"(@var{x})^(@var{y})". @end table Note that: @@ -89,11 +100,6 @@ is equivalent to A*B + not(A)*C @end example -When A evaluates to either 1 or 0, that is the same as -@example -A*B + eq(A,0)*C -@end example - In your C code, you can extend the list of unary and binary functions, and define recognized constants, so that they are available for your expressions. |