Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
bd979a16
Commit
bd979a16
authored
Oct 11, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Oct 11, 2016
Browse files
Merge "Make generic SIMD code compile if no native support" into nextgenv2
parents
53a9745c
ebf209ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
aom_dsp/aom_dsp.mk
View file @
bd979a16
...
...
@@ -376,4 +376,6 @@ DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes)
DSP_SRCS-yes
+=
aom_dsp_rtcd.c
DSP_SRCS-yes
+=
aom_dsp_rtcd_defs.pl
DSP_SRCS-yes
+=
aom_simd.c
$(eval
$(call
rtcd_h_template,aom_dsp_rtcd,aom_dsp/aom_dsp_rtcd_defs.pl))
aom_dsp/aom_simd.c
0 → 100644
View file @
bd979a16
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
// Set to 1 to add some sanity checks in the fallback C code
const
int
simd_check
=
1
;
aom_dsp/simd/v128_intrinsics_c.h
View file @
bd979a16
...
...
@@ -15,6 +15,7 @@
#include
<stdio.h>
#include
<stdlib.h>
#include
"./v64_intrinsics_c.h"
#include
"./aom_config.h"
typedef
union
{
uint8_t
u8
[
16
];
...
...
@@ -406,11 +407,13 @@ SIMD_INLINE c_v128 _c_v128_unzip_8(c_v128 a, c_v128 b, int mode) {
}
SIMD_INLINE
c_v128
c_v128_unziplo_8
(
c_v128
a
,
c_v128
b
)
{
return
big_endian
()
?
_c_v128_unzip_8
(
a
,
b
,
1
)
:
_c_v128_unzip_8
(
a
,
b
,
0
);
return
CONFIG_BIG_ENDIAN
?
_c_v128_unzip_8
(
a
,
b
,
1
)
:
_c_v128_unzip_8
(
a
,
b
,
0
);
}
SIMD_INLINE
c_v128
c_v128_unziphi_8
(
c_v128
a
,
c_v128
b
)
{
return
big_endian
()
?
_c_v128_unzip_8
(
b
,
a
,
0
)
:
_c_v128_unzip_8
(
b
,
a
,
1
);
return
CONFIG_BIG_ENDIAN
?
_c_v128_unzip_8
(
b
,
a
,
0
)
:
_c_v128_unzip_8
(
b
,
a
,
1
);
}
SIMD_INLINE
c_v128
_c_v128_unzip_16
(
c_v128
a
,
c_v128
b
,
int
mode
)
{
...
...
@@ -438,11 +441,13 @@ SIMD_INLINE c_v128 _c_v128_unzip_16(c_v128 a, c_v128 b, int mode) {
}
SIMD_INLINE
c_v128
c_v128_unziplo_16
(
c_v128
a
,
c_v128
b
)
{
return
big_endian
()
?
_c_v128_unzip_16
(
a
,
b
,
1
)
:
_c_v128_unzip_16
(
a
,
b
,
0
);
return
CONFIG_BIG_ENDIAN
?
_c_v128_unzip_16
(
a
,
b
,
1
)
:
_c_v128_unzip_16
(
a
,
b
,
0
);
}
SIMD_INLINE
c_v128
c_v128_unziphi_16
(
c_v128
a
,
c_v128
b
)
{
return
big_endian
()
?
_c_v128_unzip_16
(
b
,
a
,
0
)
:
_c_v128_unzip_16
(
b
,
a
,
1
);
return
CONFIG_BIG_ENDIAN
?
_c_v128_unzip_16
(
b
,
a
,
0
)
:
_c_v128_unzip_16
(
b
,
a
,
1
);
}
SIMD_INLINE
c_v128
_c_v128_unzip_32
(
c_v128
a
,
c_v128
b
,
int
mode
)
{
...
...
@@ -462,11 +467,13 @@ SIMD_INLINE c_v128 _c_v128_unzip_32(c_v128 a, c_v128 b, int mode) {
}
SIMD_INLINE
c_v128
c_v128_unziplo_32
(
c_v128
a
,
c_v128
b
)
{
return
big_endian
()
?
_c_v128_unzip_32
(
a
,
b
,
1
)
:
_c_v128_unzip_32
(
a
,
b
,
0
);
return
CONFIG_BIG_ENDIAN
?
_c_v128_unzip_32
(
a
,
b
,
1
)
:
_c_v128_unzip_32
(
a
,
b
,
0
);
}
SIMD_INLINE
c_v128
c_v128_unziphi_32
(
c_v128
a
,
c_v128
b
)
{
return
big_endian
()
?
_c_v128_unzip_32
(
b
,
a
,
0
)
:
_c_v128_unzip_32
(
b
,
a
,
1
);
return
CONFIG_BIG_ENDIAN
?
_c_v128_unzip_32
(
b
,
a
,
0
)
:
_c_v128_unzip_32
(
b
,
a
,
1
);
}
SIMD_INLINE
c_v128
c_v128_unpack_u8_s16
(
c_v64
a
)
{
...
...
@@ -535,8 +542,8 @@ SIMD_INLINE c_v128 c_v128_shuffle_8(c_v128 a, c_v128 pattern) {
c
);
abort
();
}
t
.
u8
[
c
]
=
a
.
u8
[
big_endian
()
?
15
-
(
pattern
.
u8
[
c
]
&
15
)
:
pattern
.
u8
[
c
]
&
15
];
t
.
u8
[
c
]
=
a
.
u8
[
CONFIG_BIG_ENDIAN
?
15
-
(
pattern
.
u8
[
c
]
&
15
)
:
pattern
.
u8
[
c
]
&
15
];
}
return
t
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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