Skip to content

Commit

Permalink
lavfi/gradfun: remove rounding to match C and SSE code.
Browse files Browse the repository at this point in the history
There is no noticable benefit for such precision.
  • Loading branch information
ubitux committed Dec 19, 2012
1 parent 60ba9a9 commit 63e1fc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavfilter/x86/gradfun.c
Expand Up @@ -136,9 +136,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"
Expand Down

0 comments on commit 63e1fc2

Please sign in to comment.