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
96a59cf3
Commit
96a59cf3
authored
Sep 26, 2011
by
Jason Garrett-Glaser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: XOP/FMA4 CPU detection support
parent
3d371f41
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
avutil.h
libavutil/avutil.h
+2
-2
cpu.c
libavutil/cpu.c
+2
-0
cpu.h
libavutil/cpu.h
+2
-0
cpu.c
libavutil/x86/cpu.c
+9
-0
No files found.
libavutil/avutil.h
View file @
96a59cf3
...
...
@@ -40,8 +40,8 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 1
0
#define LIBAVUTIL_VERSION_MICRO
2
#define LIBAVUTIL_VERSION_MINOR 1
1
#define LIBAVUTIL_VERSION_MICRO
0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
libavutil/cpu.c
View file @
96a59cf3
...
...
@@ -60,6 +60,8 @@ static const struct {
{
AV_CPU_FLAG_SSE4
,
"sse4.1"
},
{
AV_CPU_FLAG_SSE42
,
"sse4.2"
},
{
AV_CPU_FLAG_AVX
,
"avx"
},
{
AV_CPU_FLAG_XOP
,
"xop"
},
{
AV_CPU_FLAG_FMA4
,
"fma4"
},
{
AV_CPU_FLAG_3DNOW
,
"3dnow"
},
{
AV_CPU_FLAG_3DNOWEXT
,
"3dnowext"
},
#endif
...
...
libavutil/cpu.h
View file @
96a59cf3
...
...
@@ -38,6 +38,8 @@
#define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions
#define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions
#define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions
#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions
#define AV_CPU_FLAG_IWMMXT 0x0100 ///< XScale IWMMXT
#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
...
...
libavutil/x86/cpu.c
View file @
96a59cf3
...
...
@@ -133,6 +133,15 @@ int ff_get_cpu_flags_x86(void)
rval
&
AV_CPU_FLAG_SSE2
&&
!
(
ecx
&
0x00000040
))
{
rval
|=
AV_CPU_FLAG_SSE2SLOW
;
}
/* XOP and FMA4 use the AVX instruction coding scheme, so they can't be
* used unless the OS has AVX support. */
if
(
rval
&
AV_CPU_FLAG_AVX
)
{
if
(
ecx
&
0x00000800
)
rval
|=
AV_CPU_FLAG_XOP
;
if
(
ecx
&
0x00010000
)
rval
|=
AV_CPU_FLAG_FMA4
;
}
}
if
(
!
strncmp
(
vendor
.
c
,
"GenuineIntel"
,
12
))
{
...
...
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