Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b0f65613
Commit
b0f65613
authored
Sep 26, 2010
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics: fix style nits.
Originally committed as revision 25207 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
02b424d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
vf_yadif.c
libavfilter/vf_yadif.c
+15
-14
No files found.
libavfilter/vf_yadif.c
View file @
b0f65613
...
@@ -164,23 +164,24 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms, int w,
...
@@ -164,23 +164,24 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms, int w,
return
picref
;
return
picref
;
}
}
static
void
return_frame
(
AVFilterContext
*
ctx
,
int
is_second
){
static
void
return_frame
(
AVFilterContext
*
ctx
,
int
is_second
)
{
YADIFContext
*
yadif
=
ctx
->
priv
;
YADIFContext
*
yadif
=
ctx
->
priv
;
AVFilterLink
*
link
=
ctx
->
outputs
[
0
];
AVFilterLink
*
link
=
ctx
->
outputs
[
0
];
int
tff
=
yadif
->
parity
==
-
1
?
yadif
->
cur
->
video
->
top_field_first
:
(
yadif
->
parity
^
1
);
int
tff
=
yadif
->
parity
==
-
1
?
yadif
->
cur
->
video
->
top_field_first
:
(
yadif
->
parity
^
1
);
if
(
is_second
)
if
(
is_second
)
yadif
->
out
=
avfilter_get_video_buffer
(
link
,
AV_PERM_WRITE
|
AV_PERM_PRESERVE
|
yadif
->
out
=
avfilter_get_video_buffer
(
link
,
AV_PERM_WRITE
|
AV_PERM_PRESERVE
|
AV_PERM_REUSE
,
link
->
w
,
link
->
h
);
AV_PERM_REUSE
,
link
->
w
,
link
->
h
);
filter
(
ctx
,
yadif
->
out
,
tff
^
!
is_second
,
tff
);
filter
(
ctx
,
yadif
->
out
,
tff
^
!
is_second
,
tff
);
if
(
is_second
)
if
(
is_second
)
avfilter_start_frame
(
ctx
->
outputs
[
0
],
yadif
->
out
);
avfilter_start_frame
(
ctx
->
outputs
[
0
],
yadif
->
out
);
avfilter_draw_slice
(
ctx
->
outputs
[
0
],
0
,
link
->
h
,
1
);
avfilter_draw_slice
(
ctx
->
outputs
[
0
],
0
,
link
->
h
,
1
);
avfilter_end_frame
(
ctx
->
outputs
[
0
]);
avfilter_end_frame
(
ctx
->
outputs
[
0
]);
yadif
->
frame_pending
=
(
yadif
->
mode
&
1
)
&&
!
is_second
;
yadif
->
frame_pending
=
(
yadif
->
mode
&
1
)
&&
!
is_second
;
}
}
static
void
start_frame
(
AVFilterLink
*
link
,
AVFilterBufferRef
*
picref
)
static
void
start_frame
(
AVFilterLink
*
link
,
AVFilterBufferRef
*
picref
)
...
@@ -188,7 +189,7 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
...
@@ -188,7 +189,7 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
AVFilterContext
*
ctx
=
link
->
dst
;
AVFilterContext
*
ctx
=
link
->
dst
;
YADIFContext
*
yadif
=
ctx
->
priv
;
YADIFContext
*
yadif
=
ctx
->
priv
;
if
(
yadif
->
frame_pending
)
if
(
yadif
->
frame_pending
)
return_frame
(
ctx
,
1
);
return_frame
(
ctx
,
1
);
if
(
yadif
->
prev
)
if
(
yadif
->
prev
)
...
@@ -197,7 +198,7 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
...
@@ -197,7 +198,7 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
yadif
->
cur
=
yadif
->
next
;
yadif
->
cur
=
yadif
->
next
;
yadif
->
next
=
picref
;
yadif
->
next
=
picref
;
if
(
!
yadif
->
cur
)
if
(
!
yadif
->
cur
)
return
;
return
;
if
(
!
yadif
->
prev
)
if
(
!
yadif
->
prev
)
...
@@ -215,7 +216,7 @@ static void end_frame(AVFilterLink *link)
...
@@ -215,7 +216,7 @@ static void end_frame(AVFilterLink *link)
AVFilterContext
*
ctx
=
link
->
dst
;
AVFilterContext
*
ctx
=
link
->
dst
;
YADIFContext
*
yadif
=
ctx
->
priv
;
YADIFContext
*
yadif
=
ctx
->
priv
;
if
(
!
yadif
->
out
)
if
(
!
yadif
->
out
)
return
;
return
;
return_frame
(
ctx
,
0
);
return_frame
(
ctx
,
0
);
...
@@ -226,17 +227,17 @@ static int request_frame(AVFilterLink *link)
...
@@ -226,17 +227,17 @@ static int request_frame(AVFilterLink *link)
AVFilterContext
*
ctx
=
link
->
src
;
AVFilterContext
*
ctx
=
link
->
src
;
YADIFContext
*
yadif
=
ctx
->
priv
;
YADIFContext
*
yadif
=
ctx
->
priv
;
if
(
yadif
->
frame_pending
)
{
if
(
yadif
->
frame_pending
)
{
return_frame
(
ctx
,
1
);
return_frame
(
ctx
,
1
);
return
0
;
return
0
;
}
}
do
{
do
{
int
ret
;
int
ret
;
if
((
ret
=
avfilter_request_frame
(
link
->
src
->
inputs
[
0
])))
if
((
ret
=
avfilter_request_frame
(
link
->
src
->
inputs
[
0
])))
return
ret
;
return
ret
;
}
while
(
!
yadif
->
cur
);
}
while
(
!
yadif
->
cur
);
return
0
;
return
0
;
}
}
...
@@ -246,12 +247,12 @@ static int poll_frame(AVFilterLink *link)
...
@@ -246,12 +247,12 @@ static int poll_frame(AVFilterLink *link)
YADIFContext
*
yadif
=
link
->
src
->
priv
;
YADIFContext
*
yadif
=
link
->
src
->
priv
;
int
ret
,
val
;
int
ret
,
val
;
if
(
yadif
->
frame_pending
)
if
(
yadif
->
frame_pending
)
return
1
;
return
1
;
val
=
avfilter_poll_frame
(
link
->
src
->
inputs
[
0
]);
val
=
avfilter_poll_frame
(
link
->
src
->
inputs
[
0
]);
if
(
val
==
1
&&
!
yadif
->
next
)
{
//FIXME change API to not requre this red tape
if
(
val
==
1
&&
!
yadif
->
next
)
{
//FIXME change API to not requre this red tape
if
((
ret
=
avfilter_request_frame
(
link
->
src
->
inputs
[
0
]))
<
0
)
if
((
ret
=
avfilter_request_frame
(
link
->
src
->
inputs
[
0
]))
<
0
)
return
ret
;
return
ret
;
val
=
avfilter_poll_frame
(
link
->
src
->
inputs
[
0
]);
val
=
avfilter_poll_frame
(
link
->
src
->
inputs
[
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