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
8410d6e9
Commit
8410d6e9
authored
Aug 20, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil: Refactor CPU extension availability macros
parent
b78b10c4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
34 deletions
+40
-34
cpu.h
libavutil/arm/cpu.h
+7
-6
cpu_internal.h
libavutil/cpu_internal.h
+7
-0
cpu.h
libavutil/x86/cpu.h
+26
-28
No files found.
libavutil/arm/cpu.h
View file @
8410d6e9
...
@@ -21,12 +21,13 @@
...
@@ -21,12 +21,13 @@
#include "config.h"
#include "config.h"
#include "libavutil/cpu.h"
#include "libavutil/cpu.h"
#include "libavutil/cpu_internal.h"
#define have_armv5te(flags)
(HAVE_ARMV5TE && ((flags) & AV_CPU_FLAG_ARMV5TE)
)
#define have_armv5te(flags)
CPUEXT(flags, ARMV5TE
)
#define have_armv6(flags)
(HAVE_ARMV6 && ((flags) & AV_CPU_FLAG_ARMV6)
)
#define have_armv6(flags)
CPUEXT(flags, ARMV6
)
#define have_armv6t2(flags)
(HAVE_ARMV6T2 && ((flags) & AV_CPU_FLAG_ARMV6T2)
)
#define have_armv6t2(flags)
CPUEXT(flags, ARMV6T2
)
#define have_vfp(flags)
(HAVE_VFP && ((flags) & AV_CPU_FLAG_VFP)
)
#define have_vfp(flags)
CPUEXT(flags, VFP
)
#define have_vfpv3(flags)
(HAVE_VFPV3 && ((flags) & AV_CPU_FLAG_VFPV3)
)
#define have_vfpv3(flags)
CPUEXT(flags, VFPV3
)
#define have_neon(flags)
(HAVE_NEON && ((flags) & AV_CPU_FLAG_NEON)
)
#define have_neon(flags)
CPUEXT(flags, NEON
)
#endif
/* AVUTIL_ARM_CPU_H */
#endif
/* AVUTIL_ARM_CPU_H */
libavutil/cpu_internal.h
View file @
8410d6e9
...
@@ -19,6 +19,13 @@
...
@@ -19,6 +19,13 @@
#ifndef AVUTIL_CPU_INTERNAL_H
#ifndef AVUTIL_CPU_INTERNAL_H
#define AVUTIL_CPU_INTERNAL_H
#define AVUTIL_CPU_INTERNAL_H
#include "cpu.h"
#define CPUEXT_SUFFIX(flags, suffix, cpuext) \
(HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
#define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext)
int
ff_get_cpu_flags_arm
(
void
);
int
ff_get_cpu_flags_arm
(
void
);
int
ff_get_cpu_flags_ppc
(
void
);
int
ff_get_cpu_flags_ppc
(
void
);
int
ff_get_cpu_flags_x86
(
void
);
int
ff_get_cpu_flags_x86
(
void
);
...
...
libavutil/x86/cpu.h
View file @
8410d6e9
...
@@ -21,38 +21,36 @@
...
@@ -21,38 +21,36 @@
#include "config.h"
#include "config.h"
#include "libavutil/cpu.h"
#include "libavutil/cpu.h"
#include "libavutil/cpu_internal.h"
#define CPUEXT(flags, suffix, cpuext) \
(HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
#define AV_CPU_FLAG_AMD3DNOW AV_CPU_FLAG_3DNOW
#define AV_CPU_FLAG_AMD3DNOW AV_CPU_FLAG_3DNOW
#define AV_CPU_FLAG_AMD3DNOWEXT AV_CPU_FLAG_3DNOWEXT
#define AV_CPU_FLAG_AMD3DNOWEXT AV_CPU_FLAG_3DNOWEXT
#define EXTERNAL_AMD3DNOW(flags) CPUEXT(flags, _EXTERNAL, AMD3DNOW)
#define EXTERNAL_AMD3DNOW(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, AMD3DNOW)
#define EXTERNAL_AMD3DNOWEXT(flags) CPUEXT(flags, _EXTERNAL, AMD3DNOWEXT)
#define EXTERNAL_AMD3DNOWEXT(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, AMD3DNOWEXT)
#define EXTERNAL_MMX(flags) CPUEXT(flags, _EXTERNAL, MMX)
#define EXTERNAL_MMX(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, MMX)
#define EXTERNAL_MMXEXT(flags) CPUEXT(flags, _EXTERNAL, MMXEXT)
#define EXTERNAL_MMXEXT(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, MMXEXT)
#define EXTERNAL_SSE(flags) CPUEXT(flags, _EXTERNAL, SSE)
#define EXTERNAL_SSE(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, SSE)
#define EXTERNAL_SSE2(flags) CPUEXT(flags, _EXTERNAL, SSE2)
#define EXTERNAL_SSE2(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, SSE2)
#define EXTERNAL_SSE3(flags) CPUEXT(flags, _EXTERNAL, SSE3)
#define EXTERNAL_SSE3(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, SSE3)
#define EXTERNAL_SSSE3(flags) CPUEXT(flags, _EXTERNAL, SSSE3)
#define EXTERNAL_SSSE3(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, SSSE3)
#define EXTERNAL_SSE4(flags) CPUEXT(flags, _EXTERNAL, SSE4)
#define EXTERNAL_SSE4(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, SSE4)
#define EXTERNAL_SSE42(flags) CPUEXT(flags, _EXTERNAL, SSE42)
#define EXTERNAL_SSE42(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, SSE42)
#define EXTERNAL_AVX(flags) CPUEXT(flags, _EXTERNAL, AVX)
#define EXTERNAL_AVX(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, AVX)
#define EXTERNAL_FMA4(flags) CPUEXT(flags, _EXTERNAL, FMA4)
#define EXTERNAL_FMA4(flags) CPUEXT
_SUFFIX
(flags, _EXTERNAL, FMA4)
#define INLINE_AMD3DNOW(flags) CPUEXT(flags, _INLINE, AMD3DNOW)
#define INLINE_AMD3DNOW(flags) CPUEXT
_SUFFIX
(flags, _INLINE, AMD3DNOW)
#define INLINE_AMD3DNOWEXT(flags) CPUEXT(flags, _INLINE, AMD3DNOWEXT)
#define INLINE_AMD3DNOWEXT(flags) CPUEXT
_SUFFIX
(flags, _INLINE, AMD3DNOWEXT)
#define INLINE_MMX(flags) CPUEXT(flags, _INLINE, MMX)
#define INLINE_MMX(flags) CPUEXT
_SUFFIX
(flags, _INLINE, MMX)
#define INLINE_MMXEXT(flags) CPUEXT(flags, _INLINE, MMXEXT)
#define INLINE_MMXEXT(flags) CPUEXT
_SUFFIX
(flags, _INLINE, MMXEXT)
#define INLINE_SSE(flags) CPUEXT(flags, _INLINE, SSE)
#define INLINE_SSE(flags) CPUEXT
_SUFFIX
(flags, _INLINE, SSE)
#define INLINE_SSE2(flags) CPUEXT(flags, _INLINE, SSE2)
#define INLINE_SSE2(flags) CPUEXT
_SUFFIX
(flags, _INLINE, SSE2)
#define INLINE_SSE3(flags) CPUEXT(flags, _INLINE, SSE3)
#define INLINE_SSE3(flags) CPUEXT
_SUFFIX
(flags, _INLINE, SSE3)
#define INLINE_SSSE3(flags) CPUEXT(flags, _INLINE, SSSE3)
#define INLINE_SSSE3(flags) CPUEXT
_SUFFIX
(flags, _INLINE, SSSE3)
#define INLINE_SSE4(flags) CPUEXT(flags, _INLINE, SSE4)
#define INLINE_SSE4(flags) CPUEXT
_SUFFIX
(flags, _INLINE, SSE4)
#define INLINE_SSE42(flags) CPUEXT(flags, _INLINE, SSE42)
#define INLINE_SSE42(flags) CPUEXT
_SUFFIX
(flags, _INLINE, SSE42)
#define INLINE_AVX(flags) CPUEXT(flags, _INLINE, AVX)
#define INLINE_AVX(flags) CPUEXT
_SUFFIX
(flags, _INLINE, AVX)
#define INLINE_FMA4(flags) CPUEXT(flags, _INLINE, FMA4)
#define INLINE_FMA4(flags) CPUEXT
_SUFFIX
(flags, _INLINE, FMA4)
void
ff_cpu_cpuid
(
int
index
,
int
*
eax
,
int
*
ebx
,
int
*
ecx
,
int
*
edx
);
void
ff_cpu_cpuid
(
int
index
,
int
*
eax
,
int
*
ebx
,
int
*
ecx
,
int
*
edx
);
void
ff_cpu_xgetbv
(
int
op
,
int
*
eax
,
int
*
edx
);
void
ff_cpu_xgetbv
(
int
op
,
int
*
eax
,
int
*
edx
);
...
...
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