[FFmpeg-devel] [PATCH] Implement frei0r source.

Michael Niedermayer michaelni
Tue Nov 30 01:04:18 CET 2010


On Fri, Nov 26, 2010 at 12:44:45AM +0100, Stefano Sabatini wrote:
> On date Thursday 2010-11-25 18:18:16 +0100, Michael Niedermayer encoded:
> > On Wed, Nov 24, 2010 at 01:38:10AM +0100, Stefano Sabatini wrote:
> > [...]
> > 
> > > +static int source_request_frame(AVFilterLink *inlink)
> > 
> > outlink
> 
> Fixed.
>  
> > > +{
> > > +    Frei0rContext *frei0r = inlink->src->priv;
> > > +    AVFilterBufferRef *picref = avfilter_get_video_buffer(inlink, AV_PERM_WRITE, inlink->w, inlink->h);
> > > +    picref->video->pixel_aspect = (AVRational) {1, 1};
> > 
> > > +    picref->pts = av_rescale_q(frei0r->pts++, frei0r->time_base, inlink->time_base);
> > 
> > a source filter should never need timestamp rescaling
> 
> Fixed.
> 
> I also changed the syntax for the frei0r_src, so it now accepts:
> frei0r_src=size:rate:name=params
> 
> as I found name=params more intuitive (and the old syntax is
> supported, if you're OK I'll change the frei0r filter accordingly).
> 
> And I'm not sure about the name, frei0r_src is more readable but
> frei0rsrc is consistent with nullsrc, opinions?
> -- 
> FFmpeg = Frenzy and Fancy Multimedia Perennial Exciting Gnome

>  doc/filters.texi         |   29 +++++++++++
>  libavfilter/Makefile     |    1 
>  libavfilter/allfilters.c |    1 
>  libavfilter/vf_frei0r.c  |  121 +++++++++++++++++++++++++++++++++++++++++++----
>  4 files changed, 142 insertions(+), 10 deletions(-)
> 9c9ff63c028ab37b7f7e1bbb30697fdcce5a0850  0001-Implement-frei0r-source.patch
> From d9468ca65013593a6f97039bc5abca6bb6c7aae7 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Mon, 8 Nov 2010 00:43:44 +0100
> Subject: [PATCH] Implement frei0r source.

[...]
> +static int source_request_frame(AVFilterLink *outlink)
> +{
> +    Frei0rContext *frei0r = outlink->src->priv;
> +    AVFilterBufferRef *picref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
> +    picref->video->pixel_aspect = (AVRational) {1, 1};
> +    picref->pts = frei0r->pts++;

> +    picref->pos = -1;

shouldnt this be default?

otherwise it should be ok if tested

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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101130/575d2238/attachment.pgp>



More information about the ffmpeg-devel mailing list