Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
1da3394a
Commit
1da3394a
authored
Apr 26, 2022
by
Thilo Borgmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_blurdetect: cleanup headers, remove unused variables, fix type of variable
parent
861285c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
vf_blurdetect.c
libavfilter/vf_blurdetect.c
+2
-16
No files found.
libavfilter/vf_blurdetect.c
View file @
1da3394a
...
...
@@ -30,16 +30,10 @@
* @author Thilo Borgmann <thilo.borgmann _at_ mail.de>
*/
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixelutils.h"
#include "libavutil/motion_vector.h"
#include "libavutil/qsort.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "edge_common.h"
static
int
comp
(
const
float
*
a
,
const
float
*
b
)
...
...
@@ -68,7 +62,7 @@ typedef struct BLRContext {
uint8_t
*
filterbuf
;
uint8_t
*
tmpbuf
;
uint16_t
*
gradients
;
char
*
directions
;
int8_t
*
directions
;
}
BLRContext
;
#define OFFSET(x) offsetof(BLRContext, x)
...
...
@@ -139,8 +133,6 @@ static float edge_width(BLRContext *blr, int i, int j, int8_t dir, int w, int h,
int
k
,
x
,
y
;
int
edge1
;
int
edge2
;
float
luma1
=
0
.
0
;
// average luma difference per edge pixel
float
luma2
=
0
.
0
;
int
radius
=
blr
->
radius
;
switch
(
dir
)
{
...
...
@@ -168,10 +160,7 @@ static float edge_width(BLRContext *blr, int i, int j, int8_t dir, int w, int h,
if
(
tmp
<=
0
)
// local maximum found
break
;
luma1
+=
tmp
;
}
if
(
k
>
0
)
luma1
/=
k
;
edge1
=
k
;
width
+=
k
;
...
...
@@ -190,10 +179,7 @@ static float edge_width(BLRContext *blr, int i, int j, int8_t dir, int w, int h,
if
(
tmp
>=
0
)
// local maximum found
break
;
luma2
-=
tmp
;
}
if
(
k
>
0
)
luma2
/=
k
;
edge2
=
k
;
width
+=
k
;
...
...
@@ -205,7 +191,7 @@ static float edge_width(BLRContext *blr, int i, int j, int8_t dir, int w, int h,
}
static
float
calculate_blur
(
BLRContext
*
s
,
int
w
,
int
h
,
int
hsub
,
int
vsub
,
u
int8_t
*
dir
,
int
dir_linesize
,
int8_t
*
dir
,
int
dir_linesize
,
uint8_t
*
dst
,
int
dst_linesize
,
uint8_t
*
src
,
int
src_linesize
)
{
...
...
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