Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Issue 1029163002: Replace _mm_cvtps_epi32(x) with _mm_cvttps_epi32(_mm_add_ps(0.5f), x). (Closed)

Created:
5 years, 9 months ago by mtklein_C
Modified:
5 years, 9 months ago
Reviewers:
mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Replace _mm_cvtps_epi32(x) with _mm_cvttps_epi32(_mm_add_ps(0.5f), x). We don't have control over which way _mm_cvtps_epi32 rounds. - This makes the SSE SkPMFloat rounding consistent with _neon and _none. - Sk4f::cast<Sk4i>() is closer to (int)float's behavior. (Correct when >=0). Add tests that would fail at head. BUG=skia: Committed: https://skia.googlesource.com/skia/+/92d04da38f03dfabd8cd9a7244588a49be9a2f41

Patch Set 1 #

Patch Set 2 : explicit limitation #

Patch Set 3 : tweak test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -17 lines) Patch
M src/opts/Sk4x_sse.h View 1 1 chunk +3 lines, -4 lines 0 comments Download
M src/opts/SkPMFloat_SSE2.h View 2 chunks +7 lines, -5 lines 0 comments Download
M src/opts/SkPMFloat_SSSE3.h View 3 chunks +9 lines, -6 lines 0 comments Download
M tests/PMFloatTest.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tests/Sk4xTest.cpp View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
mtklein_C
5 years, 9 months ago (2015-03-23 18:44:07 UTC) #2
reed1
lgtm
5 years, 9 months ago (2015-03-23 18:49:06 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1029163002/40001
5 years, 9 months ago (2015-03-23 18:56:27 UTC) #5
commit-bot: I haz the power
5 years, 9 months ago (2015-03-23 19:01:50 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://skia.googlesource.com/skia/+/92d04da38f03dfabd8cd9a7244588a49be9a2f41

Powered by Google App Engine
This is Rietveld 408576698