[FFmpeg-devel] Select the right format

Mark Himsley mark at mdsh.com
Sat Dec 1 15:40:24 CET 2012

On 27/11/2012 22:40, Michael Niedermayer wrote:
> On Tue, Nov 27, 2012 at 10:17:48PM +0000, Mark Himsley wrote:
>> On 27/11/2012 00:21, Michael Niedermayer wrote:
>>> On Sun, Nov 25, 2012 at 04:41:12PM +0000, Mark Himsley wrote:
>>>> Suppose I wanted to add more 8 bit YUV formats to be accepted by the
>>>> overlay filter.
>>>> I don't see how I can do it right now.
>>>> Because, for YUV, the MAIN and OVERLAY inputs have to match:
>>>>  yuv420p (or yuva420p [1]) on the MAIN with yuva420p on the OVERLAY
>>>> I want to add:
>>>>  yuv422p (or yuva422p) on the MAIN with yuva422p on the OVERLAY
>>>>  yuv444p (or yuva444p) on the MAIN with yuva444p on the OVERLAY
>>>> The only way I can see to enable those is to pass a 'format' argument to
>>>> the overlay filter.
>>>> Can anyone think of a more elegant method, before I start coding a
>>>> 'format' argument method?
>>> MAIN == OUTPUT and supports all you want
>>> OVERLAY supports all you want
>>> if you get a OVERLAY type that cannot directly be used with what MAIN
>>> is set to then insert / call scale to convert
>> Thanks for this alternate idea. Is there an example of inserting a scale
>> filter from another?
> there are mutiple examples
> vf_smartblur for example uses the scaler,
> libavfilter/vf_removelogo.c does too
> the filter core injects scale filters when needed

Thank you. I think I like this idea, and will see what I can do with it.

More information about the ffmpeg-devel mailing list