X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fme_cmp.c;h=60545248b3a4a7db66de097a8469cb29a32e0ddf;hb=ffeeff4fbccbf9c9269ac24fe56285b224426141;hp=ae248c52f82a50f811f7908d0b055bf57fc98d98;hpb=768b07e3bca7e81d2f9c60badb3973d3d88481dc;p=ffmpeg diff --git a/libavcodec/me_cmp.c b/libavcodec/me_cmp.c index ae248c52f82..60545248b3a 100644 --- a/libavcodec/me_cmp.c +++ b/libavcodec/me_cmp.c @@ -22,6 +22,7 @@ #include "libavutil/attributes.h" #include "libavutil/internal.h" +#include "libavutil/mem_internal.h" #include "avcodec.h" #include "copy_block.h" #include "simple_idct.h" @@ -1011,31 +1012,8 @@ WRAPPER8_16_SQ(quant_psnr8x8_c, quant_psnr16_c) WRAPPER8_16_SQ(rd8x8_c, rd16_c) WRAPPER8_16_SQ(bit8x8_c, bit16_c) -int ff_check_alignment(void) -{ - static int did_fail = 0; - LOCAL_ALIGNED_16(int, aligned, [4]); - - if ((intptr_t)aligned & 15) { - if (!did_fail) { -#if HAVE_MMX || HAVE_ALTIVEC - av_log(NULL, AV_LOG_ERROR, - "Compiler did not align stack variables. Libavcodec has been miscompiled\n" - "and may be very slow or crash. This is not a bug in libavcodec,\n" - "but in the compiler. You may try recompiling using gcc >= 4.2.\n" - "Do not report crashes to FFmpeg developers.\n"); -#endif - did_fail=1; - } - return -1; - } - return 0; -} - av_cold void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx) { - ff_check_alignment(); - c->sum_abs_dctelem = sum_abs_dctelem_c; /* TODO [0] 16 [1] 8 */