Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-06 17:00:25 +0400
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-07 02:37:00 +0400
commitd58ed64a8953d07f33259317a2ea5856d0c91dfd (patch)
tree5ee73582d6bf13b685a9b09b771e9dc624ed7a80 /libavutil/eval.c
parent263f57c6d76b27e1895c4001f815824a463b1592 (diff)
eval: add support for pow() function
It is a more search-friendly alternative to the ^ operator.
Diffstat (limited to 'libavutil/eval.c')
-rw-r--r--libavutil/eval.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 331221515e..5ae90f06d1 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -290,6 +290,7 @@ static int parse_primary(AVExpr **e, Parser *p)
else if (strmatch(next, "trunc" )) d->type = e_trunc;
else if (strmatch(next, "sqrt" )) d->type = e_sqrt;
else if (strmatch(next, "not" )) d->type = e_not;
+ else if (strmatch(next, "pow" )) d->type = e_pow;
else {
for (i=0; p->func1_names && p->func1_names[i]; i++) {
if (strmatch(next, p->func1_names[i])) {
@@ -643,6 +644,10 @@ int main(void)
"not(1)",
"not(NAN)",
"not(0)",
+ "pow(0,1.23)",
+ "pow(PI,1.23)",
+ "PI^1.23",
+ "pow(-1,1.23)",
NULL
};