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
ccd70d9c
Commit
ccd70d9c
authored
Feb 09, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_yadif: factorize initializing the filtering callbacks
Do it all in config_props().
parent
3594554a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
vf_yadif.c
libavfilter/vf_yadif.c
+12
-11
No files found.
libavfilter/vf_yadif.c
View file @
ccd70d9c
...
@@ -194,11 +194,6 @@ static int return_frame(AVFilterContext *ctx, int is_second)
...
@@ -194,11 +194,6 @@ static int return_frame(AVFilterContext *ctx, int is_second)
yadif
->
out
->
video
->
interlaced
=
0
;
yadif
->
out
->
video
->
interlaced
=
0
;
}
}
if
(
!
yadif
->
csp
)
yadif
->
csp
=
av_pix_fmt_desc_get
(
link
->
format
);
if
(
yadif
->
csp
->
comp
[
0
].
depth_minus1
/
8
==
1
)
yadif
->
filter_line
=
filter_line_c_16bit
;
filter
(
ctx
,
yadif
->
out
,
tff
^
!
is_second
,
tff
);
filter
(
ctx
,
yadif
->
out
,
tff
^
!
is_second
,
tff
);
if
(
is_second
)
{
if
(
is_second
)
{
...
@@ -374,17 +369,11 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
...
@@ -374,17 +369,11 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
yadif
->
mode
=
0
;
yadif
->
mode
=
0
;
yadif
->
parity
=
-
1
;
yadif
->
parity
=
-
1
;
yadif
->
auto_enable
=
0
;
yadif
->
auto_enable
=
0
;
yadif
->
csp
=
NULL
;
if
(
args
)
if
(
args
)
sscanf
(
args
,
"%d:%d:%d"
,
sscanf
(
args
,
"%d:%d:%d"
,
&
yadif
->
mode
,
&
yadif
->
parity
,
&
yadif
->
auto_enable
);
&
yadif
->
mode
,
&
yadif
->
parity
,
&
yadif
->
auto_enable
);
yadif
->
filter_line
=
filter_line_c
;
if
(
ARCH_X86
)
ff_yadif_init_x86
(
yadif
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"mode:%d parity:%d auto_enable:%d
\n
"
,
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"mode:%d parity:%d auto_enable:%d
\n
"
,
yadif
->
mode
,
yadif
->
parity
,
yadif
->
auto_enable
);
yadif
->
mode
,
yadif
->
parity
,
yadif
->
auto_enable
);
...
@@ -393,11 +382,23 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
...
@@ -393,11 +382,23 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
static
int
config_props
(
AVFilterLink
*
link
)
static
int
config_props
(
AVFilterLink
*
link
)
{
{
YADIFContext
*
s
=
link
->
src
->
priv
;
link
->
time_base
.
num
=
link
->
src
->
inputs
[
0
]
->
time_base
.
num
;
link
->
time_base
.
num
=
link
->
src
->
inputs
[
0
]
->
time_base
.
num
;
link
->
time_base
.
den
=
link
->
src
->
inputs
[
0
]
->
time_base
.
den
*
2
;
link
->
time_base
.
den
=
link
->
src
->
inputs
[
0
]
->
time_base
.
den
*
2
;
link
->
w
=
link
->
src
->
inputs
[
0
]
->
w
;
link
->
w
=
link
->
src
->
inputs
[
0
]
->
w
;
link
->
h
=
link
->
src
->
inputs
[
0
]
->
h
;
link
->
h
=
link
->
src
->
inputs
[
0
]
->
h
;
s
->
csp
=
av_pix_fmt_desc_get
(
link
->
format
);
if
(
s
->
csp
->
comp
[
0
].
depth_minus1
/
8
==
1
)
{
s
->
filter_line
=
filter_line_c_16bit
;
}
else
{
s
->
filter_line
=
filter_line_c
;
if
(
ARCH_X86
)
ff_yadif_init_x86
(
s
);
}
return
0
;
return
0
;
}
}
...
...
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