On Feb 13, 2013, at 20:01, Michael Niedermayer wrote:
>
> duplicating the tables causes a small performance increase in some
> linking configurations.
If that's the case, why not do something like this?
in libavutil/log2_tab.c :
#ifndef cdh_GLUE
# define cdh_GLUE(a,b) a##b
#endif
#ifndef cdh_GLUE2
# define cdh_GLUE2(a,b) cdh_GLUE(a,b)
#endif
#define ADD_BASENAME(name) cdh_GLUE2(LIBRARY_BASENAME,name)
#ifndef LIBRARY_BASENAME
# define LIBRARY_BASENAME ff_
#endif
const uint8_t ADD_BASENAME(log2_tab)[256]{ ... };
And then define LIBRARY_BASENAME to something relevant in each file outside of
libavutil where (and before) you include log2_tab.c ...
(with thank to Apple's QuickTime Component stuff ;) )
R.
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user