[FFmpeg-devel] [PATCH] libavfilter-soc: extend vf_scale.c to make it support colorspace details setting

Michael Niedermayer michaelni
Sat Apr 18 20:00:41 CEST 2009

On Sat, Apr 18, 2009 at 07:13:49PM +0200, Michael Niedermayer wrote:
> On Sat, Apr 18, 2009 at 06:03:13PM +0200, Vitor Sessak wrote:
> > Stefano Sabatini wrote:
> >> On date Thursday 2009-04-16 00:29:13 +0200, Stefano Sabatini encoded:
> >>> On date Wednesday 2009-04-15 22:56:27 +0200, Stefano Sabatini encoded:
> >>>> Hi, as in subject,
> >>>>
> >>>> maybe the patch should be split, also chroma horizontal shifting and
> >>>> chroma vertical shifting support should be added.
> >>>>
> >>>> Try it with:
> >>>> ffplay in.avi -vfilters  
> >>>> "scale=0:0:sws_flags\=+print_info:lgb\=3.0:cgb\=3.0:brightness\=-20, 
> >>>> format=rgb32"
> >>>>
> >>>> Note that the format=rgb32 or equivalent is required to make the
> >>>> destination format of the filter supported by
> >>>> sws_get/setColorspaceDetails(), or no filtering will be done (the
> >>>> filter still prints a warning in this case).
> >>>>
> >>>> BTW I get red chroma shifting when using format=argb.
> >>> Patch updated with some cleanups and chs/cvs support added.
> >
> > Sorry for the delay. Patch looks fine for me, but I think vf_scale is 
> > getting more and more complex and could use some documentation in 
> > vfilters.texi.
> also id like to say that people should try to move code from soc to
> main svn. The bigger the code in soc becomes the harder it will
> be to ever move this into main svn.
> Changes like this patch make the code less acceptable not more.
> Ive said it already, and i say it again, parameter parsing must be
> done cleanly, AVOptions are there and can be used, if you implement the
> same in 5 times as much code with strcmp & scanf you just added yourself
> reverting work if the code is supposed to reach main svn

and to skip the "how do i" question
you have a struct you added variables there, now instead of a long list
of broken strstr()+scanf() that work by mere luck of not having some strings
occur you add a AVOptions table, split the string cleanly and use AVOptions

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- 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/20090418/da8dfc39/attachment.pgp>

More information about the ffmpeg-devel mailing list