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
1b43fc12
Commit
1b43fc12
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_hqdn3d: switch to filter_frame
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8227a0b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
20 deletions
+29
-20
vf_hqdn3d.c
libavfilter/vf_hqdn3d.c
+29
-20
No files found.
libavfilter/vf_hqdn3d.c
View file @
1b43fc12
...
...
@@ -321,46 +321,55 @@ static int config_input(AVFilterLink *inlink)
return
0
;
}
static
int
null_draw_slice
(
AVFilterLink
*
link
,
int
y
,
int
h
,
int
slice_dir
)
{
return
0
;
}
static
int
end_frame
(
AVFilterLink
*
inlink
)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
in
)
{
HQDN3DContext
*
hqdn3d
=
inlink
->
dst
->
priv
;
AVFilterLink
*
outlink
=
inlink
->
dst
->
outputs
[
0
];
AVFilterBufferRef
*
inpic
=
inlink
->
cur_buf
;
AVFilterBufferRef
*
outpic
=
outlink
->
out_buf
;
int
ret
,
c
;
AVFilterBufferRef
*
out
;
int
direct
,
c
;
if
((
in
->
perms
&
AV_PERM_WRITE
)
&&
!
(
in
->
perms
&
AV_PERM_PRESERVE
))
{
direct
=
1
;
out
=
in
;
}
else
{
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
);
out
->
video
->
w
=
outlink
->
w
;
out
->
video
->
h
=
outlink
->
h
;
}
for
(
c
=
0
;
c
<
3
;
c
++
)
{
denoise
(
hqdn3d
,
in
pic
->
data
[
c
],
outpic
->
data
[
c
],
denoise
(
hqdn3d
,
in
->
data
[
c
],
out
->
data
[
c
],
hqdn3d
->
line
,
&
hqdn3d
->
frame_prev
[
c
],
in
pic
->
video
->
w
>>
(
!!
c
*
hqdn3d
->
hsub
),
in
pic
->
video
->
h
>>
(
!!
c
*
hqdn3d
->
vsub
),
in
pic
->
linesize
[
c
],
outpic
->
linesize
[
c
],
in
->
video
->
w
>>
(
!!
c
*
hqdn3d
->
hsub
),
in
->
video
->
h
>>
(
!!
c
*
hqdn3d
->
vsub
),
in
->
linesize
[
c
],
out
->
linesize
[
c
],
hqdn3d
->
coefs
[
c
?
2
:
0
],
hqdn3d
->
coefs
[
c
?
3
:
1
]);
}
if
(
(
ret
=
ff_draw_slice
(
outlink
,
0
,
inpic
->
video
->
h
,
1
))
<
0
||
(
ret
=
ff_end_frame
(
outlink
))
<
0
)
return
ret
;
return
0
;
if
(
!
direct
)
avfilter_unref_bufferp
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
)
;
}
static
const
AVFilterPad
avfilter_vf_hqdn3d_inputs
[]
=
{
{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
start_frame
=
ff_inplace_start_frame
,
.
draw_slice
=
null_draw_slice
,
.
config_props
=
config_input
,
.
end_frame
=
end_frame
.
filter_frame
=
filter_frame
,
},
{
NULL
}
};
static
const
AVFilterPad
avfilter_vf_hqdn3d_outputs
[]
=
{
{
.
name
=
"default"
,
...
...
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