From da4c7cce2100a4e4f9276b4f17e260be47b53f41 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 26 Jul 2011 12:23:43 +0100 Subject: [PATCH 1/3] x86: fix build with gcc 4.7 The upcoming gcc 4.7 has more advanced constant propagation resulting some inline asm operands becoming constants and thus emitted as literals, sometimes in contexts where this results in invalid instructions. This patch changes the constraints of the relevant operands to "rm" thus forcing a valid type. While obviously suboptimal, this is what older gcc versions already did, and there is no change to the code generated with these. Signed-off-by: Mans Rullgard --- libavcodec/x86/h264_qpel_mmx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/x86/h264_qpel_mmx.c b/libavcodec/x86/h264_qpel_mmx.c index 91ba39f1da..b7a4183c1b 100644 --- a/libavcodec/x86/h264_qpel_mmx.c +++ b/libavcodec/x86/h264_qpel_mmx.c @@ -399,7 +399,7 @@ static av_noinline void OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(uint8_t *dst, "2: \n\t"\ \ : "+a"(src), "+c"(dst)\ - : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\ + : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\ : "memory"\ );\ src += 4-(h+5)*srcStride;\ @@ -447,7 +447,7 @@ static av_always_inline void OPNAME ## h264_qpel8or16_hv1_lowpass_ ## MMX(int16_ QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\ "2: \n\t"\ : "+a"(src)\ - : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\ + : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\ : "memory"\ );\ tmp += 4;\ @@ -824,7 +824,7 @@ static av_noinline void OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(uint8_t *dst, "2: \n\t"\ \ : "+a"(src), "+c"(dst)\ - : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\ + : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\ : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \ "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\ "memory"\ @@ -879,7 +879,7 @@ static av_always_inline void put_h264_qpel8or16_hv1_lowpass_sse2(int16_t *tmp, u QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48) "2: \n\t" : "+a"(src) - : "c"(tmp), "S"((x86_reg)srcStride), "g"(size) + : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size) : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7",) "memory" From 9b3139ebca0ee1e97c6f72e25607dee5f4ecdf89 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 14 Jul 2011 00:00:43 +0200 Subject: [PATCH 2/3] dctref: make sure function declarations match between .c and .h file --- libavcodec/dctref.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/dctref.h b/libavcodec/dctref.h index ba89abd752..a93b70d9f2 100644 --- a/libavcodec/dctref.h +++ b/libavcodec/dctref.h @@ -22,10 +22,8 @@ #ifndef AVCODEC_DCTREF_H #define AVCODEC_DCTREF_H -#include "dsputil.h" - -void ff_ref_fdct(DCTELEM *block); -void ff_ref_idct(DCTELEM *block); +void ff_ref_fdct(short *block); +void ff_ref_idct(short *block); void ff_ref_dct_init(void); #endif /* AVCODEC_DCTREF_H */ From 001e600c3b8668191f96d7a1e46da0d7fff546de Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 13 Jul 2011 18:12:43 +0200 Subject: [PATCH 3/3] configure: spelling cosmetics --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index a83d3396e1..ef2c566d85 100755 --- a/configure +++ b/configure @@ -3404,5 +3404,5 @@ pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extr pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION" pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION" pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" -pkgconfig_generate libpostproc "Libav post processing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" +pkgconfig_generate libpostproc "Libav postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"