[FFmpeg-devel] lavfi noise generator

Michael Niedermayer michaelni
Tue Dec 30 22:49:53 CET 2008


On Tue, Dec 30, 2008 at 07:14:37PM +0100, Stefano Sabatini wrote:
> On date Monday 2008-12-29 16:27:04 +0100, Vitor Sessak encoded:
> > Stefano Sabatini wrote:
> >> On date Monday 2008-12-29 12:06:20 +0100, Vitor Sessak encoded:
[...]
> > But maybe an even cleaner solution would be to use draw_slice() and  
> > change the function avfilter_request_frame() as in the completely  
> > untested attached patch.
> 
> [...]
> 
> > Index: libavfilter/avfilter.c
> > ===================================================================
> > --- libavfilter/avfilter.c	(revision 16243)
> > +++ libavfilter/avfilter.c	(working copy)
> > @@ -179,7 +179,18 @@
> >          return link_spad(link).request_frame(link);
> >      else if(link->src->inputs[0])
> >          return avfilter_request_frame(link->src->inputs[0]);
> > +    else if (link_spad(link).draw_slice) {
> > +        int h;
> > +        for (h=0; h < link->h; h += SLICE_SIZE) {
> > +            AVFilterPicRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE);
> > +            avfilter_start_frame(link, avfilter_ref_pic(picref, ~0));
> > +            link_spad(link).draw_slice(link, h, FFMIN(h+SLICE_SIZE, link->h));
> > +        }
> > +        avfilter_end_frame(link);

shouldnz the avfilter_start_frame() be outside the loop ?



> > +        avfilter_unref_pic(picref);
> > +    }
> >      else return -1;
> > +    return 0;
> >  }
> >  
> >  int avfilter_poll_frame(AVFilterLink *link)
> 
> Looks reasonable to me, let's look at what Michael thinks about it.

iam not against it ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081230/5b791f5c/attachment.pgp>



More information about the ffmpeg-devel mailing list