[FFmpeg-devel] ffmpeg build errors
Carl Eugen Hoyos
cehoyos at ag.or.at
Thu Jan 12 16:19:07 CET 2012
On Thursday 12 January 2012 12:04:34 pm Carl Eugen Hoyos wrote:
> Rupert Eibauer <Rupert.Eibauer <at> ces.ch> writes:
> > yasm 0.6.2.1985
> >
> > YASM libavcodec/x86/imdct36_sse.o
> > libavcodec/x86/imdct36_sse.asm:361: instruction expected after label
>
> We either have to protect the definitions following "INIT_XMM avx" in the
> following files with "%ifdef HAVE_AVX":
> libavcodec/x86/imdct36_sse.asm
> libavcodec/x86/proresdsp.asm
> libavcodec/x86/v210.asm
> libswscale/x86/scale.asm
> and disable the avx functions for v210 (libavcodec/x86/v210-init.c) and in
> libswscale/x86/swscale_mmx.c if AVX is not defined (others seem to be
> disabled already)
Patch for git head attached (the libswscale change is only needed for 0.9
iiuc).
> and add a fate target with yasm 0.6.2
This is missing.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/x86/imdct36_sse.asm b/libavcodec/x86/imdct36_sse.asm
index 2908459..ffca353 100644
--- a/libavcodec/x86/imdct36_sse.asm
+++ b/libavcodec/x86/imdct36_sse.asm
@@ -371,8 +371,10 @@ DEFINE_IMDCT
INIT_XMM ssse3
DEFINE_IMDCT
+%ifdef HAVE_AVX
INIT_XMM avx
DEFINE_IMDCT
+%endif
INIT_XMM sse
@@ -717,5 +719,7 @@ cglobal four_imdct36_float, 5,5,8, out, buf, in, win, tmp
INIT_XMM sse
DEFINE_FOUR_IMDCT
+%ifdef HAVE_AVX
INIT_XMM avx
DEFINE_FOUR_IMDCT
+%endif
diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm
index d674308..f733bdf 100644
--- a/libavcodec/x86/proresdsp.asm
+++ b/libavcodec/x86/proresdsp.asm
@@ -306,7 +306,9 @@ INIT_XMM
idct_put_fn sse2, 16
INIT_XMM
idct_put_fn sse4, 16
+%ifdef HAVE_AVX
INIT_AVX
idct_put_fn avx, 16
+%endif
%endif
diff --git a/libavcodec/x86/v210-init.c b/libavcodec/x86/v210-init.c
index 4dd6d6d..425c628 100644
--- a/libavcodec/x86/v210-init.c
+++ b/libavcodec/x86/v210-init.c
@@ -34,14 +34,14 @@ av_cold void v210_x86_init(V210DecContext *s)
if (cpu_flags & AV_CPU_FLAG_SSSE3)
s->unpack_frame = ff_v210_planar_unpack_aligned_ssse3;
- if (cpu_flags & AV_CPU_FLAG_AVX)
+ if (HAVE_AVX && cpu_flags & AV_CPU_FLAG_AVX)
s->unpack_frame = ff_v210_planar_unpack_aligned_avx;
}
else {
if (cpu_flags & AV_CPU_FLAG_SSSE3)
s->unpack_frame = ff_v210_planar_unpack_unaligned_ssse3;
- if (cpu_flags & AV_CPU_FLAG_AVX)
+ if (HAVE_AVX && cpu_flags & AV_CPU_FLAG_AVX)
s->unpack_frame = ff_v210_planar_unpack_unaligned_avx;
}
#endif
diff --git a/libavcodec/x86/v210.asm b/libavcodec/x86/v210.asm
index 344bed0..9ce17c2 100644
--- a/libavcodec/x86/v210.asm
+++ b/libavcodec/x86/v210.asm
@@ -76,10 +76,14 @@ cglobal v210_planar_unpack_%1_%2, 5, 5
INIT_XMM
v210_planar_unpack unaligned, ssse3
+%ifdef HAVE_AVX
INIT_AVX
v210_planar_unpack unaligned, avx
+%endif
INIT_XMM
v210_planar_unpack aligned, ssse3
+%ifdef HAVE_AVX
INIT_AVX
v210_planar_unpack aligned, avx
+%endif
More information about the ffmpeg-devel
mailing list