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
5d170b09
Commit
5d170b09
authored
Nov 28, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/geq: switch to filter_frame.
parent
2a06bc10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
vf_geq.c
libavfilter/vf_geq.c
+15
-14
No files found.
libavfilter/vf_geq.c
View file @
5d170b09
...
...
@@ -152,22 +152,28 @@ static int geq_config_props(AVFilterLink *inlink)
return
0
;
}
static
int
geq_
end_frame
(
AVFilterLink
*
inlink
)
static
int
geq_
filter_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
in
)
{
int
ret
,
plane
;
int
plane
;
GEQContext
*
geq
=
inlink
->
dst
->
priv
;
AVFilterLink
*
outlink
=
inlink
->
dst
->
outputs
[
0
];
AVFilterBufferRef
*
out
picref
=
outlink
->
out_buf
;
AVFilterBufferRef
*
out
;
double
values
[
VAR_VARS_NB
]
=
{
[
VAR_N
]
=
geq
->
framenum
++
,
};
geq
->
picref
=
inlink
->
cur_buf
;
geq
->
picref
=
in
;
out
=
ff_get_video_buffer
(
outlink
,
AV_PERM_WRITE
,
outlink
->
w
,
outlink
->
h
);
if
(
!
out
)
{
avfilter_unref_bufferp
(
&
in
);
return
AVERROR
(
ENOMEM
);
}
avfilter_copy_buffer_ref_props
(
out
,
in
);
for
(
plane
=
0
;
plane
<
3
;
plane
++
)
{
int
x
,
y
;
uint8_t
*
dst
=
out
picref
->
data
[
plane
];
const
int
linesize
=
out
picref
->
linesize
[
plane
];
uint8_t
*
dst
=
out
->
data
[
plane
];
const
int
linesize
=
out
->
linesize
[
plane
];
const
int
w
=
inlink
->
w
>>
(
plane
?
geq
->
hsub
:
0
);
const
int
h
=
inlink
->
h
>>
(
plane
?
geq
->
vsub
:
0
);
...
...
@@ -186,10 +192,8 @@ static int geq_end_frame(AVFilterLink *inlink)
}
}
if
((
ret
=
ff_draw_slice
(
outlink
,
0
,
outlink
->
h
,
1
))
<
0
||
(
ret
=
ff_end_frame
(
outlink
))
<
0
)
return
ret
;
return
0
;
avfilter_unref_bufferp
(
&
geq
->
picref
);
return
ff_filter_frame
(
outlink
,
out
);
}
static
av_cold
void
geq_uninit
(
AVFilterContext
*
ctx
)
...
...
@@ -202,15 +206,12 @@ static av_cold void geq_uninit(AVFilterContext *ctx)
av_opt_free
(
geq
);
}
static
int
null_draw_slice
(
AVFilterLink
*
link
,
int
y
,
int
h
,
int
slice_dir
)
{
return
0
;
}
static
const
AVFilterPad
geq_inputs
[]
=
{
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
draw_slice
=
null_draw_slice
,
.
config_props
=
geq_config_props
,
.
end_frame
=
geq_end
_frame
,
.
filter_frame
=
geq_filter
_frame
,
.
min_perms
=
AV_PERM_READ
,
},
{
NULL
}
...
...
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