Re: [FFmpeg-devel] [PATCH] avcodec/hevc_cabac: Let compiler count offsets

2024-03-12 Thread Andreas Rheinhardt
Andreas Rheinhardt: > This is easily possible with an X macro. > Using an enum for the offsets also allows to remove > two arrays which are not really needed and will typically > be optimized away by the compiler: The first just exists > to count the number of syntax elements*, the second one > exi

[FFmpeg-devel] [PATCH] avcodec/hevc_cabac: Let compiler count offsets

2024-03-07 Thread Andreas Rheinhardt
This is easily possible with an X macro. Using an enum for the offsets also allows to remove two arrays which are not really needed and will typically be optimized away by the compiler: The first just exists to count the number of syntax elements*, the second one exists to get offset[CONSTANT]. The