[FFmpeg-devel] [PATCH 4/5] lavfi/gradfun: remove rounding to match C and SSE code.
Clément Bœsch
ubitux at gmail.com
Fri Dec 7 00:46:08 CET 2012
There is no noticable benefit for such precision.
---
libavfilter/x86/gradfun.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/x86/gradfun.c b/libavfilter/x86/gradfun.c
index 50e1c29..9d54677 100644
--- a/libavfilter/x86/gradfun.c
+++ b/libavfilter/x86/gradfun.c
@@ -134,9 +134,9 @@ static void gradfun_filter_line_ssse3(uint8_t *dst, const uint8_t *src, const ui
"psubw %%xmm6, %%xmm2 \n"
"pminsw %%xmm7, %%xmm2 \n" // m = -max(0, 127-m)
"pmullw %%xmm2, %%xmm2 \n"
- "psllw $1, %%xmm2 \n"
+ "psllw $2, %%xmm1 \n"
"paddw %%xmm4, %%xmm0 \n" // pix += dither
- "pmulhrsw %%xmm2, %%xmm1 \n" // m = m*m*delta >> 14
+ "pmulhw %%xmm2, %%xmm1 \n" // m = m*m*delta >> 14
"paddw %%xmm1, %%xmm0 \n" // pix += m
"psraw $7, %%xmm0 \n"
"packuswb %%xmm0, %%xmm0 \n"
--
1.8.0.1
More information about the ffmpeg-devel
mailing list