[FFmpeg-devel] [PATCH v2] avfilter/formats: optimize ff_all_formats

Nicolas George george at nsup.org
Tue Dec 24 12:50:51 EET 2019

zhilizhao (12019-12-24):
> 1. AV_PIX_FMT_NB depends on !gaps, unless we calculate and set it manually

NB is not really the "number of".

> 2. The reason to deprecated VAAPI in this way (ABI incompatible) is
> AV_PIX_FMT cannot have gaps

No, it was because we WANTED AV_PIX_FMT to not have gaps. It had some in
the past, there may be reasons to have anew in the future.

But I just realized: there is a much simpler reason that makes this
particular approach impossible:

AV_PIX_FMT_NB         ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav*
AV_SAMPLE_FMT_NB           ///< Number of sample formats. DO NOT USE if linking dynamically

you cannot use AV_PIX_FMT_NB or AV_SAMPLE_FMT_NB in lavfi, only in lavu.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191224/e93d2b5f/attachment.sig>

More information about the ffmpeg-devel mailing list