diff options
author | Zoltán Hidvégi <mplayer@hzoli.com> | 2005-05-25 08:05:41 +0000 |
---|---|---|
committer | Zoltán Hidvégi <mplayer@hzoli.com> | 2005-05-25 08:05:41 +0000 |
commit | 3072f0cb2ede227b803eee3b3e7d325991192858 (patch) | |
tree | c7fd3d13b7ba6ffe8ce00a66b1bd2fa5280423b9 /libavcodec/i386/dsputil_mmx.c | |
parent | 9c7154c7ae3cbec9c6d9ca267c52832cd6fdd099 (diff) | |
download | ffmpeg-3072f0cb2ede227b803eee3b3e7d325991192858.tar.gz |
MMX code for (put|avg)_h264_chroma_mc8
Originally committed as revision 4305 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/dsputil_mmx.c')
-rw-r--r-- | libavcodec/i386/dsputil_mmx.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c index b767f9d8e3..32565c3d3f 100644 --- a/libavcodec/i386/dsputil_mmx.c +++ b/libavcodec/i386/dsputil_mmx.c @@ -3078,6 +3078,30 @@ H264_MC(avg_, 4, mmx2) H264_MC(avg_, 8, mmx2) H264_MC(avg_, 16,mmx2) + +/** These are used by *_h264_chroma_mc8_* */ +static const uint64_t thirtytwo __align8 = 0x0020002000200020ULL; +static const uint64_t sixtyfour __align8 = 0x0040004000400040ULL; + +#define H264_CHROMA_OP(S,D) +#define H264_CHROMA_MC8_TMPL put_h264_chroma_mc8_mmx +#include "dsputil_h264_template_mmx.c" +#undef H264_CHROMA_OP +#undef H264_CHROMA_MC8_TMPL + +#define H264_CHROMA_OP(S,D) "pavgb " #S ", " #D " \n\t" +#define H264_CHROMA_MC8_TMPL avg_h264_chroma_mc8_mmx2 +#include "dsputil_h264_template_mmx.c" +#undef H264_CHROMA_OP +#undef H264_CHROMA_MC8_TMPL + +#define H264_CHROMA_OP(S,D) "pavgusb " #S ", " #D " \n\t" +#define H264_CHROMA_MC8_TMPL avg_h264_chroma_mc8_3dnow +#include "dsputil_h264_template_mmx.c" +#undef H264_CHROMA_OP +#undef H264_CHROMA_MC8_TMPL + + #if 0 static void just_return() { return; } #endif @@ -3377,6 +3401,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) c->h263_v_loop_filter= h263_v_loop_filter_mmx; c->h263_h_loop_filter= h263_h_loop_filter_mmx; + c->put_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx; if (mm_flags & MM_MMXEXT) { c->put_pixels_tab[0][1] = put_pixels16_x2_mmx2; @@ -3473,6 +3498,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) dspfunc(avg_h264_qpel, 2, 4); #undef dspfunc + c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_mmx2; c->h264_v_loop_filter_luma= h264_v_loop_filter_luma_mmx2; c->h264_h_loop_filter_luma= h264_h_loop_filter_luma_mmx2; c->h264_v_loop_filter_chroma= h264_v_loop_filter_chroma_mmx2; @@ -3564,6 +3590,8 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) dspfunc(avg_h264_qpel, 0, 16); dspfunc(avg_h264_qpel, 1, 8); dspfunc(avg_h264_qpel, 2, 4); + + c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_3dnow; } } |