aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_interlace.c
diff options
context:
space:
mode:
authorThomas Mundt <tmundt75@gmail.com>2017-04-20 23:26:59 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-22 20:12:15 +0200
commit207e6debf866ae4f8bdf864a5f389ef42660324d (patch)
tree87e4bb430785c39207f690ac9a1284e604f808d6 /libavfilter/vf_interlace.c
parent362f6c91e466b2114d0827c6d58e26e121ed11e8 (diff)
downloadffmpeg-207e6debf866ae4f8bdf864a5f389ef42660324d.tar.gz
avfilter/interlace: change lowpass_line function prototype
Signed-off-by: Thomas Mundt <tmundt75@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_interlace.c')
-rw-r--r--libavfilter/vf_interlace.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
index efa3128727..8da8326709 100644
--- a/libavfilter/vf_interlace.c
+++ b/libavfilter/vf_interlace.c
@@ -55,9 +55,10 @@ AVFILTER_DEFINE_CLASS(interlace);
static void lowpass_line_c(uint8_t *dstp, ptrdiff_t linesize,
const uint8_t *srcp,
- const uint8_t *srcp_above,
- const uint8_t *srcp_below)
+ ptrdiff_t mref, ptrdiff_t pref)
{
+ const uint8_t *srcp_above = srcp + mref;
+ const uint8_t *srcp_below = srcp + pref;
int i;
for (i = 0; i < linesize; i++) {
// this calculation is an integer representation of
@@ -154,13 +155,13 @@ static void copy_picture_field(InterlaceContext *s,
int srcp_linesize = src_frame->linesize[plane] * 2;
int dstp_linesize = dst_frame->linesize[plane] * 2;
for (j = lines; j > 0; j--) {
- const uint8_t *srcp_above = srcp - src_frame->linesize[plane];
- const uint8_t *srcp_below = srcp + src_frame->linesize[plane];
+ ptrdiff_t pref = src_frame->linesize[plane];
+ ptrdiff_t mref = -pref;
if (j == lines)
- srcp_above = srcp; // there is no line above
- if (j == 1)
- srcp_below = srcp; // there is no line below
- s->lowpass_line(dstp, cols, srcp, srcp_above, srcp_below);
+ mref = 0; // there is no line above
+ else if (j == 1)
+ pref = 0; // there is no line below
+ s->lowpass_line(dstp, cols, srcp, mref, pref);
dstp += dstp_linesize;
srcp += srcp_linesize;
}