summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-12-07 00:36:29 +0100
committerClément Bœsch <ubitux@gmail.com>2012-12-19 03:13:25 +0100
commit49de902a1e074133583dd5d8599aa057ed1d1485 (patch)
tree6e59d0b6ee2900520f2dcee9647fff548cae6091 /libavfilter
parentdd8a76ab080d6862ec8e182e805794ebb27be8b0 (diff)
lavfi/gradfun: fix rounding in MMX code.
Current code divide before increasing precision.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/x86/gradfun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/x86/gradfun.c b/libavfilter/x86/gradfun.c
index 5e71aabd68..1ca5928241 100644
--- a/libavfilter/x86/gradfun.c
+++ b/libavfilter/x86/gradfun.c
@@ -62,8 +62,8 @@ static void gradfun_filter_line_mmxext(uint8_t *dst, const uint8_t *src, const u
"pminsw %%mm7, %%mm2 \n" // m = -max(0, 127-m)
"pmullw %%mm2, %%mm2 \n"
"paddw %%mm4, %%mm0 \n" // pix += dither
- "pmulhw %%mm2, %%mm1 \n"
"psllw $2, %%mm1 \n" // m = m*m*delta >> 14
+ "pmulhw %%mm2, %%mm1 \n"
"paddw %%mm1, %%mm0 \n" // pix += m
"psraw $7, %%mm0 \n"
"packuswb %%mm0, %%mm0 \n"