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
49dd71a6
Commit
49dd71a6
authored
Nov 27, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_fieldorder: reindent
parent
565e4993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
vf_fieldorder.c
libavfilter/vf_fieldorder.c
+36
-36
No files found.
libavfilter/vf_fieldorder.c
View file @
49dd71a6
...
...
@@ -133,46 +133,46 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
frame
->
video
->
top_field_first
==
s
->
dst_tff
)
return
ff_filter_frame
(
outlink
,
frame
);
av_dlog
(
ctx
,
"picture will move %s one line
\n
"
,
s
->
dst_tff
?
"up"
:
"down"
);
h
=
frame
->
video
->
h
;
for
(
plane
=
0
;
plane
<
4
&&
frame
->
data
[
plane
];
plane
++
)
{
line_step
=
frame
->
linesize
[
plane
];
line_size
=
s
->
line_size
[
plane
];
data
=
frame
->
data
[
plane
];
if
(
s
->
dst_tff
)
{
/** Move every line up one line, working from
* the top to the bottom of the frame.
* The original top line is lost.
* The new last line is created as a copy of the
* penultimate line from that field. */
for
(
line
=
0
;
line
<
h
;
line
++
)
{
if
(
1
+
line
<
frame
->
video
->
h
)
{
memcpy
(
data
,
data
+
line_step
,
line_size
);
}
else
{
memcpy
(
data
,
data
-
line_step
-
line_step
,
line_size
);
}
data
+=
line_step
;
av_dlog
(
ctx
,
"picture will move %s one line
\n
"
,
s
->
dst_tff
?
"up"
:
"down"
);
h
=
frame
->
video
->
h
;
for
(
plane
=
0
;
plane
<
4
&&
frame
->
data
[
plane
];
plane
++
)
{
line_step
=
frame
->
linesize
[
plane
];
line_size
=
s
->
line_size
[
plane
];
data
=
frame
->
data
[
plane
];
if
(
s
->
dst_tff
)
{
/** Move every line up one line, working from
* the top to the bottom of the frame.
* The original top line is lost.
* The new last line is created as a copy of the
* penultimate line from that field. */
for
(
line
=
0
;
line
<
h
;
line
++
)
{
if
(
1
+
line
<
frame
->
video
->
h
)
{
memcpy
(
data
,
data
+
line_step
,
line_size
);
}
else
{
memcpy
(
data
,
data
-
line_step
-
line_step
,
line_size
);
}
}
else
{
/** Move every line down one line, working from
* the bottom to the top of the frame.
* The original bottom line is lost.
* The new first line is created as a copy of the
* second line from that field. */
data
+=
(
h
-
1
)
*
line_step
;
for
(
line
=
h
-
1
;
line
>=
0
;
line
--
)
{
if
(
line
>
0
)
{
memcpy
(
data
,
data
-
line_step
,
line_size
);
}
else
{
memcpy
(
data
,
data
+
line_step
+
line_step
,
line_size
);
}
data
-=
line_step
;
data
+=
line_step
;
}
}
else
{
/** Move every line down one line, working from
* the bottom to the top of the frame.
* The original bottom line is lost.
* The new first line is created as a copy of the
* second line from that field. */
data
+=
(
h
-
1
)
*
line_step
;
for
(
line
=
h
-
1
;
line
>=
0
;
line
--
)
{
if
(
line
>
0
)
{
memcpy
(
data
,
data
-
line_step
,
line_size
);
}
else
{
memcpy
(
data
,
data
+
line_step
+
line_step
,
line_size
)
;
}
data
-=
line_step
;
}
}
frame
->
video
->
top_field_first
=
s
->
dst_tff
;
}
frame
->
video
->
top_field_first
=
s
->
dst_tff
;
return
ff_filter_frame
(
outlink
,
frame
);
}
...
...
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