From f2d6b6783662e82201b1fcc113dd8ced559be833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 6 Sep 2010 21:14:22 +0000 Subject: [PATCH] Disable some MMX accelerated functions on the GCC2 build, those had been patched in the older ffmpeg version as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38555 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../media/plugins/ffmpeg/libavcodec/x86/dsputil_mmx.c | 6 ++++++ .../media/plugins/ffmpeg/libavcodec/x86/h264dsp_mmx.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/dsputil_mmx.c b/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/dsputil_mmx.c index cc2f881303..3e57fac31a 100644 --- a/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/dsputil_mmx.c +++ b/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/dsputil_mmx.c @@ -1685,6 +1685,7 @@ QPEL_2TAP(avg_, 8, 3dnow) static void just_return(void) { return; } #endif +#if __GNUC__ >= 3 static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height){ const int w = 8; @@ -1802,6 +1803,7 @@ static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int o src += 4-h*stride; } } +#endif // #if __GNUC__ >= 3 #define PREFETCH(name, op) \ static void name(void *mem, int stride, int h){\ @@ -2601,7 +2603,9 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) SET_HPEL_FUNCS(avg, 1, 8, mmx); SET_HPEL_FUNCS(avg_no_rnd, 1, 8, mmx); +#if __GNUC__ >= 3 c->gmc= gmc_mmx; +#endif c->add_bytes= add_bytes_mmx; c->add_bytes_l2= add_bytes_l2_mmx; @@ -2953,7 +2957,9 @@ void ff_h264dsp_init_x86(H264DSPContext *c) c->h264_h_loop_filter_chroma= h264_h_loop_filter_chroma_mmx2; c->h264_v_loop_filter_chroma_intra= h264_v_loop_filter_chroma_intra_mmx2; c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_mmx2; +#if __GNUC__ >= 3 c->h264_loop_filter_strength= h264_loop_filter_strength_mmx2; +#endif c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_mmx2; c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_mmx2; diff --git a/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/h264dsp_mmx.c b/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/h264dsp_mmx.c index fd16a02d6a..924de508d8 100644 --- a/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/h264dsp_mmx.c +++ b/src/add-ons/media/plugins/ffmpeg/libavcodec/x86/h264dsp_mmx.c @@ -792,6 +792,7 @@ static void h264_h_loop_filter_chroma_intra_mmx2(uint8_t *pix, int stride, int a transpose4x4(pix-2+4*stride, trans+4, stride, 8); } +#if __GNUC__ >= 3 static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2], int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field ) { int dir; @@ -915,6 +916,7 @@ static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40] :"memory" ); } +#endif // #if __GNUC__ >= 3 /***********************************/ /* motion compensation */