Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
2337ee69
Commit
2337ee69
authored
May 09, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checks for CPU capability at run-time (on x86 and PPC)
parent
e6b44f79
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
0 deletions
+37
-0
modules/3dnow/memcpy.c
modules/3dnow/memcpy.c
+3
-0
modules/altivec/memcpy.c
modules/altivec/memcpy.c
+3
-0
modules/mmx/memcpy.c
modules/mmx/memcpy.c
+3
-0
modules/mmxext/memcpy.c
modules/mmxext/memcpy.c
+3
-0
modules/video_chroma/i420_rgb.c
modules/video_chroma/i420_rgb.c
+8
-0
modules/video_chroma/i420_yuy2.c
modules/video_chroma/i420_yuy2.c
+9
-0
modules/video_chroma/i422_yuy2.c
modules/video_chroma/i422_yuy2.c
+8
-0
No files found.
modules/3dnow/memcpy.c
View file @
2337ee69
...
...
@@ -34,6 +34,9 @@
static
int
Activate
(
vlc_object_t
*
p_this
)
{
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY_3DNOW
)
)
return
VLC_EGENERIC
;
VLC_UNUSED
(
p_this
);
vlc_fastmem_register
(
fast_memcpy
,
NULL
);
...
...
modules/altivec/memcpy.c
View file @
2337ee69
...
...
@@ -49,6 +49,9 @@ static void * fast_memcpy ( void * to, const void * from, size_t len );
*****************************************************************************/
static
int
Activate
(
vlc_object_t
*
p_this
)
{
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY_ALTIVEC
)
)
return
VLC_EGENERIC
;
VLC_UNUSED
(
p_this
);
vlc_fastmem_register
(
fast_memcpy
,
NULL
);
return
VLC_SUCCESS
;
...
...
modules/mmx/memcpy.c
View file @
2337ee69
...
...
@@ -34,6 +34,9 @@
static
int
Activate
(
vlc_object_t
*
p_this
)
{
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY_MMX
)
)
return
VLC_EGENERIC
;
VLC_UNUSED
(
p_this
);
vlc_fastmem_register
(
fast_memcpy
,
NULL
);
...
...
modules/mmxext/memcpy.c
View file @
2337ee69
...
...
@@ -34,6 +34,9 @@
static
int
Activate
(
vlc_object_t
*
p_this
)
{
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY_MMXEXT
)
)
return
VLC_EGENERIC
;
VLC_UNUSED
(
p_this
);
vlc_fastmem_register
(
fast_memcpy
,
NULL
);
...
...
modules/video_chroma/i420_rgb.c
View file @
2337ee69
...
...
@@ -35,6 +35,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_cpu.h>
#include "i420_rgb.h"
#if defined (MODULE_NAME_IS_i420_rgb)
...
...
@@ -83,14 +84,17 @@ vlc_module_begin ()
set_description
(
N_
(
"I420,IYUV,YV12 to "
"RGB2,RV15,RV16,RV24,RV32 conversions"
)
)
set_capability
(
"video filter2"
,
80
)
# define CPU_CAPABILITY 0
#elif defined (MODULE_NAME_IS_i420_rgb_mmx)
set_description
(
N_
(
"MMX I420,IYUV,YV12 to "
"RV15,RV16,RV24,RV32 conversions"
)
)
set_capability
(
"video filter2"
,
100
)
# define CPU_CAPABILITY CPU_CAPABILITY_MMX
#elif defined (MODULE_NAME_IS_i420_rgb_sse2)
set_description
(
N_
(
"SSE2 I420,IYUV,YV12 to "
"RV15,RV16,RV24,RV32 conversions"
)
)
set_capability
(
"video filter2"
,
120
)
# define CPU_CAPABILITY CPU_CAPABILITY_SSE2
#endif
set_callbacks
(
Activate
,
Deactivate
)
vlc_module_end
()
...
...
@@ -107,6 +111,10 @@ static int Activate( vlc_object_t *p_this )
size_t
i_tables_size
;
#endif
#if CPU_CAPABILITY
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY
)
)
return
VLC_EGENERIC
;
#endif
if
(
p_filter
->
fmt_out
.
video
.
i_width
&
1
||
p_filter
->
fmt_out
.
video
.
i_height
&
1
)
{
...
...
modules/video_chroma/i420_yuy2.c
View file @
2337ee69
...
...
@@ -33,6 +33,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_cpu.h>
#if defined (MODULE_NAME_IS_i420_yuy2_altivec) && defined(HAVE_ALTIVEC_H)
# include <altivec.h>
...
...
@@ -87,16 +88,20 @@ vlc_module_begin ()
#if defined (MODULE_NAME_IS_i420_yuy2)
set_description
(
N_
(
"Conversions from "
SRC_FOURCC
" to "
DEST_FOURCC
)
)
set_capability
(
"video filter2"
,
80
)
# define CPU_CAPABILITY 0
#elif defined (MODULE_NAME_IS_i420_yuy2_mmx)
set_description
(
N_
(
"MMX conversions from "
SRC_FOURCC
" to "
DEST_FOURCC
)
)
set_capability
(
"video filter2"
,
160
)
# define CPU_CAPABILITY CPU_CAPABILITY_MMX
#elif defined (MODULE_NAME_IS_i420_yuy2_sse2)
set_description
(
N_
(
"SSE2 conversions from "
SRC_FOURCC
" to "
DEST_FOURCC
)
)
set_capability
(
"video filter2"
,
250
)
# define CPU_CAPABILITY CPU_CAPABILITY_SSE2
#elif defined (MODULE_NAME_IS_i420_yuy2_altivec)
set_description
(
_
(
"AltiVec conversions from "
SRC_FOURCC
" to "
DEST_FOURCC
)
);
set_capability
(
"video filter2"
,
250
)
# define CPU_CAPABILITY CPU_CAPABILITY_ALTIVEC
#endif
set_callbacks
(
Activate
,
NULL
)
vlc_module_end
()
...
...
@@ -110,6 +115,10 @@ static int Activate( vlc_object_t *p_this )
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
#if CPU_CAPABILITY
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY
)
)
return
VLC_EGENERIC
;
#endif
if
(
p_filter
->
fmt_in
.
video
.
i_width
&
1
||
p_filter
->
fmt_in
.
video
.
i_height
&
1
)
{
...
...
modules/video_chroma/i422_yuy2.c
View file @
2337ee69
...
...
@@ -33,6 +33,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_cpu.h>
#include "i422_yuy2.h"
...
...
@@ -70,12 +71,15 @@ vlc_module_begin ()
#if defined (MODULE_NAME_IS_i422_yuy2)
set_description
(
N_
(
"Conversions from "
SRC_FOURCC
" to "
DEST_FOURCC
)
)
set_capability
(
"video filter2"
,
80
)
# define CPU_CAPABILITY 0
#elif defined (MODULE_NAME_IS_i422_yuy2_mmx)
set_description
(
N_
(
"MMX conversions from "
SRC_FOURCC
" to "
DEST_FOURCC
)
)
set_capability
(
"video filter2"
,
100
)
# define CPU_CAPABILITY CPU_CAPABILITY_MMX
#elif defined (MODULE_NAME_IS_i422_yuy2_sse2)
set_description
(
N_
(
"SSE2 conversions from "
SRC_FOURCC
" to "
DEST_FOURCC
)
)
set_capability
(
"video filter2"
,
120
)
# define CPU_CAPABILITY CPU_CAPABILITY_SSE2
#endif
set_callbacks
(
Activate
,
NULL
)
vlc_module_end
()
...
...
@@ -89,6 +93,10 @@ static int Activate( vlc_object_t *p_this )
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
#if CPU_CAPABILITY
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY
)
)
return
VLC_EGENERIC
;
#endif
if
(
p_filter
->
fmt_in
.
video
.
i_width
&
1
||
p_filter
->
fmt_in
.
video
.
i_height
&
1
)
{
...
...
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