Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
d58ed64a
Commit
d58ed64a
authored
Jun 06, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eval: add support for pow() function
It is a more search-friendly alternative to the ^ operator.
parent
263f57c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
eval.texi
doc/eval.texi
+4
-0
avutil.h
libavutil/avutil.h
+1
-1
eval.c
libavutil/eval.c
+5
-0
No files found.
doc/eval.texi
View file @
d58ed64a
...
@@ -79,6 +79,10 @@ Compute the square root of @var{expr}. This is equivalent to
...
@@ -79,6 +79,10 @@ Compute the square root of @var{expr}. This is equivalent to
@item not(expr)
@item not(expr)
Return 1.0 if @var{expr} is zero, 0.0 otherwise.
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
@end table
Note that:
Note that:
...
...
libavutil/avutil.h
View file @
d58ed64a
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 6
#define LIBAVUTIL_VERSION_MINOR 6
#define LIBAVUTIL_VERSION_MICRO
0
#define LIBAVUTIL_VERSION_MICRO
1
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
libavutil/eval.c
View file @
d58ed64a
...
@@ -290,6 +290,7 @@ static int parse_primary(AVExpr **e, Parser *p)
...
@@ -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
,
"trunc"
))
d
->
type
=
e_trunc
;
else
if
(
strmatch
(
next
,
"sqrt"
))
d
->
type
=
e_sqrt
;
else
if
(
strmatch
(
next
,
"sqrt"
))
d
->
type
=
e_sqrt
;
else
if
(
strmatch
(
next
,
"not"
))
d
->
type
=
e_not
;
else
if
(
strmatch
(
next
,
"not"
))
d
->
type
=
e_not
;
else
if
(
strmatch
(
next
,
"pow"
))
d
->
type
=
e_pow
;
else
{
else
{
for
(
i
=
0
;
p
->
func1_names
&&
p
->
func1_names
[
i
];
i
++
)
{
for
(
i
=
0
;
p
->
func1_names
&&
p
->
func1_names
[
i
];
i
++
)
{
if
(
strmatch
(
next
,
p
->
func1_names
[
i
]))
{
if
(
strmatch
(
next
,
p
->
func1_names
[
i
]))
{
...
@@ -643,6 +644,10 @@ int main(void)
...
@@ -643,6 +644,10 @@ int main(void)
"not(1)"
,
"not(1)"
,
"not(NAN)"
,
"not(NAN)"
,
"not(0)"
,
"not(0)"
,
"pow(0,1.23)"
,
"pow(PI,1.23)"
,
"PI^1.23"
,
"pow(-1,1.23)"
,
NULL
NULL
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment