Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
365c79bd
Commit
365c79bd
authored
10 years ago
by
Clément Bœsch
Browse files
Options
Downloads
Patches
Plain Diff
avfilter/edgedetect: reindent after previous commit.
parent
b17e98de
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavfilter/vf_edgedetect.c
+26
-28
26 additions, 28 deletions
libavfilter/vf_edgedetect.c
with
26 additions
and
28 deletions
libavfilter/vf_edgedetect.c
+
26
−
28
View file @
365c79bd
...
@@ -80,9 +80,8 @@ static int query_formats(AVFilterContext *ctx)
...
@@ -80,9 +80,8 @@ static int query_formats(AVFilterContext *ctx)
const
EdgeDetectContext
*
edgedetect
=
ctx
->
priv
;
const
EdgeDetectContext
*
edgedetect
=
ctx
->
priv
;
if
(
edgedetect
->
mode
==
MODE_WIRES
)
{
if
(
edgedetect
->
mode
==
MODE_WIRES
)
{
/* TODO: reindent */
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
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
));
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
}
else
if
(
edgedetect
->
mode
==
MODE_COLORMIX
)
{
}
else
if
(
edgedetect
->
mode
==
MODE_COLORMIX
)
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
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
));
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
...
@@ -313,31 +312,30 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -313,31 +312,30 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
uint16_t
*
gradients
=
plane
->
gradients
;
uint16_t
*
gradients
=
plane
->
gradients
;
int8_t
*
directions
=
plane
->
directions
;
int8_t
*
directions
=
plane
->
directions
;
/* TODO: reindent */
/* gaussian filter to reduce noise */
/* gaussian filter to reduce noise */
gaussian_blur
(
ctx
,
inlink
->
w
,
inlink
->
h
,
gaussian_blur
(
ctx
,
inlink
->
w
,
inlink
->
h
,
tmpbuf
,
inlink
->
w
,
tmpbuf
,
inlink
->
w
,
in
->
data
[
p
],
in
->
linesize
[
p
]);
in
->
data
[
p
],
in
->
linesize
[
p
]);
/* compute the 16-bits gradients and directions for the next step */
/* compute the 16-bits gradients and directions for the next step */
sobel
(
inlink
->
w
,
inlink
->
h
,
sobel
(
inlink
->
w
,
inlink
->
h
,
gradients
,
inlink
->
w
,
gradients
,
inlink
->
w
,
directions
,
inlink
->
w
,
directions
,
inlink
->
w
,
tmpbuf
,
inlink
->
w
);
tmpbuf
,
inlink
->
w
);
/* non_maximum_suppression() will actually keep & clip what's necessary and
/* non_maximum_suppression() will actually keep & clip what's necessary and
* ignore the rest, so we need a clean output buffer */
* ignore the rest, so we need a clean output buffer */
memset
(
tmpbuf
,
0
,
inlink
->
w
*
inlink
->
h
);
memset
(
tmpbuf
,
0
,
inlink
->
w
*
inlink
->
h
);
non_maximum_suppression
(
inlink
->
w
,
inlink
->
h
,
non_maximum_suppression
(
inlink
->
w
,
inlink
->
h
,
tmpbuf
,
inlink
->
w
,
tmpbuf
,
inlink
->
w
,
directions
,
inlink
->
w
,
directions
,
inlink
->
w
,
gradients
,
inlink
->
w
);
gradients
,
inlink
->
w
);
/* keep high values, or low values surrounded by high values */
/* keep high values, or low values surrounded by high values */
double_threshold
(
edgedetect
->
low_u8
,
edgedetect
->
high_u8
,
double_threshold
(
edgedetect
->
low_u8
,
edgedetect
->
high_u8
,
inlink
->
w
,
inlink
->
h
,
inlink
->
w
,
inlink
->
h
,
out
->
data
[
p
],
out
->
linesize
[
p
],
out
->
data
[
p
],
out
->
linesize
[
p
],
tmpbuf
,
inlink
->
w
);
tmpbuf
,
inlink
->
w
);
if
(
edgedetect
->
mode
==
MODE_COLORMIX
)
{
if
(
edgedetect
->
mode
==
MODE_COLORMIX
)
{
color_mix
(
inlink
->
w
,
inlink
->
h
,
color_mix
(
inlink
->
w
,
inlink
->
h
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment