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

Michael Niedermayer michaelni
Fri May 15 21:25:46 CEST 2009


On Fri, May 08, 2009 at 12:47:06PM +0200, Vitor Sessak wrote:
> Stefano Sabatini wrote:
>> 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.
>
> I'm fine with the patches, if Michael do not comment in a couple of days I 
> think you can commit...

this code is ugly, even mplayers vf_scale.c is not that ugly


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

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- 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/20090515/9c0ed5c3/attachment.pgp>



More information about the ffmpeg-devel mailing list