Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
39929e55
Commit
39929e55
authored
Dec 13, 2016
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc: hevcdsp: Use shorthands for vector types
This is more consistent and fixes compilation with clang.
parent
554e55bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
hevcdsp.c
libavcodec/ppc/hevcdsp.c
+9
-9
hevcdsp_template.c
libavcodec/ppc/hevcdsp_template.c
+3
-3
No files found.
libavcodec/ppc/hevcdsp.c
View file @
39929e55
...
...
@@ -31,7 +31,7 @@
#include "libavcodec/hevcdsp.h"
#if HAVE_ALTIVEC
static
const
vec
tor
int16_t
trans4
[
4
]
=
{
static
const
vec
_s16
trans4
[
4
]
=
{
{
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
},
{
83
,
36
,
83
,
36
,
83
,
36
,
83
,
36
},
{
64
,
-
64
,
64
,
-
64
,
64
,
-
64
,
64
,
-
64
},
...
...
@@ -43,13 +43,13 @@ static const vec_u8 mask[2] = {
{
0x04
,
0x05
,
0x0C
,
0x0D
,
0x14
,
0x15
,
0x1C
,
0x1D
,
0x06
,
0x07
,
0x0E
,
0x0F
,
0x16
,
0x17
,
0x1E
,
0x1F
},
};
static
void
transform4x4
(
vec
tor
int16_t
src_01
,
vector
int16_t
src_23
,
vector
int32_t
res
[
4
],
const
int
shift
,
int16_t
*
coeffs
)
static
void
transform4x4
(
vec
_s16
src_01
,
vec_s16
src_23
,
vec_s32
res
[
4
]
,
const
int
shift
,
int16_t
*
coeffs
)
{
vec
tor
int16_t
src_02
,
src_13
;
vec
tor
int32_t
zero
=
vec_splat_s32
(
0
);
vec
tor
int32_t
e0
,
o0
,
e1
,
o1
;
vec
tor
int32_t
add
;
vec
_s16
src_02
,
src_13
;
vec
_s32
zero
=
vec_splat_s32
(
0
);
vec
_s32
e0
,
o0
,
e1
,
o1
;
vec
_s32
add
;
src_13
=
vec_mergel
(
src_01
,
src_23
);
src_02
=
vec_mergeh
(
src_01
,
src_23
);
...
...
@@ -69,10 +69,10 @@ static void transform4x4(vector int16_t src_01, vector int16_t src_23,
res
[
3
]
=
vec_sub
(
e0
,
o0
);
}
static
void
scale
(
vec
tor
int32_t
res
[
4
],
vector
int16_t
res_packed
[
2
],
int
shift
)
static
void
scale
(
vec
_s32
res
[
4
],
vec_s16
res_packed
[
2
],
int
shift
)
{
int
i
;
vec
tor
unsigned
int
v_shift
=
vec_splat_u32
(
shift
);
vec
_u32
v_shift
=
vec_splat_u32
(
shift
);
for
(
i
=
0
;
i
<
4
;
i
++
)
res
[
i
]
=
vec_sra
(
res
[
i
],
v_shift
);
...
...
libavcodec/ppc/hevcdsp_template.c
View file @
39929e55
...
...
@@ -22,9 +22,9 @@ static void FUNC(ff_hevc_idct_4x4, BIT_DEPTH)(int16_t *coeffs, int col_limit)
{
const
int
shift
=
7
;
const
int
shift2
=
20
-
BIT_DEPTH
;
vec
tor
int16_t
src_01
,
src_23
;
vec
tor
int32_t
res
[
4
];
vec
tor
int16_t
res_packed
[
2
];
vec
_s16
src_01
,
src_23
;
vec
_s32
res
[
4
];
vec
_s16
res_packed
[
2
];
src_01
=
vec_ld
(
0
,
coeffs
);
src_23
=
vec_ld
(
16
,
coeffs
);
...
...
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