[FFmpeg-devel] [PATCH 2/5] Make bswap.h safe to install as public API

Måns Rullgård mans
Sat Jul 10 23:16:11 CEST 2010


Michael Niedermayer <michaelni at gmx.at> writes:

> On Sat, Jul 10, 2010 at 01:22:32PM +0100, Mans Rullgard wrote:
>> ---
>>  libavutil/bswap.h |   10 ++++++++--
>>  1 files changed, 8 insertions(+), 2 deletions(-)
>> 
>> diff --git a/libavutil/bswap.h b/libavutil/bswap.h
>> index f8c866a..303bcf3 100644
>> --- a/libavutil/bswap.h
>> +++ b/libavutil/bswap.h
>> @@ -27,9 +27,13 @@
>>  #define AVUTIL_BSWAP_H
>>  
>>  #include <stdint.h>
>> -#include "config.h"
>> +#include "libavutil/avconfig.h"
>>  #include "attributes.h"
>>  
>> +#ifdef HAVE_AV_CONFIG_H
>> +
>> +#include "config.h"
>> +
>>  #if   ARCH_ARM
>>  #   include "arm/bswap.h"
>>  #elif ARCH_AVR32
>> @@ -42,6 +46,8 @@
>>  #   include "x86/bswap.h"
>>  #endif
>>  
>> +#endif /* HAVE_AV_CONFIG_H */
>
> i would prefer if the optimized code could be used too
> but i guess thats a compromise for now i have to accept

There is no other way.  The optimised code relies on specific compiler
features detected by configure.  The installed headers must work with
any C compiler.

> with this projects,(mplayer at least) will still set HAVE_AV_CONFIG_H and
> wont be able to use only external api.

The optimised headers will not be installed, so it will still have to
build against an uninstalled ffmpeg copy to use the optimised code.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list