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
8b81eabe
Commit
8b81eabe
authored
Oct 26, 2017
by
James Darnley
Committed by
James Darnley
Dec 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil: add AVX-512 flags
parent
b7a3d1f2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
2 deletions
+14
-2
Changelog
Changelog
+1
-0
APIchanges
doc/APIchanges
+3
-0
cpu.c
libavutil/cpu.c
+5
-1
cpu.h
libavutil/cpu.h
+1
-0
cpu.c
libavutil/tests/cpu.c
+1
-0
version.h
libavutil/version.h
+1
-1
cpu.h
libavutil/x86/cpu.h
+2
-0
No files found.
Changelog
View file @
8b81eabe
...
...
@@ -27,6 +27,7 @@ version <next>:
- video setrange filter
- nsp demuxer
- support LibreSSL (via libtls)
- AVX-512/ZMM support added
version 3.4:
...
...
doc/APIchanges
View file @
8b81eabe
...
...
@@ -15,6 +15,9 @@ libavutil: 2017-10-21
API changes, most recent first:
2017-12-xx - xxxxxxx - lavu 56.7.100 - cpu.h
AVX-512 flags added.
2017-xx-xx - xxxxxxx - lavc 58.8.100 - avcodec.h
The MediaCodec decoders now support AVCodecContext.hw_device_ctx.
...
...
libavutil/cpu.c
View file @
8b81eabe
...
...
@@ -80,7 +80,8 @@ void av_force_cpu_flags(int arg){
AV_CPU_FLAG_XOP
|
AV_CPU_FLAG_FMA3
|
AV_CPU_FLAG_FMA4
|
AV_CPU_FLAG_AVX2
))
AV_CPU_FLAG_AVX2
|
AV_CPU_FLAG_AVX512
))
&&
!
(
arg
&
AV_CPU_FLAG_MMX
))
{
av_log
(
NULL
,
AV_LOG_WARNING
,
"MMX implied by specified flags
\n
"
);
arg
|=
AV_CPU_FLAG_MMX
;
...
...
@@ -126,6 +127,7 @@ int av_parse_cpu_flags(const char *s)
#define CPUFLAG_AVX2 (AV_CPU_FLAG_AVX2 | CPUFLAG_AVX)
#define CPUFLAG_BMI2 (AV_CPU_FLAG_BMI2 | AV_CPU_FLAG_BMI1)
#define CPUFLAG_AESNI (AV_CPU_FLAG_AESNI | CPUFLAG_SSE42)
#define CPUFLAG_AVX512 (AV_CPU_FLAG_AVX512 | CPUFLAG_AVX2)
static
const
AVOption
cpuflags_opts
[]
=
{
{
"flags"
,
NULL
,
0
,
AV_OPT_TYPE_FLAGS
,
{
.
i64
=
0
},
INT64_MIN
,
INT64_MAX
,
.
unit
=
"flags"
},
#if ARCH_PPC
...
...
@@ -154,6 +156,7 @@ int av_parse_cpu_flags(const char *s)
{
"3dnowext"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
CPUFLAG_3DNOWEXT
},
.
unit
=
"flags"
},
{
"cmov"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
AV_CPU_FLAG_CMOV
},
.
unit
=
"flags"
},
{
"aesni"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
CPUFLAG_AESNI
},
.
unit
=
"flags"
},
{
"avx512"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
CPUFLAG_AVX512
},
.
unit
=
"flags"
},
#elif ARCH_ARM
{
"armv5te"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
AV_CPU_FLAG_ARMV5TE
},
.
unit
=
"flags"
},
{
"armv6"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
AV_CPU_FLAG_ARMV6
},
.
unit
=
"flags"
},
...
...
@@ -216,6 +219,7 @@ int av_parse_cpu_caps(unsigned *flags, const char *s)
{
"3dnowext"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
AV_CPU_FLAG_3DNOWEXT
},
.
unit
=
"flags"
},
{
"cmov"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
AV_CPU_FLAG_CMOV
},
.
unit
=
"flags"
},
{
"aesni"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
AV_CPU_FLAG_AESNI
},
.
unit
=
"flags"
},
{
"avx512"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{
.
i64
=
AV_CPU_FLAG_AVX512
},
.
unit
=
"flags"
},
#define CPU_FLAG_P2 AV_CPU_FLAG_CMOV | AV_CPU_FLAG_MMX
#define CPU_FLAG_P3 CPU_FLAG_P2 | AV_CPU_FLAG_MMX2 | AV_CPU_FLAG_SSE
...
...
libavutil/cpu.h
View file @
8b81eabe
...
...
@@ -55,6 +55,7 @@
#define AV_CPU_FLAG_FMA3 0x10000 ///< Haswell FMA3 functions
#define AV_CPU_FLAG_BMI1 0x20000 ///< Bit Manipulation Instruction Set 1
#define AV_CPU_FLAG_BMI2 0x40000 ///< Bit Manipulation Instruction Set 2
#define AV_CPU_FLAG_AVX512 0x100000 ///< AVX-512 functions: requires OS support even if YMM/ZMM registers aren't used
#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
#define AV_CPU_FLAG_VSX 0x0002 ///< ISA 2.06
...
...
libavutil/tests/cpu.c
View file @
8b81eabe
...
...
@@ -73,6 +73,7 @@ static const struct {
{
AV_CPU_FLAG_BMI1
,
"bmi1"
},
{
AV_CPU_FLAG_BMI2
,
"bmi2"
},
{
AV_CPU_FLAG_AESNI
,
"aesni"
},
{
AV_CPU_FLAG_AVX512
,
"avx512"
},
#endif
{
0
}
};
...
...
libavutil/version.h
View file @
8b81eabe
...
...
@@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MINOR
6
#define LIBAVUTIL_VERSION_MINOR
7
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
libavutil/x86/cpu.h
View file @
8b81eabe
...
...
@@ -50,6 +50,7 @@
#define X86_FMA4(flags) CPUEXT(flags, FMA4)
#define X86_AVX2(flags) CPUEXT(flags, AVX2)
#define X86_AESNI(flags) CPUEXT(flags, AESNI)
#define X86_AVX512(flags) CPUEXT(flags, AVX512)
#define EXTERNAL_AMD3DNOW(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AMD3DNOW)
#define EXTERNAL_AMD3DNOWEXT(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AMD3DNOWEXT)
...
...
@@ -79,6 +80,7 @@
#define EXTERNAL_AVX2_FAST(flags) CPUEXT_SUFFIX_FAST2(flags, _EXTERNAL, AVX2, AVX)
#define EXTERNAL_AVX2_SLOW(flags) CPUEXT_SUFFIX_SLOW2(flags, _EXTERNAL, AVX2, AVX)
#define EXTERNAL_AESNI(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AESNI)
#define EXTERNAL_AVX512(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AVX512)
#define INLINE_AMD3DNOW(flags) CPUEXT_SUFFIX(flags, _INLINE, AMD3DNOW)
#define INLINE_AMD3DNOWEXT(flags) CPUEXT_SUFFIX(flags, _INLINE, AMD3DNOWEXT)
...
...
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