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
93c28a55
Commit
93c28a55
authored
Apr 26, 2011
by
tateu
Committed by
Carl Eugen Hoyos
Apr 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix runtime CPU detection in libswscale.
parent
075933a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
rgb2rgb.c
libswscale/rgb2rgb.c
+1
-1
swscale.c
libswscale/swscale.c
+0
-7
utils.c
libswscale/utils.c
+8
-0
No files found.
libswscale/rgb2rgb.c
View file @
93c28a55
...
...
@@ -199,7 +199,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL;
void
sws_rgb2rgb_init
(
int
flags
)
{
#if HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX
#if HAVE_
SSE2 || HAVE_
MMX2 || HAVE_AMD3DNOW || HAVE_MMX
if
(
flags
&
SWS_CPU_CAPS_SSE2
)
rgb2rgb_init_SSE2
();
else
if
(
flags
&
SWS_CPU_CAPS_MMX2
)
...
...
libswscale/swscale.c
View file @
93c28a55
...
...
@@ -62,7 +62,6 @@ untested special converters
#include "rgb2rgb.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/x86_cpu.h"
#include "libavutil/cpu.h"
#include "libavutil/avutil.h"
#include "libavutil/mathematics.h"
#include "libavutil/bswap.h"
...
...
@@ -1314,12 +1313,6 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
#if CONFIG_RUNTIME_CPUDETECT
int
flags
=
c
->
flags
;
int
cpuflags
=
av_get_cpu_flags
();
flags
|=
(
cpuflags
&
AV_CPU_FLAG_MMX
?
SWS_CPU_CAPS_MMX
:
0
);
flags
|=
(
cpuflags
&
AV_CPU_FLAG_MMX2
?
SWS_CPU_CAPS_MMX2
:
0
);
flags
|=
(
cpuflags
&
AV_CPU_FLAG_3DNOW
?
SWS_CPU_CAPS_3DNOW
:
0
);
#if ARCH_X86
// ordered per speed fastest first
if
(
flags
&
SWS_CPU_CAPS_MMX2
)
{
...
...
libswscale/utils.c
View file @
93c28a55
...
...
@@ -41,6 +41,7 @@
#include "rgb2rgb.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/x86_cpu.h"
#include "libavutil/cpu.h"
#include "libavutil/avutil.h"
#include "libavutil/bswap.h"
#include "libavutil/opt.h"
...
...
@@ -742,6 +743,13 @@ static int update_flags_cpu(int flags)
|
SWS_CPU_CAPS_ALTIVEC
|
SWS_CPU_CAPS_BFIN
);
flags
|=
ff_hardcodedcpuflags
();
#else
/* !CONFIG_RUNTIME_CPUDETECT */
int
cpuflags
=
av_get_cpu_flags
();
flags
|=
(
cpuflags
&
AV_CPU_FLAG_SSE2
?
SWS_CPU_CAPS_SSE2
:
0
);
flags
|=
(
cpuflags
&
AV_CPU_FLAG_MMX
?
SWS_CPU_CAPS_MMX
:
0
);
flags
|=
(
cpuflags
&
AV_CPU_FLAG_MMX2
?
SWS_CPU_CAPS_MMX2
:
0
);
flags
|=
(
cpuflags
&
AV_CPU_FLAG_3DNOW
?
SWS_CPU_CAPS_3DNOW
:
0
);
#endif
/* CONFIG_RUNTIME_CPUDETECT */
return
flags
;
}
...
...
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