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

Nicolas George nicolas.george at normalesup.org
Tue May 7 11:36:37 CEST 2013


L'octidi 18 floréal, an CCXXI, Paul B Mahol a écrit :
> 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.

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.)

> 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.

Regards,

-- 
  Nicolas George
-------------- 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/20130507/171f422a/attachment.asc>


More information about the ffmpeg-devel mailing list