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

Vitor Sessak vitor1001
Fri May 8 12:47:06 CEST 2009


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...

-Vitor



More information about the ffmpeg-devel mailing list