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
e366aec0
Commit
e366aec0
authored
Apr 02, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/edgedetect: add direct path.
parent
ccc25378
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
vf_edgedetect.c
libavfilter/vf_edgedetect.c
+8
-1
lavfi-regression.sh
tests/lavfi-regression.sh
+1
-1
No files found.
libavfilter/vf_edgedetect.c
View file @
e366aec0
...
...
@@ -256,14 +256,20 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterLink
*
outlink
=
inlink
->
dst
->
outputs
[
0
];
uint8_t
*
tmpbuf
=
edgedetect
->
tmpbuf
;
uint16_t
*
gradients
=
edgedetect
->
gradients
;
int
direct
=
0
;
AVFrame
*
out
;
if
(
av_frame_is_writable
(
in
))
{
direct
=
1
;
out
=
in
;
}
else
{
out
=
ff_get_video_buffer
(
outlink
,
outlink
->
w
,
outlink
->
h
);
if
(
!
out
)
{
av_frame_free
(
&
in
);
return
AVERROR
(
ENOMEM
);
}
av_frame_copy_props
(
out
,
in
);
}
/* gaussian filter to reduce noise */
gaussian_blur
(
ctx
,
inlink
->
w
,
inlink
->
h
,
...
...
@@ -287,7 +293,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
out
->
data
[
0
],
out
->
linesize
[
0
],
tmpbuf
,
inlink
->
w
);
av_frame_free
(
&
in
);
if
(
!
direct
)
av_frame_free
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
}
...
...
tests/lavfi-regression.sh
View file @
e366aec0
...
...
@@ -42,7 +42,7 @@ do_lavfi "crop_scale" "crop=iw-100:ih-100:100:100,scale=400:-1"
do_lavfi
"crop_scale_vflip"
"null,null,crop=iw-200:ih-200:200:200,crop=iw-20:ih-20:20:20,scale=200:200,scale=250:250,vflip,vflip,null,scale=200:200,crop=iw-100:ih-100:100:100,vflip,scale=200:200,null,vflip,crop=iw-100:ih-100:100:100,null"
do_lavfi
"crop_vflip"
"crop=iw-100:ih-100:100:100,vflip"
do_lavfi
"drawbox"
"drawbox=224:24:88:72:#FF8010@0.5"
do_lavfi
"edgedetect"
"edgedetect"
do_lavfi
"edgedetect"
"
format=gray,perms=random,
edgedetect"
do_lavfi
"fade"
"fade=in:5:15,fade=out:30:15"
do_lavfi
"hue"
"perms=random,hue=s=sin(2*PI*t)+1"
do_lavfi
"idet"
"idet"
...
...
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