Index: ffmpeg/libavcodec/i386/dsputil_h264_template_mmx.c =================================================================== --- ffmpeg/libavcodec/i386/dsputil_h264_template_mmx.c (revision 13183) +++ ffmpeg/libavcodec/i386/dsputil_h264_template_mmx.c (working copy) @@ -185,8 +185,12 @@ } } +extern void H264_CHROMA_MC4_C(uint8_t *dst/*align 4*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y); + static void H264_CHROMA_MC4_TMPL(uint8_t *dst/*align 4*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y) { + if (!(x*y)) {H264_CHROMA_MC4_C(dst, src, stride, h, x, y); return;} + asm volatile( "pxor %%mm7, %%mm7 \n\t" "movd %5, %%mm2 \n\t" Index: ffmpeg/libavcodec/i386/h264dsp_mmx.c =================================================================== --- ffmpeg/libavcodec/i386/h264dsp_mmx.c (revision 13183) +++ ffmpeg/libavcodec/i386/h264dsp_mmx.c (working copy) @@ -1912,6 +1912,7 @@ #define H264_CHROMA_OP4(S,D,T) #define H264_CHROMA_MC8_TMPL put_h264_chroma_mc8_mmx #define H264_CHROMA_MC4_TMPL put_h264_chroma_mc4_mmx +#define H264_CHROMA_MC4_C put_h264_chroma_mc4_c #define H264_CHROMA_MC2_TMPL put_h264_chroma_mc2_mmx2 #define H264_CHROMA_MC8_MV0 put_pixels8_mmx #include "dsputil_h264_template_mmx.c" @@ -1929,6 +1930,7 @@ #undef H264_CHROMA_OP4 #undef H264_CHROMA_MC8_TMPL #undef H264_CHROMA_MC4_TMPL +#undef H264_CHROMA_MC4_C #undef H264_CHROMA_MC2_TMPL #undef H264_CHROMA_MC8_MV0 @@ -1937,6 +1939,7 @@ "pavgb " #T ", " #D " \n\t" #define H264_CHROMA_MC8_TMPL avg_h264_chroma_mc8_mmx2 #define H264_CHROMA_MC4_TMPL avg_h264_chroma_mc4_mmx2 +#define H264_CHROMA_MC4_C avg_h264_chroma_mc4_c #define H264_CHROMA_MC2_TMPL avg_h264_chroma_mc2_mmx2 #define H264_CHROMA_MC8_MV0 avg_pixels8_mmx2 #include "dsputil_h264_template_mmx.c" Index: ffmpeg/libavcodec/dsputil.c =================================================================== --- ffmpeg/libavcodec/dsputil.c (revision 13183) +++ ffmpeg/libavcodec/dsputil.c (working copy) @@ -1592,7 +1592,7 @@ }\ }\ \ -static void OPNAME ## h264_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\ +void OPNAME ## h264_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\ const int A=(8-x)*(8-y);\ const int B=( x)*(8-y);\ const int C=(8-x)*( y);\