summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-19 16:51:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-19 21:17:25 +0100
commit1060e9ce5454e7ac009969ab2cf8f7cd83a69ac3 (patch)
tree10d3789701156b280f021c4180cee460cb39deaf /cmdutils.c
parent04f7eee70908ffdffd55e159a9a37a07fdf9187e (diff)
downloadffmpeg-1060e9ce5454e7ac009969ab2cf8f7cd83a69ac3.tar.gz
cmdutils: add -cpuflags.
This allows globally forcing specific cpuflags (or lack thereof) Useful for debugging and benchmarking Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 218c9f0b3a..9248c9ca49 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -535,6 +535,19 @@ int opt_max_alloc(const char *opt, const char *arg)
return 0;
}
+int opt_cpuflags(const char *opt, const char *arg)
+{
+ char *tail;
+ long flags = strtol(arg, &tail, 10);
+
+ if (*tail) {
+ av_log(NULL, AV_LOG_FATAL, "Invalid cpuflags \"%s\".\n", arg);
+ exit_program(1);
+ }
+ av_force_cpu_flags(flags);
+ return 0;
+}
+
int opt_codec_debug(const char *opt, const char *arg)
{
av_log_set_level(AV_LOG_DEBUG);