Skip to content

Avoid SSE2 punning

Sync qt_scale_image_argb32_on_argb32_sse2 and qt_scale_image_32bit

The rounding was different in the SSE2 version compared to the C

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-85109
Change-Id: I81f0a71ee5425b93da80b6a438e1778a02b9bcfa
Reviewed-by: Eirik Aavitsland <>
(cherry picked from commit 7a146019e433e687de7a954c7791ac6fc6fa199c)

Avoid SSE2 punning

It is technical UB, even if GCC promises to let it work, but it also
generates inefficient code.

Pick-to: 6.4
Change-Id: I8f0cae3490d32287ecbaa16b1e9ace84223cda2a
Reviewed-by: Thiago Macieira <>
(cherry picked from commit 821aa1ff095ae66a89eb8725650dccac363f06ad)

Note: I can't claim to fully understand what they are doing there, but the code has had more than a year of testing and remains the same in dev branch, "technical"-UB-- and inefficiency-- sounds good.

Edited by Andreas Sturmlechner

Merge request reports