[FFmpeg-devel] [PATCH] Enable pixdesc.c compilation

Stefano Sabatini stefano.sabatini-lala
Sun Nov 15 18:07:17 CET 2009


On date Sunday 2009-11-08 04:24:33 +0100, Michael Niedermayer encoded:
> On Sun, Nov 08, 2009 at 01:01:55AM +0100, Stefano Sabatini wrote:
[...]
> > One of the requirement I have for pixdescs is that it should make
> > possible to avoid particular cases handling in the generic functions
> > which deal with pixel formats.
> > 
> 
> > In other words the pixdesc definition should be expressive enough to
> > avoid case PIX_FMT_FOO: branches.
> > 
> > In order to prove that, my plan is to use it in imgconvert, as we
> > replace the old functions we should see if that's good enough, and
> > extend it in the meaningwhile.
> 
> hmm
> 
> > 
> > According to this heuristic, once all the PixFmtInfo functionality
> > will be replaced then the API should be ready for public exposure.
> 
> just keep in mind that i will reject every hunk that makes code more
> complex.
> (thats especially true for any attempt to replace a 2 line switch/case
>  by 2 pages of obfuscated code)

Please consider the attached example, the resulting code is 1/3 of the
original one, and doesn't need to be extended when new formats are
added.

Regards.
-- 
FFmpeg = Forgiving & Fast Mastodontic Practical Elitarian Geisha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-pixdesc-for-fill-linesize.patch
Type: text/x-diff
Size: 2642 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091115/8211df88/attachment.patch>



More information about the ffmpeg-devel mailing list