diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-07-26 10:09:55 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-07-27 17:23:42 +0000 |
commit | f2922c80a41c5358f49dabe2325356c51fd787be (patch) | |
tree | dd63cdb5633407b56fcf90555db67bea61ed04d8 /src | |
parent | f41cbc2d4599e7c6b6aac2d4bb374efae4efd72c (diff) |
Fix regression in rotated bilinear sampling
Fix a mistake introduced recently and revealed by lancelot. Adds an
auto-test for rotations to catch similar errors faster in the future.
Change-Id: I028a160107d98899e723481b6201ef776f20c721
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index f7b81944c5..f0d0ac0283 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -2398,10 +2398,10 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c const __m128i bl = _mm_setr_epi32(bottomData[offset0], bottomData[offset1], bottomData[offset2], bottomData[offset3]); const __m128i br = _mm_setr_epi32(bottomData[offset0 + 1], bottomData[offset1 + 1], bottomData[offset2 + 1], bottomData[offset3 + 1]); - __m128i v_distx = _mm_srli_epi16(v_fx, 12); - __m128i v_disty = _mm_srli_epi16(v_fy, 12); - v_distx = _mm_srli_epi16(_mm_add_epi32(v_fx, v_fxy_r), 4); - v_disty = _mm_srli_epi16(_mm_add_epi32(v_fy, v_fxy_r), 4); + __m128i v_distx = _mm_srli_epi16(v_fx, 8); + __m128i v_disty = _mm_srli_epi16(v_fy, 8); + v_distx = _mm_srli_epi16(_mm_add_epi32(v_distx, v_fxy_r), 4); + v_disty = _mm_srli_epi16(_mm_add_epi32(v_disty, v_fxy_r), 4); v_distx = _mm_shufflehi_epi16(v_distx, _MM_SHUFFLE(2,2,0,0)); v_distx = _mm_shufflelo_epi16(v_distx, _MM_SHUFFLE(2,2,0,0)); v_disty = _mm_shufflehi_epi16(v_disty, _MM_SHUFFLE(2,2,0,0)); |