Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
f7ba8bf3
Commit
f7ba8bf3
authored
Nov 23, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added SSSE3/SSE4.1/SSE4.2 support to libvlc.
parent
66dbe292
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
0 deletions
+54
-0
src/libvlc-module.c
src/libvlc-module.c
+20
-0
src/libvlc.c
src/libvlc.c
+10
-0
src/misc/cpu.c
src/misc/cpu.c
+24
-0
No files found.
src/libvlc-module.c
View file @
f7ba8bf3
...
...
@@ -1044,6 +1044,20 @@ static const char *const ppsz_clock_descriptions[] =
"If your processor supports the SSE3 instructions set, VLC can take " \
"advantage of them.")
#define SSSE3_TEXT N_("Enable CPU SSSE3 support")
#define SSSE3_LONGTEXT N_( \
"If your processor supports the SSSE3 instructions set, VLC can take " \
"advantage of them.")
#define SSE4_1_TEXT N_("Enable CPU SSE4.1 support")
#define SSE4_1_LONGTEXT N_( \
"If your processor supports the SSE4.1 instructions set, VLC can take " \
"advantage of them.")
#define SSE4_2_TEXT N_("Enable CPU SSE4.2 support")
#define SSE4_2_LONGTEXT N_( \
"If your processor supports the SSE4.2 instructions set, VLC can take " \
"advantage of them.")
#define ALTIVEC_TEXT N_("Enable CPU AltiVec support")
#define ALTIVEC_LONGTEXT N_( \
...
...
@@ -1980,6 +1994,12 @@ vlc_module_begin ()
change_need_restart
()
add_bool
(
"sse3"
,
1
,
NULL
,
SSE3_TEXT
,
SSE3_LONGTEXT
,
true
)
change_need_restart
()
add_bool
(
"ssse3"
,
1
,
NULL
,
SSSE3_TEXT
,
SSSE3_LONGTEXT
,
true
)
change_need_restart
()
add_bool
(
"sse41"
,
1
,
NULL
,
SSE4_1_TEXT
,
SSE4_1_LONGTEXT
,
true
)
change_need_restart
()
add_bool
(
"sse42"
,
1
,
NULL
,
SSE4_2_TEXT
,
SSE4_2_LONGTEXT
,
true
)
change_need_restart
()
#endif
#if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
add_bool
(
"altivec"
,
1
,
NULL
,
ALTIVEC_TEXT
,
ALTIVEC_LONGTEXT
,
true
)
...
...
src/libvlc.c
View file @
f7ba8bf3
...
...
@@ -750,6 +750,12 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
cpu_flags
&=
~
CPU_CAPABILITY_SSE2
;
if
(
!
config_GetInt
(
p_libvlc
,
"sse3"
)
)
cpu_flags
&=
~
CPU_CAPABILITY_SSE3
;
if
(
!
config_GetInt
(
p_libvlc
,
"ssse3"
)
)
cpu_flags
&=
~
CPU_CAPABILITY_SSSE3
;
if
(
!
config_GetInt
(
p_libvlc
,
"sse41"
)
)
cpu_flags
&=
~
CPU_CAPABILITY_SSE4_1
;
if
(
!
config_GetInt
(
p_libvlc
,
"sse42"
)
)
cpu_flags
&=
~
CPU_CAPABILITY_SSE4_2
;
PRINT_CAPABILITY
(
CPU_CAPABILITY_MMX
,
"MMX"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_3DNOW
,
"3DNow!"
);
...
...
@@ -757,6 +763,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE
,
"SSE"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE2
,
"SSE2"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE3
,
"SSE3"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE3
,
"SSSE3"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE4_1
,
"SSE4.1"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE4_2
,
"SSE4.2"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE4A
,
"SSE4A"
);
#elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
if
(
!
config_GetInt
(
p_libvlc
,
"altivec"
)
)
...
...
src/misc/cpu.c
View file @
f7ba8bf3
...
...
@@ -201,6 +201,30 @@ uint32_t CPUCapabilities( void )
"movsldup %%xmm1, %%xmm0
\n
"
);
# endif
# if defined (__SSSE3__)
i_capabilities
|=
CPU_CAPABILITY_SSSE3
;
# elif defined (CAN_COMPILE_SSSE3)
if
(
i_ecx
&
0x00000200
)
check_capability
(
"SSSE3"
,
CPU_CAPABILITY_SSSE3
,
"pabsw %%xmm1, %%xmm0
\n
"
);
# endif
# if defined (__SSE4_1__)
i_capabilities
|=
CPU_CAPABILITY_SSE4_1
;
# elif defined (CAN_COMPILE_SSE4_1)
if
(
i_ecx
&
0x00080000
)
check_capability
(
"SSE4.1"
,
CPU_CAPABILITY_SSE4_1
,
"pmaxsb %%xmm1, %%xmm0
\n
"
);
# endif
# if defined (__SSE4_2__)
i_capabilities
|=
CPU_CAPABILITY_SSE4_2
;
# elif defined (CAN_COMPILE_SSE4_2)
if
(
i_ecx
&
0x00100000
)
check_capability
(
"SSE4.2"
,
CPU_CAPABILITY_SSE4_2
,
"pcmpgtq %%xmm1, %%xmm0
\n
"
);
# endif
/* test for additional capabilities */
cpuid
(
0x80000000
);
...
...
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