Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
b04c6c66
Commit
b04c6c66
authored
May 03, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Process-wide memcpy/memset accelarations
(CPU features don't change across libvlc instances)
parent
0b776c28
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
include/vlc_common.h
include/vlc_common.h
+9
-0
src/libvlc.sym
src/libvlc.sym
+2
-0
src/misc/cpu.c
src/misc/cpu.c
+26
-0
No files found.
include/vlc_common.h
View file @
b04c6c66
...
...
@@ -883,6 +883,15 @@ VLC_EXPORT( int, __vlc_execve, ( vlc_object_t *p_object, int i_argc, char *const
#define CPU_CAPABILITY_ALTIVEC (1<<16)
#define CPU_CAPABILITY_FPU (1<<31)
VLC_EXPORT
(
unsigned
,
vlc_CPU
,
(
void
)
);
VLC_EXPORT
(
void
*
,
vlc_memcpy
,
(
void
*
,
const
void
*
,
size_t
)
);
VLC_EXPORT
(
void
*
,
vlc_memset
,
(
void
*
,
int
,
size_t
)
);
typedef
void
*
(
*
vlc_memcpy_t
)
(
void
*
tgt
,
const
void
*
src
,
size_t
n
);
typedef
void
*
(
*
vlc_memset_t
)
(
void
*
tgt
,
int
c
,
size_t
n
);
VLC_EXPORT
(
void
,
vlc_fastmem_register
,
(
vlc_memcpy_t
cpy
,
vlc_memset_t
set
)
);
VLC_EXPORT
(
void
*
,
vlc_memcpy
,
(
vlc_object_t
*
,
void
*
,
const
void
*
,
size_t
)
);
VLC_EXPORT
(
void
*
,
vlc_memset
,
(
vlc_object_t
*
,
void
*
,
int
,
size_t
)
);
/*****************************************************************************
* I18n stuff
...
...
src/libvlc.sym
View file @
b04c6c66
...
...
@@ -403,6 +403,8 @@ vlc_iconv_open
__vlc_list_find
vlc_list_release
vlc_lldiv
vlc_memcpy
vlc_memset
vlc_module_create
vlc_module_set
__vlc_mutex_destroy
...
...
src/misc/cpu.c
View file @
b04c6c66
...
...
@@ -356,3 +356,29 @@ unsigned vlc_CPU (void)
return
cpu_flags
;
}
static
vlc_memcpy_t
pf_vlc_memcpy
=
memcpy
;
static
vlc_memcpy_t
pf_vlc_memset
=
memset
;
void
vlc_fastmem_register
(
vlc_memcpy_t
cpy
,
vlc_memset_t
set
)
{
if
(
cpy
)
pf_vlc_memcpy
=
cpy
;
if
(
set
)
pf_vlc_memset
=
set
;
}
/**
* vlc_memcpy: fast CPU-dependent memcpy
*/
void
*
vlc_memcpy
(
void
*
tgt
,
const
void
*
src
,
size_t
n
)
{
return
pf_vlc_memcpy
(
tgt
,
src
,
n
);
}
/**
* vlc_memset: fast CPU-dependent memset
*/
void
*
vlc_memset
(
void
*
tgt
,
int
c
,
size_t
n
)
{
return
pf_vlc_memset
(
tgt
,
c
,
n
);
}
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