mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-10-26 14:57:54 +03:00
LibGfx/JPEGLoader: Use 1 / sqrt(8) instead of rsqrt(8)
At least on arm64, rsqrt(8) has noticeably worse precision: https://github.com/SerenityOS/serenity/issues/22739#issuecomment-1912909835
This commit is contained in:
parent
8a07aa9e9a
commit
1ed9e597a9
Notes:
sideshowbarker
2024-07-17 18:46:30 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/1ed9e597a9 Pull-request: https://github.com/SerenityOS/serenity/pull/22996
@ -1425,7 +1425,7 @@ static void inverse_dct_8x8(i16* block_component)
|
||||
static float const m5 = 2.0f * AK::cos(3.0f / 16.0f * 2.0f * AK::Pi<float>);
|
||||
static float const m2 = m0 - m5;
|
||||
static float const m4 = m0 + m5;
|
||||
static float const s0 = AK::cos(0.0f / 16.0f * AK::Pi<float>) * AK::rsqrt(8.0f);
|
||||
static float const s0 = AK::cos(0.0f / 16.0f * AK::Pi<float>) / AK::sqrt(8.0f);
|
||||
static float const s1 = AK::cos(1.0f / 16.0f * AK::Pi<float>) / 2.0f;
|
||||
static float const s2 = AK::cos(2.0f / 16.0f * AK::Pi<float>) / 2.0f;
|
||||
static float const s3 = AK::cos(3.0f / 16.0f * AK::Pi<float>) / 2.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user