[Ffmpeg-devel] trying to reduce the binary size when few mpegvideo codecs are built.

pecno rabane pecnorabane
Tue Oct 10 20:56:21 CEST 2006


I am working on an embeded OS, and devices with limited memory. (no secret it's rockbox for ipods, irivers, and other dap)
We are working on mpeg2 video codec, but actually the binary size when you only select mpeg2 is around 1,5 megs, when building just the apiexemple.c .

So I am wondering if anyone have an idea to modularise and reduce the binary code.

Actually the various mpeg codecs have some functions in common.
It's not a problem exept that this functions are choosing at runtime wich depend subroutine to call, therefore all the routines present in libavutil or dsputil are built, because they are all referenced in a struct.

so I am wondering what is the way to go.
Using ifdefs in the referenced struct, and also in the common functions, kind of like it's done to separate encoders and decoders ?
I prefer avoid to start something if it's a bad idea and rejected in the end.

about libavutil I don't see what is the gain by referencing most of the methods into a struct.


More information about the ffmpeg-devel mailing list