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
cd1b22d8
Commit
cd1b22d8
authored
Sep 28, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/dualinput: simplify
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
5c7d86cb
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
49 deletions
+18
-49
dualinput.c
libavfilter/dualinput.c
+1
-7
dualinput.h
libavfilter/dualinput.h
+1
-2
vf_blend.c
libavfilter/vf_blend.c
+4
-10
vf_lut3d.c
libavfilter/vf_lut3d.c
+4
-10
vf_overlay.c
libavfilter/vf_overlay.c
+4
-10
vf_psnr.c
libavfilter/vf_psnr.c
+4
-10
No files found.
libavfilter/dualinput.c
View file @
cd1b22d8
...
...
@@ -66,13 +66,7 @@ int ff_dualinput_init(AVFilterContext *ctx, FFDualInputContext *s)
return
ff_framesync_configure
(
&
s
->
fs
);
}
int
ff_dualinput_filter_frame_main
(
FFDualInputContext
*
s
,
AVFilterLink
*
inlink
,
AVFrame
*
in
)
{
return
ff_framesync_filter_frame
(
&
s
->
fs
,
inlink
,
in
);
}
int
ff_dualinput_filter_frame_second
(
FFDualInputContext
*
s
,
int
ff_dualinput_filter_frame
(
FFDualInputContext
*
s
,
AVFilterLink
*
inlink
,
AVFrame
*
in
)
{
return
ff_framesync_filter_frame
(
&
s
->
fs
,
inlink
,
in
);
...
...
libavfilter/dualinput.h
View file @
cd1b22d8
...
...
@@ -39,8 +39,7 @@ typedef struct {
}
FFDualInputContext
;
int
ff_dualinput_init
(
AVFilterContext
*
ctx
,
FFDualInputContext
*
s
);
int
ff_dualinput_filter_frame_main
(
FFDualInputContext
*
s
,
AVFilterLink
*
inlink
,
AVFrame
*
in
);
int
ff_dualinput_filter_frame_second
(
FFDualInputContext
*
s
,
AVFilterLink
*
inlink
,
AVFrame
*
in
);
int
ff_dualinput_filter_frame
(
FFDualInputContext
*
s
,
AVFilterLink
*
inlink
,
AVFrame
*
in
);
int
ff_dualinput_request_frame
(
FFDualInputContext
*
s
,
AVFilterLink
*
outlink
);
void
ff_dualinput_uninit
(
FFDualInputContext
*
s
);
...
...
libavfilter/vf_blend.c
View file @
cd1b22d8
...
...
@@ -422,27 +422,21 @@ static int request_frame(AVFilterLink *outlink)
return
ff_dualinput_request_frame
(
&
b
->
dinput
,
outlink
);
}
static
int
filter_frame
_top
(
AVFilterLink
*
inlink
,
AVFrame
*
buf
)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
buf
)
{
BlendContext
*
b
=
inlink
->
dst
->
priv
;
return
ff_dualinput_filter_frame_main
(
&
b
->
dinput
,
inlink
,
buf
);
}
static
int
filter_frame_bottom
(
AVFilterLink
*
inlink
,
AVFrame
*
buf
)
{
BlendContext
*
b
=
inlink
->
dst
->
priv
;
return
ff_dualinput_filter_frame_second
(
&
b
->
dinput
,
inlink
,
buf
);
return
ff_dualinput_filter_frame
(
&
b
->
dinput
,
inlink
,
buf
);
}
static
const
AVFilterPad
blend_inputs
[]
=
{
{
.
name
=
"top"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
filter_frame
=
filter_frame
_top
,
.
filter_frame
=
filter_frame
,
},{
.
name
=
"bottom"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
filter_frame
=
filter_frame
_bottom
,
.
filter_frame
=
filter_frame
,
},
{
NULL
}
};
...
...
libavfilter/vf_lut3d.c
View file @
cd1b22d8
...
...
@@ -667,16 +667,10 @@ static int config_output(AVFilterLink *outlink)
return
0
;
}
static
int
filter_frame_
main
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
static
int
filter_frame_
hald
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
{
LUT3DContext
*
s
=
inlink
->
dst
->
priv
;
return
ff_dualinput_filter_frame_main
(
&
s
->
dinput
,
inlink
,
inpicref
);
}
static
int
filter_frame_clut
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
{
LUT3DContext
*
s
=
inlink
->
dst
->
priv
;
return
ff_dualinput_filter_frame_second
(
&
s
->
dinput
,
inlink
,
inpicref
);
return
ff_dualinput_filter_frame
(
&
s
->
dinput
,
inlink
,
inpicref
);
}
static
int
request_frame
(
AVFilterLink
*
outlink
)
...
...
@@ -766,12 +760,12 @@ static const AVFilterPad haldclut_inputs[] = {
{
.
name
=
"main"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
filter_frame
=
filter_frame_
main
,
.
filter_frame
=
filter_frame_
hald
,
.
config_props
=
config_input
,
},{
.
name
=
"clut"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
filter_frame
=
filter_frame_
clut
,
.
filter_frame
=
filter_frame_
hald
,
.
config_props
=
config_clut
,
},
{
NULL
}
...
...
libavfilter/vf_overlay.c
View file @
cd1b22d8
...
...
@@ -549,16 +549,10 @@ static AVFrame *do_blend(AVFilterContext *ctx, AVFrame *mainpic,
return
mainpic
;
}
static
int
filter_frame
_main
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
{
OverlayContext
*
s
=
inlink
->
dst
->
priv
;
return
ff_dualinput_filter_frame_main
(
&
s
->
dinput
,
inlink
,
inpicref
);
}
static
int
filter_frame_over
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
{
OverlayContext
*
s
=
inlink
->
dst
->
priv
;
return
ff_dualinput_filter_frame_second
(
&
s
->
dinput
,
inlink
,
inpicref
);
return
ff_dualinput_filter_frame
(
&
s
->
dinput
,
inlink
,
inpicref
);
}
static
int
request_frame
(
AVFilterLink
*
outlink
)
...
...
@@ -606,14 +600,14 @@ static const AVFilterPad avfilter_vf_overlay_inputs[] = {
.
name
=
"main"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
config_props
=
config_input_main
,
.
filter_frame
=
filter_frame
_main
,
.
filter_frame
=
filter_frame
,
.
needs_writable
=
1
,
},
{
.
name
=
"overlay"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
config_props
=
config_input_overlay
,
.
filter_frame
=
filter_frame
_over
,
.
filter_frame
=
filter_frame
,
},
{
NULL
}
};
...
...
libavfilter/vf_psnr.c
View file @
cd1b22d8
...
...
@@ -320,16 +320,10 @@ static int config_output(AVFilterLink *outlink)
return
0
;
}
static
int
filter_frame
_main
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
{
PSNRContext
*
s
=
inlink
->
dst
->
priv
;
return
ff_dualinput_filter_frame_main
(
&
s
->
dinput
,
inlink
,
inpicref
);
}
static
int
filter_frame_ref
(
AVFilterLink
*
inlink
,
AVFrame
*
inpicref
)
{
PSNRContext
*
s
=
inlink
->
dst
->
priv
;
return
ff_dualinput_filter_frame_second
(
&
s
->
dinput
,
inlink
,
inpicref
);
return
ff_dualinput_filter_frame
(
&
s
->
dinput
,
inlink
,
inpicref
);
}
static
int
request_frame
(
AVFilterLink
*
outlink
)
...
...
@@ -359,11 +353,11 @@ static const AVFilterPad psnr_inputs[] = {
{
.
name
=
"main"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
filter_frame
=
filter_frame
_main
,
.
filter_frame
=
filter_frame
,
},{
.
name
=
"reference"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
filter_frame
=
filter_frame
_ref
,
.
filter_frame
=
filter_frame
,
.
config_props
=
config_input_ref
,
},
{
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