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

Stefano Sabatini stefasab at gmail.com
Wed Feb 20 00:23:20 CET 2013

On date Tuesday 2013-02-19 23:12:56 +0100, Nicolas George encoded:
> Le primidi 1er ventôse, an CCXXI, Stefano Sabatini a écrit :
> > In particular, fix misbehavior in case main and overlay input formats
> > mismatch (e.g. YUV420 and YUV444).

> It looks like of lot of code for something that can be done just adding the
> format filter after the overlay filter.

This can't work, since I need to know the output when doing
query_formats(), and set main and overlay input accordingly.

> Can you elaborate on why you chose to implement that?

This is done by extending the logic already there (rgb option) and
fixing the YUV444/YUV420 mismatch. I suppose the next step would be to
add dedicated per-format FATE tests.

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.

Feel free to propose a better fix.
FFmpeg = Free & Fantastic Maxi Political Encoding/decoding Genius

More information about the ffmpeg-devel mailing list