[FFmpeg-devel] [RFC] AES init

Michael Niedermayer michaelni
Mon May 14 01:57:42 CEST 2007


On Sun, May 13, 2007 at 07:54:53PM -0400, Rich Felker wrote:
> On Sun, May 13, 2007 at 09:39:02PM +0200, Michael Niedermayer wrote:
> > i wish there where a inited-rodata which would be shareable between
> > processes and the kernel would just throw the data away if it needed
> > the memory and call the init code again if it needed the table again ...
> this is basically impossible to do in any way that's secure, and even
> if you could do it, it wouldn't be portable. compressed binaries or
> compressed filesystem would achieve virtually the same thing, given a
> good compression algorithm.

try to compress the AES tables, try to compress CRC tables, ...

> i agree that putting 500meg table in rodata/text is bad, but i don't
> think this is a practical situation we'll encounter. for tables 1-16k
> in size, while they might be larger than the code to generate the
> table, they're still a very small portion of the whole program size,
> and imo the reliability (no thread issues/race conditions) and
> sharability outweigh a few kb of disk space.

what about making it optional?
i think having the code which can generate the table in the source is
a good idea anyway
and its so trivial to make it optional :)
table[1234]={ 1,2,3,4,5,2,4,6,8,0,
#define ff_init_table()
    for ...
        table[i]= ...


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070514/7ef0013d/attachment.pgp>

More information about the ffmpeg-devel mailing list