[Scummvm-devel] Conditionally compiling components (Was: Clarifying & cleaning configure's cross-compiling craziness)
Max Horn
max at quendi.de
Thu May 5 10:32:18 CEST 2011
Am 04.05.2011 um 17:25 schrieb A. Milburn:
> On Wed, May 04, 2011 at 05:18:29PM +0200, Max Horn wrote:
>> The indeo3 code is only enabled if gob is compiled in, or dynamic plugins are enabled.
>>
>> It seems odd that we do this for indeo3, but not for e.g graphics/png.*, graphics/jpeg.*, graphics/dcl.* etc. Let's either drop the indeo3 check, or add check for more "optional" features.
>
> I asked about this on IRC a few days ago. It seems that the check is there due to
> https://sourceforge.net/tracker/index.php?func=detail&aid=2836424&group_id=37116&atid=418822
> which notes that there are 72kb of tables in the decoder, adding considerably to code
> size if compiled in. Is this a problem for other code?
qdm2 might be a contender:
video/codecs/qdm2.cpp seems to contains huge tables. In particular tables with a total of 128k floats, i.e. 512kb. These tables seem to contain precomputed sine / cosine values. One could allocate those on the stack, I guess, but I wonder about them anyway -- at least on desktop pcs, just re-computing the (co)sine might be a lot faster than completely stuffing the CPU cache.
However, since these are not const and not prepoulated, they should only take size on the heap, not in the binary.
video/codecs/qdm2data.h contains about 10kb (?) of static const data.
Interestingly, though, when building in release mode with debug off
>
> (I was also wondering why in some places we check for engines or dynamic plugins, but
> in other places (the mod decoders) we only check for engines. The conclusion seemed
> to be that the dynamic plugins check was unnecessary because the symbols wouldn't
> work with our plugin loaders if they weren't used by a configured engine, comments?)
>
>> Alas, it *is* annoying that e.g. the whole jpeg decoder is currently *always compiled in, even when unused -- for the Nintendo DS port, this accumulates to quite a big problem, I think.
>
> I thought it was concluded that the Nintendo DS builds dropped any unused symbols?
That's great if it works well, though then I wonder why we bother to disable the Indeo3 codec in configure? Can we remove that check?
Bye,
Ma
More information about the Scummvm-devel
mailing list