[FFmpeg-devel] [PATCH] Change default behaviour of scale filter from 'progressive' to 'auto'

Tim Nicholson nichot20 at yahoo.com
Tue May 1 13:32:18 CEST 2012

On 01/05/12 11:38, Michael Niedermayer wrote:
> On Tue, May 01, 2012 at 11:12:33AM +0100, Tim Nicholson wrote:
>> On 01/05/12 09:26, Michael Niedermayer wrote:
>>> On Tue, May 01, 2012 at 08:29:47AM +0100, Tim Nicholson wrote:
>>>> On 30/04/12 14:44, Michael Niedermayer wrote:
>>>>> On Tue, Apr 17, 2012 at 10:15:15AM +0100, Tim Nicholson wrote:
>>> [...]
>>>>> I think the patch is correct but until the input interlace flag is
>>>>> ALOT more reliable i dont think we should apply this as it likely
>>>>> would worsen the overall results for the end user, 
>>> [..]
>>>> I therefore wonder if a better solution at this stage would be to add an
>>>> additional SWScaler AVOption to enable selecting the default mode.
>>>> Current users would see no change, and those who need it could simply
>>>> add the option to their command line and get the results they need in a
>>>> more elegant and simple manner than described previously.
>>>> I will try and bone up on the SWScaler API and see what it would take to
>>>> achieve that if you think that approach might work.
>>> I think adding more possibly values to the interlace field used in
>>> libavfilter is better. Its not certain the interlace state is the
>>> same in the whole filter graph, also other filters may similarly
>>> need to accurately know the interlacing/progressive state
>> Is that not what the setfield filter does if used at the start of a
>> filtergraph? I have already added in the ability to force progressive as
>> well as the previous tff|bff options. However it doesn't seem to help
>> the case of auto inserted "scale 0".
> setfield can just set interlaced to 0 or 1
> mpeg2 when marked as interlaced or dv when marked as interlaced
> also set it to 1 so the scale filter cant distinguish them

Which is kind of the point, as I originally thought the flagging was
much more reliable now.....

> if setfield could set it to 2 then scale in auto mode (with your patch)
> could take 2 as interlaced and 0/1 as progressive
> the user could then override it easily with setfield and the
> unreliable flags from mpeg2 (and in case of the reg tests at least)
> also dv wouldnt cause a problem
> [...]

Interesting, I see what your getting at. I will knock that up and have a
play. It is certainly transparent for current usage. However I'm not
convinced it would solve my issue since simply adding -vf
setfield=tff|bff doesn't currently seem to affect auto inserted filters
(with my patch) but only those manually specified as part of the
filterchain, but I will have to recheck that, and also see what other
filters may currently honour the existing flag and so may need a tweak.


More information about the ffmpeg-devel mailing list