[FFmpeg-cvslog] lavfi/gradfun: fix rounding in MMX code.
Clément Bœsch
git at videolan.org
Wed Dec 19 03:18:25 CET 2012
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Dec 7 00:36:29 2012 +0100| [49de902a1e074133583dd5d8599aa057ed1d1485] | committer: Clément Bœsch
lavfi/gradfun: fix rounding in MMX code.
Current code divide before increasing precision.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49de902a1e074133583dd5d8599aa057ed1d1485
---
libavfilter/x86/gradfun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/x86/gradfun.c b/libavfilter/x86/gradfun.c
index 5e71aab..1ca5928 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"
More information about the ffmpeg-cvslog
mailing list