[FFmpeg-devel] [PATCH] Fix compilation on clang 2.8, which doesn't support 3dnow inline asm.

Ronald S. Bultje rsbultje
Fri Feb 11 19:58:14 CET 2011


Hi,

On Fri, Feb 11, 2011 at 1:53 PM, Janne Grunau <janne-ffmpeg at jannau.net> wrote:
> On Fri, Feb 11, 2011 at 01:40:12PM -0500, Ronald S. Bultje wrote:
>> ---
>> ?configure ? ? ? ? ? ? ? ? ? ? ? | ? ?7 ++++---
>> ?libavcodec/x86/cavsdsp_mmx.c ? ?| ? ?4 ++++
>> ?libavcodec/x86/dsputil_mmx.c ? ?| ? 39 ++++++++++++++++++++++++++++++++-------
>> ?libavcodec/x86/dsputilenc_mmx.c | ? ?4 ++++
>> ?libavcodec/x86/fmtconvert_mmx.c | ? 10 ++++++++++
>> ?libavcodec/x86/h264_qpel_mmx.c ?| ? ?2 ++
>> ?libswscale/rgb2rgb.c ? ? ? ? ? ?| ? ?4 ++++
>> ?7 files changed, 60 insertions(+), 10 deletions(-)
>>
>> diff --git a/configure b/configure
>> index a3ca15d..7703c80 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2649,9 +2649,10 @@ int main(void) {
>> ?}
>> ?EOF
>>
>> - ? ?# check whether binutils is new enough to compile SSSE3/MMX2
>> - ? ?enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
>> - ? ?enabled mmx2 ?&& check_asm mmx2 ?'"pmaxub %mm0, %mm1"'
>> + ? ?# check whether binutils is new enough to compile SSSE3/MMX2/3dnow
>
> if you change this line please s/is new enough to compile/supports/

Changed locally, and added a pswapd check also for 3dnowext.

>> @@ -476,5 +478,7 @@ void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx)
>> ? ? ?int mm_flags = av_get_cpu_flags();
>>
>> ? ? ?if (mm_flags & AV_CPU_FLAG_MMX2) ?ff_cavsdsp_init_mmx2 (c, avctx);
>> +#if HAVE_AMD3DNOW
>> ? ? ?if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx);
>> +#endif
>
> would it be cleaner if we don't set AV_CPU_FLAG_3DNOW in mm_flags if
> no can't compile code for it?

Then the compile would fail.

Ronald



More information about the ffmpeg-devel mailing list