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
f82c4fb2
Commit
f82c4fb2
authored
Aug 29, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: Add convenience macros to check for CPU extensions and flags
parent
a84ac7a8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
cpu.h
libavutil/x86/cpu.h
+57
-0
No files found.
libavutil/x86/cpu.h
0 → 100644
View file @
f82c4fb2
/*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVUTIL_X86_CPU_H
#define AVUTIL_X86_CPU_H
#include "config.h"
#include "libavutil/cpu.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_AMD3DNOWEXT AV_CPU_FLAG_3DNOWEXT
#define EXTERNAL_AMD3DNOW(flags) CPUEXT(flags, _EXTERNAL, AMD3DNOW)
#define EXTERNAL_AMD3DNOWEXT(flags) CPUEXT(flags, _EXTERNAL, AMD3DNOWEXT)
#define EXTERNAL_MMX(flags) CPUEXT(flags, _EXTERNAL, MMX)
#define EXTERNAL_MMXEXT(flags) CPUEXT(flags, _EXTERNAL, MMXEXT)
#define EXTERNAL_SSE(flags) CPUEXT(flags, _EXTERNAL, SSE)
#define EXTERNAL_SSE2(flags) CPUEXT(flags, _EXTERNAL, SSE2)
#define EXTERNAL_SSE3(flags) CPUEXT(flags, _EXTERNAL, SSE3)
#define EXTERNAL_SSSE3(flags) CPUEXT(flags, _EXTERNAL, SSSE3)
#define EXTERNAL_SSE4(flags) CPUEXT(flags, _EXTERNAL, SSE4)
#define EXTERNAL_SSE42(flags) CPUEXT(flags, _EXTERNAL, SSE42)
#define EXTERNAL_AVX(flags) CPUEXT(flags, _EXTERNAL, AVX)
#define EXTERNAL_FMA4(flags) CPUEXT(flags, _EXTERNAL, FMA4)
#define INLINE_AMD3DNOW(flags) CPUEXT(flags, _INLINE, AMD3DNOW)
#define INLINE_AMD3DNOWEXT(flags) CPUEXT(flags, _INLINE, AMD3DNOWEXT)
#define INLINE_MMX(flags) CPUEXT(flags, _INLINE, MMX)
#define INLINE_MMXEXT(flags) CPUEXT(flags, _INLINE, MMXEXT)
#define INLINE_SSE(flags) CPUEXT(flags, _INLINE, SSE)
#define INLINE_SSE2(flags) CPUEXT(flags, _INLINE, SSE2)
#define INLINE_SSE3(flags) CPUEXT(flags, _INLINE, SSE3)
#define INLINE_SSSE3(flags) CPUEXT(flags, _INLINE, SSSE3)
#define INLINE_SSE4(flags) CPUEXT(flags, _INLINE, SSE4)
#define INLINE_SSE42(flags) CPUEXT(flags, _INLINE, SSE42)
#define INLINE_AVX(flags) CPUEXT(flags, _INLINE, AVX)
#define INLINE_FMA4(flags) CPUEXT(flags, _INLINE, FMA4)
#endif
/* AVUTIL_X86_CPU_H */
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