[Ffmpeg-devel] Externally visible symbols without ff or av prefix

Dave Dodge dododge
Sat Nov 18 03:36:38 CET 2006


On Mon, Nov 13, 2006 at 08:35:30PM +0100, Diego 'Flameeyes' Petten? wrote:
> I suppose that if you were to build the whole FFmpeg in a single .c file 
> (maybe with #include, rather than cat, that would make it have more sense), 
> the required memory would be around 400/500 MB, not much more for C code,

It actually has the potential to generate better output, because gcc
would be able to perform optimizations such as cross-file inlining.
See options such as -combine and --fwhole-program in recent gcc
versions.  Intel's compiler also has tricks of this sort, where it can
compile each file quickly to an intermediate format and then perform
(lengthy) cross-file optimizations at link time.

> strangely enough GCC does a work some magnitude levels better with C
> than C++ code when it comes to memory usage, I've seen GCC compiling
> a 10MB C source file not going over 50MB of memory, while a 9MB C++
> source file takes about 500MB.

Of course C++ tends to have a lot more going on behind the bare code.
Consider for example that if it's making substantial use of templates
then the compiler may be generating a significant number of functions
to implement them.

                                                  -Dave Dodge




More information about the ffmpeg-devel mailing list