]> git.sesse.net Git - ffmpeg/blobdiff - doc/eval.texi
lavf: fix update_initial_durations() so it handles missing durations with the initial...
[ffmpeg] / doc / eval.texi
index b325b37dff6599879c1502ee79685e0068595151..c4b669fbcb4c6c5ceb1867f8e08353e779d4ef57 100644 (file)
@@ -98,6 +98,26 @@ point (@var{x}, @var{y}) from the origin.
 @item gcd(x, y)
 Return the greatest common divisor of @var{x} and @var{y}. If both @var{x} and
 @var{y} are 0 or either or both are less than zero then behavior is undefined.
+
+@item if(x, y)
+Evaluate @var{x}, and if the result is non-zero return the result of
+the evaluation of @var{y}, return 0 otherwise.
+
+@item ifnot(x, y)
+Evaluate @var{x}, and if the result is zero return the result of the
+evaluation of @var{y}, return 0 otherwise.
+
+@item taylor(expr, x) taylor(expr, x, id)
+Evaluate a taylor series at x.
+expr represents the LD(id)-th derivates of f(x) at 0. If id is not specified
+then 0 is assumed.
+note, when you have the derivatives at y instead of 0
+taylor(expr, x-y) can be used
+When the series does not converge the results are undefined.
+
+@item root(expr, max)
+Finds x where f(x)=0 in the interval 0..max.
+f() must be continuous or the result is undefined.
 @end table
 
 The following constants are available:
@@ -110,19 +130,20 @@ exp(1) (Euler's number), approximately 2.718
 golden ratio (1+sqrt(5))/2, approximately 1.618
 @end table
 
-Note that:
+Assuming that an expression is considered "true" if it has a non-zero
+value, note that:
 
 @code{*} works like AND
 
 @code{+} works like OR
 
-thus
+and the construct:
 @example
 if A then B else C
 @end example
 is equivalent to
 @example
-A*B + not(A)*C
+if(A,B) + ifnot(A,C)
 @end example
 
 In your C code, you can extend the list of unary and binary functions,