diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-30 19:59:52 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-30 19:59:52 +0400 |
commit | b84871b8eba5370afd5f0cef0f5cbd481291be01 (patch) | |
tree | 7b4deb4e96f5b6842c4c9615224160dcf008c20b | |
parent | c0c0b19644eb60957294d6cc211c8f91c88afe35 (diff) |
vf_tinterlace: dont mix declarations and expressions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/vf_tinterlace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c index e34a7d2a6e..6d6f6729a2 100644 --- a/libavfilter/vf_tinterlace.c +++ b/libavfilter/vf_tinterlace.c @@ -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 (int 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. */ |