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
4a80a6ad
Commit
4a80a6ad
authored
Mar 29, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_waveform: optimize lowpass filter even more
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
b73c2715
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
13 deletions
+38
-13
vf_waveform.c
libavfilter/vf_waveform.c
+38
-13
No files found.
libavfilter/vf_waveform.c
View file @
4a80a6ad
...
...
@@ -698,29 +698,54 @@ static av_always_inline void lowpass(WaveformContext *s,
uint8_t
*
dst
=
dst_line
;
for
(
p
=
src_data
;
p
<
src_data_end
;
p
++
)
{
int
i
=
0
;
uint8_t
*
target
;
if
(
column
)
{
do
{
target
=
dst
++
+
dst_signed_linesize
*
*
p
;
update
(
target
,
max
,
intensity
);
}
while
(
++
i
<
step
);
target
=
dst
+
dst_signed_linesize
*
*
p
;
dst
+=
step
;
update
(
target
,
max
,
intensity
);
}
else
{
uint8_t
*
row
=
dst_data
;
do
{
if
(
mirror
)
target
=
row
-
*
p
-
1
;
else
target
=
row
+
*
p
;
update
(
target
,
max
,
intensity
);
row
+=
dst_linesize
;
}
while
(
++
i
<
step
);
if
(
mirror
)
target
=
row
-
*
p
-
1
;
else
target
=
row
+
*
p
;
update
(
target
,
max
,
intensity
);
row
+=
dst_linesize
;
}
}
src_data
+=
src_linesize
;
dst_data
+=
dst_linesize
*
step
;
}
if
(
column
&&
step
>
1
)
{
const
int
dst_w
=
s
->
display
==
PARADE
?
out
->
width
/
s
->
acomp
:
out
->
width
;
const
int
dst_h
=
256
;
uint8_t
*
dst
;
int
x
,
z
;
dst
=
out
->
data
[
plane
]
+
offset_y
*
dst_linesize
+
offset_x
;
for
(
y
=
0
;
y
<
dst_h
;
y
++
)
{
for
(
x
=
0
;
x
<
dst_w
;
x
+=
step
)
{
for
(
z
=
1
;
z
<
step
;
z
++
)
{
dst
[
x
+
z
]
=
dst
[
x
];
}
}
dst
+=
dst_linesize
;
}
}
else
if
(
step
>
1
)
{
const
int
dst_h
=
s
->
display
==
PARADE
?
out
->
height
/
s
->
acomp
:
out
->
height
;
const
int
dst_w
=
256
;
uint8_t
*
dst
;
int
z
;
dst
=
out
->
data
[
plane
]
+
offset_y
*
dst_linesize
+
offset_x
;
for
(
y
=
0
;
y
<
dst_h
;
y
+=
step
)
{
for
(
z
=
1
;
z
<
step
;
z
++
)
memcpy
(
dst
+
dst_linesize
*
z
,
dst
,
dst_w
);
dst
+=
dst_linesize
*
step
;
}
}
envelope
(
s
,
out
,
plane
,
plane
,
column
?
offset_x
:
offset_y
);
}
...
...
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