[FFmpeg-devel] [RFC] Simplify swscale_internal.h:fmt_depth()
Sat Jan 16 20:08:48 CET 2010
On Sat, Jan 16, 2010 at 4:59 PM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> Hi, I'm aware this patch introduces a slow-down, an idea would be to
> initialize a ff_bits_per_pixel array during the init phase, and then
> use a function of the kind:
> static inline int fmt_depth(int fmt)
> ? ?return ff_bits_per_pixel[fmt];
> Would be that acceptable?
> In this case can you suggest where to initialize stuff?
I think all code that uses fmt_depth currently should eventually be
moved to some init code that's only run once, and so a small slow-down
wouldn't be a problem.
More information about the ffmpeg-devel