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

Stefano Sabatini stefano.sabatini-lala
Sat May 2 14:23:42 CEST 2009


On date Saturday 2009-04-18 20:00:41 +0200, Michael Niedermayer encoded:
> 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

Patchset for using av_set_options_string(), still missing
documentation.

I'm also planning to use some expression for scaled w and h, similar
to what done for vf_pad.

Regards.
-- 
FFmpeg = Faboulous and Funny Maxi Pacific Elected God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scale-add-parse-options-support.patch
Type: text/x-diff
Size: 2203 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090502/214b590d/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scale-better-name-for-sws-opts.patch
Type: text/x-diff
Size: 937 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090502/214b590d/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scale-support-cpuflags.patch
Type: text/x-diff
Size: 1787 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090502/214b590d/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scale-add-support-to-cs.patch
Type: text/x-diff
Size: 3938 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090502/214b590d/attachment-0003.patch>



More information about the ffmpeg-devel mailing list