On Thu, Dec 1, 2016 at 3:01 PM, Nicolas George <geo...@nsup.org> wrote:
> Le primidi 11 frimaire, an CCXXV, Vittorio Giovara a écrit :
>> Actually we already do, theora, vp8, vp9 and a few others have
>> completely different values for most color properties, and we just
>> check before initializing the context or frame fields. Since iso/itu
>> codecs are the ones that more consistently use all the properties
>> everywhere it makes sense that the enum values and field values match
>> and imho it's simpler to use.
> It made sense until now, but now they have added a gap, and it becomes
> obvious it was not a very good idea to begin with.
> Fortunately, since the architecture is already there for the other
> codecs, fixing it should not be much work. Probably about the same
> amount as fixing the issues with the gap.
I'm not sure about that, right now a gap would just require adding
bound checks in exactly 5 different places, whereas restructuring this
well-established system will need careful modification for each of the
codecs involved, which are quite a few. The real problem to me seems
the fact that _NB elements are used outside the library, despite being
documented against, so I think it would be more productive to fix
those occurrences (especially since this is a user-facing API).
ffmpeg-devel mailing list