aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/dsputil_mmx.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2009-04-15 19:10:16 +0000
committerDavid Conrad <lessen42@gmail.com>2009-04-15 19:10:16 +0000
commitc21c835b8d2dae324c544920ac0b3e8d583e0b99 (patch)
tree8b495cd542daf2d7eae47ccfce6896e1c1b47553 /libavcodec/x86/dsputil_mmx.c
parent29382bc1ebe40a9f081c2f71683a57b2d6758189 (diff)
downloadffmpeg-c21c835b8d2dae324c544920ac0b3e8d583e0b99.tar.gz
avg_ pixel functions need to use (dst+pix+1)>>1 to average with existing
pixels, not (dst+pix)>>1. This makes the mmx functions bitexact with the C functions. Originally committed as revision 18527 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/x86/dsputil_mmx.c')
-rw-r--r--libavcodec/x86/dsputil_mmx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index 0687fa8f9e..cf3400eca5 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -155,6 +155,7 @@ DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
#define SET_RND MOVQ_WONE
#define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX_NO_RND(a, b, c, d, e, f)
#define PAVGB(a, b, c, e) PAVGB_MMX_NO_RND(a, b, c, e)
+#define OP_AVG(a, b, c, e) PAVGB_MMX(a, b, c, e)
#include "dsputil_mmx_rnd_template.c"
@@ -176,17 +177,20 @@ DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
#undef SET_RND
#undef PAVGBP
#undef PAVGB
+#undef OP_AVG
/***********************************/
/* 3Dnow specific */
#define DEF(x) x ## _3dnow
#define PAVGB "pavgusb"
+#define OP_AVG PAVGB
#include "dsputil_mmx_avg_template.c"
#undef DEF
#undef PAVGB
+#undef OP_AVG
/***********************************/
/* MMX2 specific */
@@ -195,11 +199,13 @@ DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
/* Introduced only in MMX2 set */
#define PAVGB "pavgb"
+#define OP_AVG PAVGB
#include "dsputil_mmx_avg_template.c"
#undef DEF
#undef PAVGB
+#undef OP_AVG
#define put_no_rnd_pixels16_mmx put_pixels16_mmx
#define put_no_rnd_pixels8_mmx put_pixels8_mmx