[FFmpeg-devel] [PATCH] lavfi/vf_extractplanes: set input formats to reduce conversions.

Paul B Mahol onemda at gmail.com
Tue May 7 11:58:14 CEST 2013


On 5/7/13, Nicolas George <nicolas.george at normalesup.org> wrote:
> L'octidi 18 floreal, an CCXXI, Paul B Mahol a ecrit :
>> I do not think such reasoning is valid. There are unscaled conversions
>> and
>> they are used in such case.
>
> The unscaled conversions exist, they are used whenever the corresponding
> pixel formats are selected, but, and this is the major point you are
> missing:
>
> There is no guarantee that lavfi will select the best pixel format.
>
> Right now it does, but it depends on a complex system of scores, it is very
> fragile and has changed in the past. Furthermore, this score system is
> generic, there is no way of tuning it for this particular filter to express
> that FF_LOSS_COLORSPACE is more severe than FF_LOSS_ALPHA or the other way
> around.

IMHO they are same.

>
> For example, can you predict, without looking at the code, if you have
> rgba,
> whether the system will select gbrp (to preserve the color space) or
> yuva444p (to preserve alpha)?
>
> (Of course, adding gbrap will make the question moot, but the point itself
> stands.)

As above, both cases sucks.

>
>> I wanted to avoid doing yet another implementation of extracting color
>> component from packed rgb in libavfilter.
>
> And you were right, I was not blaming you for doing so. But that puts
> pressure on the automatic conversion system.

Any filter does that. The automatic conversion system still have some issues:
like picking gray for pal8 input.

Anyway, I did not changed my mind, I'm still against (partial) dissalowing
of conversions in this filter or any filter.

Also this is the only filter that is really trying to use format renegotiation.


More information about the ffmpeg-devel mailing list