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
a2a69699
Commit
a2a69699
authored
Mar 18, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_blackframe: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
parent
b3ea7662
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
vf_blackframe.c
libavfilter/vf_blackframe.c
+7
-7
No files found.
libavfilter/vf_blackframe.c
View file @
a2a69699
...
...
@@ -61,25 +61,25 @@ static int query_formats(AVFilterContext *ctx)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
frame
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
BlackFrameContext
*
blackframe
=
ctx
->
priv
;
BlackFrameContext
*
s
=
ctx
->
priv
;
int
x
,
i
;
int
pblack
=
0
;
uint8_t
*
p
=
frame
->
data
[
0
];
for
(
i
=
0
;
i
<
frame
->
height
;
i
++
)
{
for
(
x
=
0
;
x
<
inlink
->
w
;
x
++
)
blackframe
->
nblack
+=
p
[
x
]
<
blackframe
->
bthresh
;
s
->
nblack
+=
p
[
x
]
<
s
->
bthresh
;
p
+=
frame
->
linesize
[
0
];
}
pblack
=
blackframe
->
nblack
*
100
/
(
inlink
->
w
*
inlink
->
h
);
if
(
pblack
>=
blackframe
->
bamount
)
pblack
=
s
->
nblack
*
100
/
(
inlink
->
w
*
inlink
->
h
);
if
(
pblack
>=
s
->
bamount
)
av_log
(
ctx
,
AV_LOG_INFO
,
"frame:%u pblack:%u pts:%"
PRId64
" t:%f
\n
"
,
blackframe
->
frame
,
pblack
,
frame
->
pts
,
s
->
frame
,
pblack
,
frame
->
pts
,
frame
->
pts
==
AV_NOPTS_VALUE
?
-
1
:
frame
->
pts
*
av_q2d
(
inlink
->
time_base
));
blackframe
->
frame
++
;
blackframe
->
nblack
=
0
;
s
->
frame
++
;
s
->
nblack
=
0
;
return
ff_filter_frame
(
inlink
->
dst
->
outputs
[
0
],
frame
);
}
...
...
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