[FFmpeg-cvslog] vf_tinterlace: dont mix declarations and expressions
Michael Niedermayer
git at videolan.org
Sun Dec 30 17:03:32 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 30 16:59:52 2012 +0100| [b84871b8eba5370afd5f0cef0f5cbd481291be01] | committer: Michael Niedermayer
vf_tinterlace: dont mix declarations and expressions
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b84871b8eba5370afd5f0cef0f5cbd481291be01
---
libavfilter/vf_tinterlace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index e34a7d2..6d6f672 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. */
More information about the ffmpeg-cvslog
mailing list