[Ffmpeg-devel] The "Intermingled Mess" issue.

Colin Ward lists
Mon Sep 19 05:40:50 CEST 2005


   Good morning all.

   Well that "FFMPEG code a mess" thread was certainly a fun way to 
start a Monday morning.  :-)  As a first E-Mail on a mailing list it's 
certainly not a way to make friends fast!

   However, the fellow does have a point, albeit expressed rather 
bluntly.  Recently I wanted to build a libavcodec and libavformat that 
contained only support for MPEG 1 and 2 video, MP3 audio, Ogg Vorbis and 
Ogg Theora.  When I tried this I found some problems:

   1) Certain encoding related functions still get compiled into the 
libraries when CONFIG_ENCODERS is turned off.  This in turn pulled in 
other functions, and I had to #ifdef out some code.  I will submit a 
patch for discussion soon.  I am an FFMPEG newbie though so I might have 
it wrong of course.  :-)

   2) Some of the generic functions that get reused such as IDCT 
functions need to be moved into their own files.  I found that I had to 
link in some H.263 modules and even WMV (!) modules to compile a library 
that only supported MPEG 1 and 2 video!  And of course every time you 
add one of these extra modules, it in turn causes other modules to be 
required and so on.  If there is a generic function or data table then 
it needs to be in its own module, not in an H.263 or WMV module somewhere.

   3) My resulting library was still quite large (about 3.5 MB) which 
indicates to me that maybe a lot of non MPEG and Ogg code was pulled in 
by #2 above.

   So to an extent FFMPEG *is* a bit of an "Intermingled mess" but it's 
nothing that a few #ifdefs wouldn't fix.  I'll write a follow up E-Mail 
with more concrete details when I am back in front of my home computer.

   I hope nobody takes offence at this E-Mail;  it is simply an 
objective description of some general dependency issues that I have noticed.

   PS.  Does anyone know if GCC does function level linking?

/-------------------------------------------------------------------\
[Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
[VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2    ]
[600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne      ]
[Assembly Language: The most fun you can have with your clothes on! ]
\-------------------------------------------------------------------/





More information about the ffmpeg-devel mailing list