Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Xiph.Org
aom-rav1e
Commits
e6863ef3
Commit
e6863ef3
authored
Oct 29, 2013
by
Erik Niemeyer
Committed by
Johann
Oct 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CL for adding AVX-AVX2 support in libvpx.
Change-Id: Idc03f3fca4bf2d0afd33631ea1d3caf8fc34ec29
parent
7795c191
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
13 deletions
+42
-13
build/make/Makefile
build/make/Makefile
+4
-0
build/make/configure.sh
build/make/configure.sh
+12
-0
build/make/rtcd.sh
build/make/rtcd.sh
+2
-2
configure
configure
+3
-1
test/test_libvpx.cc
test/test_libvpx.cc
+4
-0
vp9/common/vp9_rtcd_defs.sh
vp9/common/vp9_rtcd_defs.sh
+3
-2
vpx_ports/x86.h
vpx_ports/x86.h
+14
-8
No files found.
build/make/Makefile
View file @
e6863ef3
...
...
@@ -114,6 +114,10 @@ $(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3
$(BUILD_PFX)%_ssse3.c.o
:
CFLAGS += -mssse3
$(BUILD_PFX)%_sse4.c.d
:
CFLAGS += -msse4.1
$(BUILD_PFX)%_sse4.c.o
:
CFLAGS += -msse4.1
$(BUILD_PFX)%_avx.c.d
:
CFLAGS += -mavx
$(BUILD_PFX)%_avx.c.o
:
CFLAGS += -mavx
$(BUILD_PFX)%_avx2.c.d
:
CFLAGS += -mavx2
$(BUILD_PFX)%_avx2.c.o
:
CFLAGS += -mavx2
$(BUILD_PFX)%.c.d
:
%.c
$(
if
$(quiet)
,@echo
" [DEP]
$@
"
)
...
...
build/make/configure.sh
View file @
e6863ef3
...
...
@@ -1108,6 +1108,18 @@ EOF
soft_enable sse4_1
fi
if
enabled gcc
&&
!
disabled avx
&&
!
check_cflags
-mavx
;
then
RTCD_OPTIONS
=
"
${
RTCD_OPTIONS
}
--disable-avx "
else
soft_enable avx
fi
if
enabled gcc
&&
!
disabled avx2
&&
!
check_cflags
-mavx2
;
then
RTCD_OPTIONS
=
"
${
RTCD_OPTIONS
}
--disable-avx2 "
else
soft_enable avx2
fi
case
"
${
AS
}
"
in
auto|
""
)
which nasm
>
/dev/null 2>&1
&&
AS
=
nasm
...
...
build/make/rtcd.sh
View file @
e6863ef3
...
...
@@ -327,11 +327,11 @@ EOF
require c
case
$arch
in
x86
)
ALL_ARCHS
=
$(
filter mmx sse sse2 sse3 ssse3 sse4_1
)
ALL_ARCHS
=
$(
filter mmx sse sse2 sse3 ssse3 sse4_1
avx avx2
)
x86
;;
x86_64
)
ALL_ARCHS
=
$(
filter mmx sse sse2 sse3 ssse3 sse4_1
)
ALL_ARCHS
=
$(
filter mmx sse sse2 sse3 ssse3 sse4_1
avx avx2
)
REQUIRES
=
${
REQUIRES
:-
mmx
sse sse2
}
require
$(
filter
$REQUIRES
)
x86
...
...
configure
View file @
e6863ef3
...
...
@@ -234,6 +234,8 @@ ARCH_EXT_LIST="
sse3
ssse3
sse4_1
avx
avx2
altivec
"
...
...
@@ -422,7 +424,7 @@ process_targets() {
fi
# The write_common_config (config.mk) logic is deferred until after the
# recursive calls to configure complete, bec
ua
se we want our universal
# recursive calls to configure complete, bec
au
se we want our universal
# targets to be executed last.
write_common_config_targets
enabled universal
&&
echo
"FAT_ARCHS=
${
fat_bin_archs
}
"
>>
config.mk
...
...
test/test_libvpx.cc
View file @
e6863ef3
...
...
@@ -45,6 +45,10 @@ int main(int argc, char **argv) {
append_gtest_filter
(
":-SSSE3/*"
);
if
(
!
(
simd_caps
&
HAS_SSE4_1
))
append_gtest_filter
(
":-SSE4_1/*"
);
if
(
!
(
simd_caps
&
HAS_AVX
))
append_gtest_filter
(
":-AVX/*"
);
if
(
!
(
simd_caps
&
HAS_AVX2
))
append_gtest_filter
(
":-AVX2/*"
);
#endif
#if !CONFIG_SHARED
...
...
vp9/common/vp9_rtcd_defs.sh
View file @
e6863ef3
...
...
@@ -22,10 +22,11 @@ forward_decls vp9_common_forward_decls
# x86inc.asm doesn't work if pic is enabled on 32 bit platforms so no assembly.
[
"
$CONFIG_USE_X86INC
"
=
"yes"
]
&&
mmx_x86inc
=
mmx
&&
sse_x86inc
=
sse
&&
sse2_x86inc
=
sse2
&&
ssse3_x86inc
=
ssse3
sse2_x86inc
=
sse2
&&
ssse3_x86inc
=
ssse3
&&
avx_x86inc
=
avx
&&
avx2_x86inc
=
avx2
# this variable is for functions that are 64 bit only.
[
$arch
=
"x86_64"
]
&&
mmx_x86_64
=
mmx
&&
sse2_x86_64
=
sse2
&&
ssse3_x86_64
=
ssse3
[
$arch
=
"x86_64"
]
&&
mmx_x86_64
=
mmx
&&
sse2_x86_64
=
sse2
&&
ssse3_x86_64
=
ssse3
&&
avx_x86_64
=
avx
&&
avx2_x86_64
=
avx2
#
# RECON
...
...
vpx_ports/x86.h
View file @
e6863ef3
...
...
@@ -88,12 +88,14 @@ void __cpuid(int CPUInfo[4], int info_type);
#endif
#endif
/* end others */
#define HAS_MMX 0x01
#define HAS_SSE 0x02
#define HAS_SSE2 0x04
#define HAS_SSE3 0x08
#define HAS_SSSE3 0x10
#define HAS_SSE4_1 0x20
#define HAS_MMX 0x01
#define HAS_SSE 0x02
#define HAS_SSE2 0x04
#define HAS_SSE3 0x08
#define HAS_SSSE3 0x10
#define HAS_SSE4_1 0x20
#define HAS_AVX 0x40
#define HAS_AVX2 0x80
#ifndef BIT
#define BIT(n) (1<<n)
#endif
...
...
@@ -132,12 +134,16 @@ x86_simd_caps(void) {
if
(
reg_edx
&
BIT
(
26
))
flags
|=
HAS_SSE2
;
/* aka wmt */
if
(
reg_ecx
&
BIT
(
0
))
flags
|=
HAS_SSE3
;
if
(
reg_ecx
&
BIT
(
0
))
flags
|=
HAS_SSE3
;
if
(
reg_ecx
&
BIT
(
9
))
flags
|=
HAS_SSSE3
;
if
(
reg_ecx
&
BIT
(
9
))
flags
|=
HAS_SSSE3
;
if
(
reg_ecx
&
BIT
(
19
))
flags
|=
HAS_SSE4_1
;
if
(
reg_ecx
&
BIT
(
28
))
flags
|=
HAS_AVX
;
if
(
reg_ebx
&
BIT
(
5
))
flags
|=
HAS_AVX2
;
return
flags
&
mask
;
}
...
...
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