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
365c79bd
Commit
365c79bd
authored
May 03, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/edgedetect: reindent after previous commit.
parent
b17e98de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
28 deletions
+26
-28
vf_edgedetect.c
libavfilter/vf_edgedetect.c
+26
-28
No files found.
libavfilter/vf_edgedetect.c
View file @
365c79bd
...
...
@@ -80,9 +80,8 @@ static int query_formats(AVFilterContext *ctx)
const
EdgeDetectContext
*
edgedetect
=
ctx
->
priv
;
if
(
edgedetect
->
mode
==
MODE_WIRES
)
{
/* TODO: reindent */
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
}
else
if
(
edgedetect
->
mode
==
MODE_COLORMIX
)
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
...
...
@@ -313,31 +312,30 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
uint16_t
*
gradients
=
plane
->
gradients
;
int8_t
*
directions
=
plane
->
directions
;
/* TODO: reindent */
/* gaussian filter to reduce noise */
gaussian_blur
(
ctx
,
inlink
->
w
,
inlink
->
h
,
tmpbuf
,
inlink
->
w
,
in
->
data
[
p
],
in
->
linesize
[
p
]);
/* compute the 16-bits gradients and directions for the next step */
sobel
(
inlink
->
w
,
inlink
->
h
,
gradients
,
inlink
->
w
,
directions
,
inlink
->
w
,
tmpbuf
,
inlink
->
w
);
/* non_maximum_suppression() will actually keep & clip what's necessary and
* ignore the rest, so we need a clean output buffer */
memset
(
tmpbuf
,
0
,
inlink
->
w
*
inlink
->
h
);
non_maximum_suppression
(
inlink
->
w
,
inlink
->
h
,
tmpbuf
,
inlink
->
w
,
directions
,
inlink
->
w
,
gradients
,
inlink
->
w
);
/* keep high values, or low values surrounded by high values */
double_threshold
(
edgedetect
->
low_u8
,
edgedetect
->
high_u8
,
inlink
->
w
,
inlink
->
h
,
out
->
data
[
p
],
out
->
linesize
[
p
],
tmpbuf
,
inlink
->
w
);
/* gaussian filter to reduce noise */
gaussian_blur
(
ctx
,
inlink
->
w
,
inlink
->
h
,
tmpbuf
,
inlink
->
w
,
in
->
data
[
p
],
in
->
linesize
[
p
]);
/* compute the 16-bits gradients and directions for the next step */
sobel
(
inlink
->
w
,
inlink
->
h
,
gradients
,
inlink
->
w
,
directions
,
inlink
->
w
,
tmpbuf
,
inlink
->
w
);
/* non_maximum_suppression() will actually keep & clip what's necessary and
* ignore the rest, so we need a clean output buffer */
memset
(
tmpbuf
,
0
,
inlink
->
w
*
inlink
->
h
);
non_maximum_suppression
(
inlink
->
w
,
inlink
->
h
,
tmpbuf
,
inlink
->
w
,
directions
,
inlink
->
w
,
gradients
,
inlink
->
w
);
/* keep high values, or low values surrounded by high values */
double_threshold
(
edgedetect
->
low_u8
,
edgedetect
->
high_u8
,
inlink
->
w
,
inlink
->
h
,
out
->
data
[
p
],
out
->
linesize
[
p
],
tmpbuf
,
inlink
->
w
);
if
(
edgedetect
->
mode
==
MODE_COLORMIX
)
{
color_mix
(
inlink
->
w
,
inlink
->
h
,
...
...
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