[FFmpeg-devel] [PATCH] lavfi/overlay: add format option

Michael Niedermayer michaelni at gmx.at
Wed Feb 20 21:34:54 CET 2013

On Wed, Feb 20, 2013 at 05:45:01PM +0100, Nicolas George wrote:
> Le duodi 2 ventôse, an CCXXI, Stefano Sabatini a écrit :
> > This can't work, since I need to know the output when doing
> > query_formats(), and set main and overlay input accordingly.
> I see, thanks for explaining.
> > Note that a possibly better fix would be to rescale the main and
> > overlay input to the output format, forced with another mechanism, but
> > this would add a dependency on libswscale and would possibly
> > complicate the logic, thus the current hack is good enough for me.
> There is format negotiation and automatic insertion of scale filters
> specifically to avoid all filters reinventing the (square) wheel by doing
> their own format conversions, so I agree with you for not wanting to
> implement that, although not for the same reason.
> Therefore, I have no objection to the patch. The code looks right to me; you
> may be able to make it slightly simpler with an array of arrays for the
> format lists, but this is very minor.
> > Feel free to propose a better fix.
> It seems to me the problem is the same as amerge: you have a relation
> between the format of the various pads that is more subtle than just "be the
> same". I have on my TODO list the task of finding a solution.
> My idea for that is to let query_formats() return EAGAIN: if that happens,
> lavfi is supposed to leave that filter alone for the time being and merge
> some other formats, then it can call query_formats() again, looping until
> all filters are finally configured. Filters that need something subtle just
> return EAGAIN until their input and/or output pads are reduced enough to let
> them make a decision. I have implemented nothing yet.

btw, something related, the code added in
should also do something similar to return EAGAIN


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130220/517bad6f/attachment.asc>

More information about the ffmpeg-devel mailing list