Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b830aae4
Commit
b830aae4
authored
Aug 02, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for ARM NEON at build-time if possible
parent
6def94fd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
31 deletions
+24
-31
configure.ac
configure.ac
+0
-1
include/vlc_cpu.h
include/vlc_cpu.h
+7
-1
modules/arm_neon/audio_format.c
modules/arm_neon/audio_format.c
+1
-1
modules/arm_neon/chroma_yuv.c
modules/arm_neon/chroma_yuv.c
+1
-1
modules/arm_neon/yuv_rgb.c
modules/arm_neon/yuv_rgb.c
+1
-1
modules/codec/libmpeg2.c
modules/codec/libmpeg2.c
+1
-1
modules/video_filter/deinterlace/deinterlace.c
modules/video_filter/deinterlace/deinterlace.c
+1
-1
src/misc/cpu.c
src/misc/cpu.c
+10
-15
src/posix/linux_cpu.c
src/posix/linux_cpu.c
+2
-9
No files found.
configure.ac
View file @
b830aae4
...
@@ -1330,7 +1330,6 @@ asm volatile("ssat r0, #1, r0":::"r0"); /* assume ARMv6 */
...
@@ -1330,7 +1330,6 @@ asm volatile("ssat r0, #1, r0":::"r0"); /* assume ARMv6 */
VLC_RESTORE_FLAGS
VLC_RESTORE_FLAGS
AS_IF([test "$ac_cv_neon_inline" != "no"], [
AS_IF([test "$ac_cv_neon_inline" != "no"], [
NEON_CFLAGS="$ac_cv_neon_inline"
NEON_CFLAGS="$ac_cv_neon_inline"
AC_DEFINE([CAN_COMPILE_NEON], 1, [Define to 1 if NEON (and ARMv6) assembly is available with NEON_CFLAGS.])
])
])
], [
], [
ac_cv_neon_inline="no"
ac_cv_neon_inline="no"
...
...
include/vlc_cpu.h
View file @
b830aae4
...
@@ -67,7 +67,13 @@ VLC_API unsigned vlc_CPU(void);
...
@@ -67,7 +67,13 @@ VLC_API unsigned vlc_CPU(void);
# else
# else
# define HAVE_FPU 0
# define HAVE_FPU 0
# endif
# endif
# define CPU_CAPABILITY_NEON (1<<24)
# define VLC_CPU_ARM_NEON 2
# ifdef __ARM_NEON__
# define vlc_CPU_ARM_NEON() (1)
# else
# define vlc_CPU_ARM_NEON() ((vlc_CPU() & VLC_CPU_ARM_NEON) != 0)
# endif
# elif defined (__sparc__)
# elif defined (__sparc__)
# define HAVE_FPU 1
# define HAVE_FPU 1
...
...
modules/arm_neon/audio_format.c
View file @
b830aae4
...
@@ -45,7 +45,7 @@ static int Open (vlc_object_t *obj)
...
@@ -45,7 +45,7 @@ static int Open (vlc_object_t *obj)
{
{
filter_t
*
filter
=
(
filter_t
*
)
obj
;
filter_t
*
filter
=
(
filter_t
*
)
obj
;
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY_NEON
))
if
(
!
vlc_CPU_ARM_NEON
(
))
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
if
(
!
AOUT_FMTS_SIMILAR
(
&
filter
->
fmt_in
.
audio
,
&
filter
->
fmt_out
.
audio
))
if
(
!
AOUT_FMTS_SIMILAR
(
&
filter
->
fmt_in
.
audio
,
&
filter
->
fmt_out
.
audio
))
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
modules/arm_neon/chroma_yuv.c
View file @
b830aae4
...
@@ -162,7 +162,7 @@ static int Open (vlc_object_t *obj)
...
@@ -162,7 +162,7 @@ static int Open (vlc_object_t *obj)
{
{
filter_t
*
filter
=
(
filter_t
*
)
obj
;
filter_t
*
filter
=
(
filter_t
*
)
obj
;
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY_NEON
))
if
(
!
vlc_CPU_ARM_NEON
(
))
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
if
((
filter
->
fmt_in
.
video
.
i_width
!=
filter
->
fmt_out
.
video
.
i_width
)
if
((
filter
->
fmt_in
.
video
.
i_width
!=
filter
->
fmt_out
.
video
.
i_width
)
||
(
filter
->
fmt_in
.
video
.
i_height
!=
filter
->
fmt_out
.
video
.
i_height
))
||
(
filter
->
fmt_in
.
video
.
i_height
!=
filter
->
fmt_out
.
video
.
i_height
))
...
...
modules/arm_neon/yuv_rgb.c
View file @
b830aae4
...
@@ -125,7 +125,7 @@ static int Open (vlc_object_t *obj)
...
@@ -125,7 +125,7 @@ static int Open (vlc_object_t *obj)
{
{
filter_t
*
filter
=
(
filter_t
*
)
obj
;
filter_t
*
filter
=
(
filter_t
*
)
obj
;
if
(
!
(
vlc_CPU
()
&
CPU_CAPABILITY_NEON
))
if
(
!
vlc_CPU_ARM_NEON
(
))
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
if
(((
filter
->
fmt_in
.
video
.
i_width
|
filter
->
fmt_in
.
video
.
i_height
)
&
1
)
if
(((
filter
->
fmt_in
.
video
.
i_width
|
filter
->
fmt_in
.
video
.
i_height
)
&
1
)
...
...
modules/codec/libmpeg2.c
View file @
b830aae4
...
@@ -208,7 +208,7 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -208,7 +208,7 @@ static int OpenDecoder( vlc_object_t *p_this )
i_accel
|=
MPEG2_ACCEL_ARM
;
i_accel
|=
MPEG2_ACCEL_ARM
;
# endif
# endif
# ifdef MPEG2_ACCEL_ARM_NEON
# ifdef MPEG2_ACCEL_ARM_NEON
if
(
vlc_CPU
()
&
CPU_CAPABILITY_NEON
)
if
(
vlc_CPU
_ARM_NEON
()
)
i_accel
|=
MPEG2_ACCEL_ARM_NEON
;
i_accel
|=
MPEG2_ACCEL_ARM_NEON
;
# endif
# endif
...
...
modules/video_filter/deinterlace/deinterlace.c
View file @
b830aae4
...
@@ -660,7 +660,7 @@ int Open( vlc_object_t *p_this )
...
@@ -660,7 +660,7 @@ int Open( vlc_object_t *p_this )
else
else
#endif
#endif
#if defined __ARM_NEON__ // FIXME: runtime detect support
#if defined __ARM_NEON__ // FIXME: runtime detect support
if
(
chroma
->
pixel_size
==
1
&&
(
vlc_CPU
()
&
CPU_CAPABILITY_NEON
)
)
if
(
chroma
->
pixel_size
==
1
&&
vlc_CPU_ARM_NEON
(
)
)
{
{
p_sys
->
pf_merge
=
MergeNEON
;
p_sys
->
pf_merge
=
MergeNEON
;
p_sys
->
pf_end_merge
=
NULL
;
p_sys
->
pf_end_merge
=
NULL
;
...
...
src/misc/cpu.c
View file @
b830aae4
...
@@ -317,14 +317,11 @@ out:
...
@@ -317,14 +317,11 @@ out:
# endif
# endif
#elif defined ( __arm__)
#elif defined ( __arm__)
#ifdef __ARM_NEON__
# ifdef __ANDROID__
i_capabilities
|=
CPU_CAPABILITY_NEON
;
if
(
android_getCpuFeatures
()
&
ANDROID_CPU_ARM_FEATURE_NEON
)
#elif defined (CAN_COMPILE_NEON)
i_capabilities
|=
VLC_CPU_ARM_NEON
;
#ifdef __ANDROID__
# endif
if
(
android_getCpuFeatures
()
&
ANDROID_CPU_ARM_FEATURE_NEON
)
i_capabilities
|=
CPU_CAPABILITY_NEON
;
#endif
#endif
#endif
#endif
cpu_flags
=
i_capabilities
;
cpu_flags
=
i_capabilities
;
...
@@ -347,14 +344,14 @@ unsigned vlc_CPU (void)
...
@@ -347,14 +344,14 @@ unsigned vlc_CPU (void)
void
vlc_CPU_dump
(
vlc_object_t
*
obj
)
void
vlc_CPU_dump
(
vlc_object_t
*
obj
)
{
{
const
unsigned
flags
=
vlc_CPU
();
char
buf
[
200
],
*
p
=
buf
;
char
buf
[
200
],
*
p
=
buf
;
#if defined (__i386__) || defined (__x86_64__)
const
unsigned
flags
=
vlc_CPU
();
#define PRINT_CAPABILITY( capability, string ) \
#define PRINT_CAPABILITY( capability, string ) \
if (flags & (capability)) \
if (flags & (capability)) \
p += sprintf (p, "%s ", (string) )
p += sprintf (p, "%s ", (string) )
#if defined (__i386__) || defined (__x86_64__)
PRINT_CAPABILITY
(
CPU_CAPABILITY_MMX
,
"MMX"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_MMX
,
"MMX"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_3DNOW
,
"3DNow!"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_3DNOW
,
"3DNow!"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_MMXEXT
,
"MMXEXT"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_MMXEXT
,
"MMXEXT"
);
...
@@ -367,13 +364,11 @@ void vlc_CPU_dump (vlc_object_t *obj)
...
@@ -367,13 +364,11 @@ void vlc_CPU_dump (vlc_object_t *obj)
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE4A
,
"SSE4A"
);
PRINT_CAPABILITY
(
CPU_CAPABILITY_SSE4A
,
"SSE4A"
);
#elif defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__)
#elif defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__)
PRINT_CAPABILITY
(
CPU_CAPABILITY_ALTIVEC
,
"AltiVec"
);
if
(
vlc_CPU
()
&
CPU_CAPABILITY_ALTIVEC
)
p
+=
sprintf
(
p
,
"AltiVec"
);
#elif defined (__arm__)
#elif defined (__arm__)
PRINT_CAPABILITY
(
CPU_CAPABILITY_NEON
,
"NEONv1"
);
if
(
vlc_CPU_ARM_NEON
())
p
+=
sprintf
(
p
,
"ARM_NEON "
);
#else
(
void
)
flags
;
#endif
#endif
...
...
src/posix/linux_cpu.c
View file @
b830aae4
...
@@ -63,10 +63,8 @@ static void vlc_CPU_init (void)
...
@@ -63,10 +63,8 @@ static void vlc_CPU_init (void)
while
((
cap
=
strsep
(
&
p
,
" "
))
!=
NULL
)
while
((
cap
=
strsep
(
&
p
,
" "
))
!=
NULL
)
{
{
#if defined (__arm__)
#if defined (__arm__)
# ifndef __ARM_NEON__
if
(
!
strcmp
(
cap
,
"neon"
))
if
(
!
strcmp
(
cap
,
"neon"
))
core_caps
|=
CPU_CAPABILITY_NEON
;
core_caps
|=
VLC_CPU_ARM_NEON
;
# endif
#elif defined (__i386__) || defined (__x86_64__)
#elif defined (__i386__) || defined (__x86_64__)
# ifndef __MMX__
# ifndef __MMX__
...
@@ -122,12 +120,7 @@ static void vlc_CPU_init (void)
...
@@ -122,12 +120,7 @@ static void vlc_CPU_init (void)
all_caps
=
0
;
/* Do not assume any capability! */
all_caps
=
0
;
/* Do not assume any capability! */
/* Always enable capabilities that were forced during compilation */
/* Always enable capabilities that were forced during compilation */
#if defined (__arm__)
#if defined (__i386__) || defined (__x86_64__)
# ifdef __ARM_NEON__
all_caps
|=
CPU_CAPABILITY_NEON
;
# endif
#elif defined (__i386__) || defined (__x86_64__)
# ifdef __MMX__
# ifdef __MMX__
all_caps
|=
CPU_CAPABILITY_MMX
;
all_caps
|=
CPU_CAPABILITY_MMX
;
# endif
# 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