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
b84871b8
Commit
b84871b8
authored
Dec 30, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_tinterlace: dont mix declarations and expressions
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c0c0b196
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vf_tinterlace.c
libavfilter/vf_tinterlace.c
+3
-2
No files found.
libavfilter/vf_tinterlace.c
View file @
b84871b8
...
...
@@ -185,6 +185,7 @@ void copy_picture_field(uint8_t *dst[4], int dst_linesize[4],
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
format
);
int
plane
,
vsub
=
desc
->
log2_chroma_h
;
int
k
=
src_field
==
FIELD_UPPER_AND_LOWER
?
1
:
2
;
int
h
,
i
;
for
(
plane
=
0
;
plane
<
desc
->
nb_components
;
plane
++
)
{
int
lines
=
plane
==
1
||
plane
==
2
?
src_h
>>
vsub
:
src_h
;
...
...
@@ -206,12 +207,12 @@ void copy_picture_field(uint8_t *dst[4], int dst_linesize[4],
// Filtering will reduce interlace 'twitter' and Moire patterning.
int
srcp_linesize
=
src_linesize
[
plane
]
*
k
;
int
dstp_linesize
=
dst_linesize
[
plane
]
*
(
interleave
?
2
:
1
);
for
(
int
h
=
lines
;
h
>
0
;
h
--
)
{
for
(
h
=
lines
;
h
>
0
;
h
--
)
{
const
uint8_t
*
srcp_above
=
srcp
-
src_linesize
[
plane
];
const
uint8_t
*
srcp_below
=
srcp
+
src_linesize
[
plane
];
if
(
h
==
lines
)
srcp_above
=
srcp
;
// there is no line above
if
(
h
==
1
)
srcp_below
=
srcp
;
// there is no line below
for
(
i
nt
i
=
0
;
i
<
linesize
;
i
++
)
{
for
(
i
=
0
;
i
<
linesize
;
i
++
)
{
// this calculation is an integer representation of
// '0.5 * current + 0.25 * above + 0.25 + below'
// '1 +' is for rounding. */
...
...
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