[FFmpeg-devel] Multimedia extensions run-time support check

Laurent Desnogues laurent.desnogues
Tue Jun 24 17:43:49 CEST 2008


Hello,

(I know this is not a very interesting matter, but it's a good way
for me to start messing with FFmpeg code;  if noone cares, let
me know and I'll use some adhoc solution that fits my needs.)

Currently to know what multimedia extensions are supported,
the code checks the value of mm_flags or the return value of
mm_support() (cf. dsputil.h).

My understanding is that this is only used to setup things at
initialization time.

However I find things are inconsistent.  For instance:

- mm_support is always declared but only defined for MMX,
  IWMMXT (Xscale) and PPC
- mm_flags is declared for ARMV4L but only defined for
  IWMMXT

This is not a big deal at the moment since it only breaks
the build of some test programs for some configs, such as
dct-test when either MMX is not defined or when building
for ARM without IWMMXT.

Currently I only see two solutions:

1. correctly protect declarations in dsputil.h depending
   on ifdef's
2. always define fake mm_flags and mm_support that
  are or return zero.

I have certainly overlooked something, but as I wrote,
I'm new to FFmpeg :-)


Laurent




More information about the ffmpeg-devel mailing list