On Mon, 05 Feb 2024 19:04:30 +0100 Andreas Rheinhardt 
<andreas.rheinha...@outlook.com> wrote:
> This presumes the relevant states to be a cartesian product. Which need
> not be true. A callback would be better; this would also allow to base
> the list on other values already set in an AVCodecContext. And if this
> were extended, it would also allow to remove init_static_data one day.
> It is furthermore quite wasteful to store color_ranges in a list,
> although there are only very few states for it.

What signature would you propose for such a callback?

I disagree with using a list for the range being wasteful. In terms of
binary size, they are shared (see ff_color_range_mpeg/jpeg definition).
At best you are saving a few bits from using an int bitmask instead of
a pointer.

The main reason to use a list is API simplicity and consistency. Working
with a bitmask is more awkward and would require more specialized code
as opposed to the current design which allows simply re-using macros
like DEF_CHOOSE_FORMATS in fftools, which is designed to handle lists.
Not to mention the equivalent libavfilter API also being list-based.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to