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
45eed9b1
Commit
45eed9b1
authored
Nov 28, 2012
by
Anton Khirnov
Committed by
Michael Niedermayer
Nov 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_unsharp: switch to filter_frame, this filter did not support slices
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
afded181
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
vf_unsharp.c
libavfilter/vf_unsharp.c
+13
-15
No files found.
libavfilter/vf_unsharp.c
View file @
45eed9b1
...
...
@@ -214,36 +214,34 @@ static av_cold void uninit(AVFilterContext *ctx)
free_filter_param
(
&
unsharp
->
chroma
);
}
static
int
end_frame
(
AVFilterLink
*
link
)
static
int
filter_frame
(
AVFilterLink
*
link
,
AVFilterBufferRef
*
in
)
{
UnsharpContext
*
unsharp
=
link
->
dst
->
priv
;
AVFilter
BufferRef
*
in
=
link
->
cur_buf
;
AVFilterBufferRef
*
out
=
link
->
dst
->
outputs
[
0
]
->
out_buf
;
AVFilter
Link
*
outlink
=
link
->
dst
->
outputs
[
0
]
;
AVFilterBufferRef
*
out
;
int
cw
=
SHIFTUP
(
link
->
w
,
unsharp
->
hsub
);
int
ch
=
SHIFTUP
(
link
->
h
,
unsharp
->
vsub
);
int
ret
;
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
);
apply_unsharp
(
out
->
data
[
0
],
out
->
linesize
[
0
],
in
->
data
[
0
],
in
->
linesize
[
0
],
link
->
w
,
link
->
h
,
&
unsharp
->
luma
);
apply_unsharp
(
out
->
data
[
1
],
out
->
linesize
[
1
],
in
->
data
[
1
],
in
->
linesize
[
1
],
cw
,
ch
,
&
unsharp
->
chroma
);
apply_unsharp
(
out
->
data
[
2
],
out
->
linesize
[
2
],
in
->
data
[
2
],
in
->
linesize
[
2
],
cw
,
ch
,
&
unsharp
->
chroma
);
if
((
ret
=
ff_draw_slice
(
link
->
dst
->
outputs
[
0
],
0
,
link
->
h
,
1
))
<
0
||
(
ret
=
ff_end_frame
(
link
->
dst
->
outputs
[
0
]))
<
0
)
return
ret
;
return
0
;
}
static
int
draw_slice
(
AVFilterLink
*
link
,
int
y
,
int
h
,
int
slice_dir
)
{
return
0
;
avfilter_unref_bufferp
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
}
static
const
AVFilterPad
avfilter_vf_unsharp_inputs
[]
=
{
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
draw_slice
=
draw_slice
,
.
end_frame
=
end_frame
,
.
filter_frame
=
filter_frame
,
.
config_props
=
config_props
,
.
min_perms
=
AV_PERM_READ
,
},
...
...
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