diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-09-07 01:48:45 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-09-07 01:48:45 +0000 |
commit | 437525c4738f619292826907efde66a4a4183eee (patch) | |
tree | 69790aab794258b7b62219bc4e30afc20574f4f0 /libavcodec/i386/dsputil_mmx_rnd.h | |
parent | 0c62d34341652804d737fccf4cce556aef8b5787 (diff) | |
download | ffmpeg-437525c4738f619292826907efde66a4a4183eee.tar.gz |
h264 luma motion compensation in mmx2/3dnow
Originally committed as revision 3437 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/dsputil_mmx_rnd.h')
-rw-r--r-- | libavcodec/i386/dsputil_mmx_rnd.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/i386/dsputil_mmx_rnd.h b/libavcodec/i386/dsputil_mmx_rnd.h index 1b79aa56aa..e22e240375 100644 --- a/libavcodec/i386/dsputil_mmx_rnd.h +++ b/libavcodec/i386/dsputil_mmx_rnd.h @@ -296,6 +296,25 @@ static void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int lin } // avg_pixels +static void DEF(avg, pixels4)(uint8_t *block, const uint8_t *pixels, int line_size, int h) +{ + MOVQ_BFE(mm6); + JUMPALIGN(); + do { + __asm __volatile( + "movd %0, %%mm0 \n\t" + "movd %1, %%mm1 \n\t" + PAVGB(%%mm0, %%mm1, %%mm2, %%mm6) + "movd %%mm2, %0 \n\t" + :"+m"(*block) + :"m"(*pixels) + :"memory"); + pixels += line_size; + block += line_size; + } + while (--h); +} + // in case more speed is needed - unroling would certainly help static void DEF(avg, pixels8)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { |