[Ffmpeg-devel] Re: Using ffmpeg libs in an OSS project is a nightmare

Tobias Diedrich ranma
Mon Aug 8 18:35:21 CEST 2005

Dave Airlie wrote:

>  It should be no problem building shared libs for ffmpeg without PIC,
> we don't use -fPIC to build Mesas OpenGL libraries and drivers due to
> the perceived speed loss. but Ulrich's guide[1] to writing DSO says
> you should probably use it, he also refutes a lot of the points
> made in the iecc link about wasting ebx etc.. when using modern toolchains...

Sorry for butting in and please correct me if I'm wrong, but AFAICS
I seriously doubt there is much benefit to a shared libavcodec:

Obviously shared libs are good for libs that are used by many
different programs, like glibc.

But in the lavc-case I'd assume that usually you only have one or
two different programs running at the same time that use it.
Multiple instances of the same program should be no problem anyway,
since the code segment is shared and static linking is good since you
don't get the cost of PIC.  This would be a point where
mplayer/mencoder would benefit from making the two a single binary,
at least for me those two are the only two applications using lavc
which might run at the same time.

And even if I were running three or four different apps at the same time:
Currently a stripped libavcodec.so weighs in at 2.7MB, so it's not
_that_ much of an issue IMHO (On a 512MB machine at least, it would
be different for a 32MB machine, but those are usually Pentium
class and a bit on the slow side for video processing).


Tobias						PGP: http://9ac7e0bc.uguu.de

More information about the ffmpeg-devel mailing list