Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
ab441e20
Commit
ab441e20
authored
12 years ago
by
Diego Biurrun
Browse files
Options
Downloads
Patches
Plain Diff
avutil: Move emms code to x86-specific header
parent
130cefc9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavutil/internal.h
+4
-20
4 additions, 20 deletions
libavutil/internal.h
libavutil/x86/emms.h
+22
-0
22 additions, 0 deletions
libavutil/x86/emms.h
with
26 additions
and
20 deletions
libavutil/internal.h
+
4
−
20
View file @
ab441e20
...
...
@@ -39,6 +39,10 @@
#include
"timer.h"
#include
"dict.h"
#if ARCH_X86
# include "x86/emms.h"
#endif
#ifndef attribute_align_arg
#if ARCH_X86_32 && AV_GCC_VERSION_AT_LEAST(4,2)
# define attribute_align_arg __attribute__((force_align_arg_pointer))
...
...
@@ -154,24 +158,4 @@
# define ONLY_IF_THREADS_ENABLED(x) NULL
#endif
#if HAVE_MMX_INLINE
/**
* Empty mmx state.
* this must be called between any dsp function and float/double code.
* for example sin(); dsp->idct_put(); emms_c(); cos()
*/
static
av_always_inline
void
emms_c
(
void
)
{
__asm__
volatile
(
"emms"
:::
"memory"
);
}
#elif HAVE_MMX && HAVE_MM_EMPTY
# include <mmintrin.h>
# define emms_c _mm_empty
#elif HAVE_MMX && HAVE_YASM
# include "libavutil/x86/emms.h"
# define emms_c avpriv_emms_yasm
#else
# define emms_c()
#endif
/* HAVE_MMX_INLINE */
#endif
/* AVUTIL_INTERNAL_H */
This diff is collapsed.
Click to expand it.
libavutil/x86/emms.h
+
22
−
0
View file @
ab441e20
...
...
@@ -19,6 +19,28 @@
#ifndef AVUTIL_X86_EMMS_H
#define AVUTIL_X86_EMMS_H
#include
"config.h"
#include
"libavutil/attributes.h"
void
avpriv_emms_yasm
(
void
);
#if HAVE_MMX_INLINE
/**
* Empty mmx state.
* this must be called between any dsp function and float/double code.
* for example sin(); dsp->idct_put(); emms_c(); cos()
*/
static
av_always_inline
void
emms_c
(
void
)
{
__asm__
volatile
(
"emms"
:::
"memory"
);
}
#elif HAVE_MMX && HAVE_MM_EMPTY
# include <mmintrin.h>
# define emms_c _mm_empty
#elif HAVE_MMX && HAVE_YASM
# define emms_c avpriv_emms_yasm
#else
# define emms_c()
#endif
/* HAVE_MMX_INLINE */
#endif
/* AVUTIL_X86_EMMS_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment