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
54bac7d8
Commit
54bac7d8
authored
May 09, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made vlc_memalign public.
parent
7f42234c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
60 deletions
+33
-60
include/vlc_common.h
include/vlc_common.h
+2
-0
src/Makefile.am
src/Makefile.am
+0
-1
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/misc/cpu.c
src/misc/cpu.c
+30
-0
src/video_output/video_output.c
src/video_output/video_output.c
+0
-1
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+0
-1
src/video_output/vout_pictures.h
src/video_output/vout_pictures.h
+0
-57
No files found.
include/vlc_common.h
View file @
54bac7d8
...
...
@@ -829,6 +829,8 @@ static inline uint64_t ntoh64 (uint64_t ll)
VLC_EXPORT
(
bool
,
vlc_ureduce
,
(
unsigned
*
,
unsigned
*
,
uint64_t
,
uint64_t
,
uint64_t
)
);
VLC_EXPORT
(
void
*
,
vlc_memalign
,
(
void
**
base
,
size_t
alignment
,
size_t
size
)
);
/* iconv wrappers (defined in src/extras/libc.c) */
typedef
void
*
vlc_iconv_t
;
VLC_EXPORT
(
vlc_iconv_t
,
vlc_iconv_open
,
(
const
char
*
,
const
char
*
)
LIBVLC_USED
);
...
...
src/Makefile.am
View file @
54bac7d8
...
...
@@ -375,7 +375,6 @@ SOURCES_libvlc_common = \
video_output/postprocessing.h
\
video_output/video_output.c
\
video_output/vout_pictures.c
\
video_output/vout_pictures.h
\
video_output/video_text.c
\
video_output/video_epg.c
\
video_output/video_widgets.c
\
...
...
src/libvlccore.sym
View file @
54bac7d8
...
...
@@ -530,6 +530,7 @@ vlc_list_children
vlc_list_release
vlc_memcpy
vlc_memset
vlc_memalign
vlc_meta_AddExtra
vlc_meta_CopyExtraNames
vlc_meta_Delete
...
...
src/misc/cpu.c
View file @
54bac7d8
...
...
@@ -41,6 +41,7 @@
#else
#include <errno.h>
#endif
#include <assert.h>
#include "libvlc.h"
...
...
@@ -405,3 +406,32 @@ void *vlc_memset (void *tgt, int c, size_t n)
{
return
pf_vlc_memset
(
tgt
,
c
,
n
);
}
/**
* Returned an aligned pointer on newly allocated memory.
* \param alignment must be a power of 2 and a multiple of sizeof(void*)
* \param size is the size of the usable memory returned.
*
* It must not be freed directly, *base must.
*/
void
*
vlc_memalign
(
void
**
base
,
size_t
alignment
,
size_t
size
)
{
assert
(
alignment
>=
sizeof
(
void
*
));
for
(
size_t
t
=
alignment
;
t
>
1
;
t
>>=
1
)
assert
((
t
&
1
)
==
0
);
#if defined(HAVE_POSIX_MEMALIGN)
if
(
posix_memalign
(
base
,
alignment
,
size
))
{
*
base
=
NULL
;
return
NULL
;
}
return
*
base
;
#elif defined(HAVE_MEMALIGN)
return
*
base
=
memalign
(
alignment
,
size
);
#else
unsigned
char
*
p
=
*
base
=
malloc
(
size
+
alignment
-
1
);
if
(
!
p
)
return
NULL
;
return
(
void
*
)((
uintptr_t
)(
p
+
alignment
-
1
)
&
~
(
alignment
-
1
));
#endif
}
src/video_output/video_output.c
View file @
54bac7d8
...
...
@@ -47,7 +47,6 @@
#include <libvlc.h>
#include <vlc_input.h>
#include "vout_pictures.h"
#include "vout_internal.h"
#include "interlacing.h"
#include "postprocessing.h"
...
...
src/video_output/vout_pictures.c
View file @
54bac7d8
...
...
@@ -41,7 +41,6 @@
#include <vlc_picture_fifo.h>
#include <vlc_picture_pool.h>
#include "vout_pictures.h"
#include "vout_internal.h"
/**
...
...
src/video_output/vout_pictures.h
deleted
100644 → 0
View file @
7f42234c
/*****************************************************************************
* vout_pictures.h : picture management definitions
*****************************************************************************
* Copyright (C) 2002-2004 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Fourcc definitions that we can handle internally
*****************************************************************************/
/* Alignment of critical dynamic data structure
*
* Not all platforms support memalign so we provide a vlc_memalign wrapper
* void *vlc_memalign( size_t align, size_t size, void **pp_orig )
* *pp_orig is the pointer that has to be freed afterwards.
*/
static
inline
void
*
vlc_memalign
(
void
**
pp
,
size_t
align
,
size_t
size
)
{
#if defined (HAVE_POSIX_MEMALIGN)
return
posix_memalign
(
pp
,
align
,
size
)
?
NULL
:
*
pp
;
#elif defined (HAVE_MEMALIGN)
return
*
pp
=
memalign
(
align
,
size
);
#else
unsigned
char
*
ptr
;
if
(
align
<
1
)
return
NULL
;
align
--
;
ptr
=
malloc
(
size
+
align
);
if
(
ptr
==
NULL
)
return
NULL
;
*
pp
=
ptr
;
ptr
+=
align
;
return
(
void
*
)(((
uintptr_t
)
ptr
)
&
~
align
);
#endif
}
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