diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-09-02 15:55:27 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-09-02 17:14:21 +0300 |
commit | 7a6c288c2b5b1653d3a70f8d5511b31cf5156894 (patch) | |
tree | f262c1a94fe8e4ddd5e1c23d4e662e6653be3936 /libswscale | |
parent | b5cf307d0f85aff434342e41beb33b39df8d553f (diff) |
swscale/tests/swscale: add cpuflags option
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/tests/swscale.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c index 58c211453a..da6a41b779 100644 --- a/libswscale/tests/swscale.c +++ b/libswscale/tests/swscale.c @@ -25,6 +25,7 @@ #include <stdarg.h> #undef HAVE_AV_CONFIG_H +#include "libavutil/cpu.h" #include "libavutil/imgutils.h" #include "libavutil/mem.h" #include "libavutil/avutil.h" @@ -382,6 +383,14 @@ int main(int argc, char **argv) fprintf(stderr, "could not open '%s'\n", argv[i + 1]); goto error; } + } else if (!strcmp(argv[i], "-cpuflags")) { + unsigned flags = av_get_cpu_flags(); + int ret = av_parse_cpu_caps(&flags, argv[i + 1]); + if (ret < 0) { + fprintf(stderr, "invalid cpu flags %s\n", argv[i + 1]); + return ret; + } + av_force_cpu_flags(flags); } else if (!strcmp(argv[i], "-src")) { srcFormat = av_get_pix_fmt(argv[i + 1]); if (srcFormat == AV_PIX_FMT_NONE) { |