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
642b4efa
Commit
642b4efa
authored
Oct 04, 2012
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc: fmtconvert: kill VLA in float_to_int16_interleave_altivec()
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
bcf07a15
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
fmtconvert_altivec.c
libavcodec/ppc/fmtconvert_altivec.c
+18
-7
No files found.
libavcodec/ppc/fmtconvert_altivec.c
View file @
642b4efa
...
@@ -83,6 +83,22 @@ static void float_to_int16_altivec(int16_t *dst, const float *src, long len)
...
@@ -83,6 +83,22 @@ static void float_to_int16_altivec(int16_t *dst, const float *src, long len)
}
}
}
}
static
void
float_to_int16_stride_altivec
(
int16_t
*
dst
,
const
float
*
src
,
long
len
,
int
stride
)
{
int
i
,
j
;
vector
signed
short
d
,
s
;
for
(
i
=
0
;
i
<
len
-
7
;
i
+=
8
)
{
d
=
float_to_int16_one_altivec
(
src
+
i
);
for
(
j
=
0
;
j
<
8
;
j
++
)
{
s
=
vec_splat
(
d
,
j
);
vec_ste
(
s
,
0
,
dst
);
dst
+=
stride
;
}
}
}
static
void
float_to_int16_interleave_altivec
(
int16_t
*
dst
,
const
float
**
src
,
static
void
float_to_int16_interleave_altivec
(
int16_t
*
dst
,
const
float
**
src
,
long
len
,
int
channels
)
long
len
,
int
channels
)
{
{
...
@@ -124,13 +140,8 @@ static void float_to_int16_interleave_altivec(int16_t *dst, const float **src,
...
@@ -124,13 +140,8 @@ static void float_to_int16_interleave_altivec(int16_t *dst, const float **src,
}
}
}
}
}
else
{
}
else
{
DECLARE_ALIGNED
(
16
,
int16_t
,
tmp
)[
len
];
for
(
i
=
0
;
i
<
channels
;
i
++
)
int
c
,
j
;
float_to_int16_stride_altivec
(
dst
+
i
,
src
[
i
],
len
,
channels
);
for
(
c
=
0
;
c
<
channels
;
c
++
)
{
float_to_int16_altivec
(
tmp
,
src
[
c
],
len
);
for
(
i
=
0
,
j
=
c
;
i
<
len
;
i
++
,
j
+=
channels
)
dst
[
j
]
=
tmp
[
i
];
}
}
}
}
}
}
}
...
...
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