[FFmpeg-devel] [PATCH] lavfi: port libmpcodecs delogo filter

Stefano Sabatini stefano.sabatini-lala at poste.it
Thu Aug 11 13:47:20 CEST 2011


On date Thursday 2011-08-11 12:35:28 +0200, Nicolas George encoded:
> Le quartidi 24 thermidor, an CCXIX, Stefano Sabatini a écrit :
> > I see, I was basing the port on the libavfilter/libmpcodecs
> > code. Indeed now I see the MPlayer code is different, if my guess is
> > right it is supporting option parsing (when was it added?).
> 
> Option parsing has been there for a long time. I suppose Michael removed it
> when adapting to the lavfi wrapper.
> 
> > For the file option we can add it in a second stage (maybe you could
> > do it as an exercise?)
> 
> Merging the file option would be pretty simple, I can do it once the filter
> is committed. The total amount of effort would probably have been slightly
> less if it had been merged before you started your porting efforts, but
> there is no changing the past, and I am as much to blame as anyone for not
> having done it.

Alternatively there is the possibility to make MPlayer adopt
libavfilter and avoid duplication of efforts. Steps for achieving this
objective may be discussed and implemented, in particular I wonder
which are the missing features that lavfi needs for that.

> > No the parsing code is not changing how the options are parsed, but
> > maybe we should use named options here, I mean something like that:
> > 
> > delogo=x=100:y=0:band=10:w=100:h=70
> > 
> > which should also provide a more useful feedback in case of invalid
> > parameters (but would be inconsistent with the current syntax).
> 
> FWIV, MPlayer supports both named and unnamed options. The same could be
> easily applied to any filter with both common and rare options:
> 
> int av_set_options_string_in_order(obj, str)
> {
>     if (strchr(args, '='))
> 	return av_set_options_string(obj, str, "=", ":");
>     /* split str on ':' and set the options in the order they appear in the
>      * array */
> }

Yes possibly a good idea.

I'd apply the attached version with named options parsing, but if
someone insists I'll try to implement this idea to retain backward
compatibility with the MPlayer delogo filter syntax.
-- 
FFmpeg = Formidable Frightening Mastering Pure Entertaining Gangster
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-lavfi-port-libmpcodecs-delogo-filter.patch
Type: text/x-diff
Size: 14267 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110811/36ea6d8f/attachment.bin>


More information about the ffmpeg-devel mailing list