[FFmpeg-devel] Flushing yadif

Michael Niedermayer michaelni at gmx.at
Thu May 3 13:20:52 CEST 2012


On Wed, May 02, 2012 at 01:27:50PM +0200, Robert Nagy wrote:
> > From 853df5acd3a1f563853b8a9c877373df48dec866 Mon Sep 17 00:00:00 2001
> > From: Robert Nagy <ronag89 at gmail.com>
> > Date: Wed, 2 May 2012 10:03:22 +0200
> > Subject: [PATCH] yadif: Add flushing of last frame.
> >
> > ---
> >  libavfilter/vf_yadif.c |   24 ++++++++++++++++++------
> >  1 files changed, 18 insertions(+), 6 deletions(-)
> >
> > diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
> > index d8e2ad6..2c2bc60 100644
> > --- a/libavfilter/vf_yadif.c
> > +++ b/libavfilter/vf_yadif.c
> > @@ -155,7 +155,7 @@ static void filter(AVFilterContext *ctx,
> AVFilterBufferRef *dstpic,
> >              if ((y ^ parity) & 1) {
> >                  uint8_t *prev = &yadif->prev->data[i][y*refs];
> >                  uint8_t *cur  = &yadif->cur ->data[i][y*refs];
> > -                uint8_t *next = &yadif->next->data[i][y*refs];
> > +                uint8_t *next = yadif->next ?
> &yadif->next->data[i][y*refs] : cur; // Should optimally only use last
> field of "cur".
> >                  uint8_t *dst  = &dstpic->data[i][y*dstpic->linesize[i]];

do you have a public git clone?
iam asking because merging changes from there should be easier than
applying quoted and line broken patches

about the patch itself, have you tried just injecting cur again at
EOF ? This should avoid special casing things as there would be just
2 references to the same pic instead of a missing pic

thanks
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120503/4f5aaeeb/attachment.asc>


More information about the ffmpeg-devel mailing list