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
d757f751
Commit
d757f751
authored
Apr 11, 2013
by
highgod0401
Committed by
Michael Niedermayer
Apr 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmdutils: add opencl command line options to ffmpeg
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
567feaaf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
cmdutils.c
cmdutils.c
+24
-0
cmdutils.h
cmdutils.h
+4
-0
cmdutils_common_opts.h
cmdutils_common_opts.h
+3
-0
No files found.
cmdutils.c
View file @
d757f751
...
...
@@ -56,6 +56,10 @@
#include <sys/time.h>
#include <sys/resource.h>
#endif
#if CONFIG_OPENCL
#include "libavutil/opencl.h"
#endif
static
int
init_report
(
const
char
*
env
);
...
...
@@ -955,6 +959,26 @@ int opt_timelimit(void *optctx, const char *opt, const char *arg)
return
0
;
}
#if CONFIG_OPENCL
int
opt_opencl
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
)
{
char
*
key
,
*
value
;
const
char
*
opts
=
arg
;
int
ret
=
0
;
while
(
*
opts
)
{
ret
=
av_opt_get_key_value
(
&
opts
,
"="
,
":"
,
0
,
&
key
,
&
value
);
if
(
ret
<
0
)
return
ret
;
ret
=
av_opencl_set_option
(
key
,
value
);
if
(
ret
<
0
)
return
ret
;
if
(
*
opts
)
opts
++
;
}
return
ret
;
}
#endif
void
print_error
(
const
char
*
filename
,
int
err
)
{
char
errbuf
[
128
];
...
...
cmdutils.h
View file @
d757f751
...
...
@@ -90,6 +90,10 @@ int opt_cpuflags(void *optctx, const char *opt, const char *arg);
int
opt_codec_debug
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
);
#if CONFIG_OPENCL
int
opt_opencl
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
);
#endif
/**
* Limit the execution time.
*/
...
...
cmdutils_common_opts.h
View file @
d757f751
...
...
@@ -19,3 +19,6 @@
{
"report"
,
0
,
{(
void
*
)
opt_report
},
"generate a report"
},
{
"max_alloc"
,
HAS_ARG
,
{.
func_arg
=
opt_max_alloc
},
"set maximum size of a single allocated block"
,
"bytes"
},
{
"cpuflags"
,
HAS_ARG
|
OPT_EXPERT
,
{.
func_arg
=
opt_cpuflags
},
"force specific cpu flags"
,
"flags"
},
#if CONFIG_OPENCL
{
"opencl_options"
,
HAS_ARG
,
{.
func_arg
=
opt_opencl
},
"set OpenCL environment options"
},
#endif
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