[FFmpeg-devel] [PATCH] Clarifying the use of the scale filter interlace option

Tim Nicholson nichot20 at yahoo.com
Fri Mar 30 09:47:18 CEST 2012


On 30/03/12 07:48, Tim Nicholson wrote:
> On 29/03/12 20:33, Michael Niedermayer wrote:
>> On Thu, Mar 29, 2012 at 08:49:38AM +0100, Tim Nicholson wrote:
> [...]
>>> Whilst investigating this it occurred to me that this filter behaves
>>> differently by default to other filters and options.
>>>
>>> Commonly values of 1|0|-1 are used, with -1 meaning "auto" in whatever
>>> way that applies to the relevant filter/option, with the other values
>>> forcing a particular behaviour between a choice of 2. -1 is also
>>> commonly the default value.
>>>
>>> For example the following all use -1 as the default if not specified:-
>>> rawvideo top
>>> -mixing_level number
>>> -channel_coupling boolean
>>> -cpl_start_band number
>>> amovie|movie stream_index
>>> yadif
>>> cellauto|life random_seed
>>>
>>> scale however only has 1|-1 with 0 having no defined meaning, although
>>> the logic dictates that since it is neither of the others it is an
>>> invalid choice and therefore ignored.
>>
>> 0 should mean progressive
> 
> Sorry badly worded :( . The code only checks for "interl=1" or
> "interl=-1" to consider if interlaced scaling should be used (forced or
> auto selected), any other value, including 0, is ignored, which leads to
> the default of progressive handling.
> 
>>
>>
>>>
>>> Also unlike other cases -1 (auto) is not the default.
>>
>> this could be changed if it works better overall
> 
> It looks a fairly simple logic change, and I am happy to have a go at a
> patch to bring it into line with other features, but I didn't know if
> changing the default might have other repercussions. It should be safe
> in auto.
> 

Looking at your original commit comments it looks like maybe the auto
detection was not as good as it should be, so the current default makes
more sense. However since then there have been several patches including
648e55ff to improve interlace detection so maybe now is the time to make
the change.


-- 
Tim


More information about the ffmpeg-devel mailing list