diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-01-05 15:57:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-01-05 15:57:10 +0000 |
commit | 826f429ae9990632a04b06bd375afa54ffe54b76 (patch) | |
tree | dce2b6a89402130f5e3c6a9426063a47991f285b /libavcodec/i386/dsputil_mmx_avg.h | |
parent | 70ac76c0eb13d74d2001e83d7803f3dc0299f86a (diff) | |
download | ffmpeg-826f429ae9990632a04b06bd375afa54ffe54b76.tar.gz |
qpel in mmx2/3dnow
qpel refinement quality parameter
Originally committed as revision 1393 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/dsputil_mmx_avg.h')
-rw-r--r-- | libavcodec/i386/dsputil_mmx_avg.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/libavcodec/i386/dsputil_mmx_avg.h b/libavcodec/i386/dsputil_mmx_avg.h index 6873432ce8..4a88411568 100644 --- a/libavcodec/i386/dsputil_mmx_avg.h +++ b/libavcodec/i386/dsputil_mmx_avg.h @@ -53,6 +53,38 @@ static void DEF(put_pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size :"%eax", "memory"); } +static void DEF(put_pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) +{ + __asm __volatile( + "1: \n\t" + "movq (%1), %%mm0 \n\t" + "addl %4, %1 \n\t" + "movq (%1), %%mm1 \n\t" + "addl %4, %1 \n\t" + PAVGB" (%2), %%mm0 \n\t" + PAVGB" 8(%2), %%mm1 \n\t" + "movq %%mm0, (%3) \n\t" + "addl %5, %3 \n\t" + "movq %%mm1, (%3) \n\t" + "addl %5, %3 \n\t" + "movq (%1), %%mm0 \n\t" + "addl %4, %1 \n\t" + "movq (%1), %%mm1 \n\t" + "addl %4, %1 \n\t" + PAVGB" 16(%2), %%mm0 \n\t" + PAVGB" 24(%2), %%mm1 \n\t" + "movq %%mm0, (%3) \n\t" + "addl %5, %3 \n\t" + "movq %%mm1, (%3) \n\t" + "addl %5, %3 \n\t" + "addl $32, %2 \n\t" + "subl $4, %0 \n\t" + "jnz 1b \n\t" + :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst) + :"r"(src1Stride), "r"(dstStride) + :"memory"); +} + static void DEF(put_pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) { __asm __volatile( @@ -92,6 +124,34 @@ static void DEF(put_pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_siz :"r" (line_size) :"%eax", "memory"); } + +static void DEF(put_pixels16_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h) +{ + __asm __volatile( + "1: \n\t" + "movq (%1), %%mm0 \n\t" + "movq 8(%1), %%mm1 \n\t" + "addl %4, %1 \n\t" + PAVGB" (%2), %%mm0 \n\t" + PAVGB" 8(%2), %%mm1 \n\t" + "movq %%mm0, (%3) \n\t" + "movq %%mm1, 8(%3) \n\t" + "addl %5, %3 \n\t" + "movq (%1), %%mm0 \n\t" + "movq 8(%1), %%mm1 \n\t" + "addl %4, %1 \n\t" + PAVGB" 16(%2), %%mm0 \n\t" + PAVGB" 24(%2), %%mm1 \n\t" + "movq %%mm0, (%3) \n\t" + "movq %%mm1, 8(%3) \n\t" + "addl %5, %3 \n\t" + "addl $32, %2 \n\t" + "subl $2, %0 \n\t" + "jnz 1b \n\t" + :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst) + :"r"(src1Stride), "r"(dstStride) + :"memory"); +} /* GL: this function does incorrect rounding if overflow */ static void DEF(put_no_rnd_pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) |