[FFmpeg-devel] [PATCH] Remove swscale_internal.h:fmt_depth()
Stefano Sabatini
stefano.sabatini-lala
Sun Jan 17 18:46:40 CET 2010
On date Saturday 2010-01-16 17:08:48 -0200, Ramiro Polla encoded:
> Hi,
>
> 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.
Check the attached: smaller, more extensible, faster, the price is a
little more bloat in the context.
Regression test passed.
Regards.
--
FFmpeg = Faithless and Forgiving Magical Puritan Elastic God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lsws-move-fmt-bpp-to-ctx.patch
Type: text/x-diff
Size: 4797 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100117/6fcd3448/attachment.patch>
More information about the ffmpeg-devel
mailing list