Skip to content

Commit 9201664

Browse files
committed
Updated rgba_to_hsla for ARMv7
1 parent d123983 commit 9201664

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/private/dsp/arch/arm/neon-d32/graphics.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,13 +1353,13 @@ namespace lsp
13531353
__ASM_EMIT("vmul.f32 q4, q6, q9") /* q4 = D/X */ \
13541354
__ASM_EMIT("veor q5, q5") /* q5 = 0 */ \
13551355
\
1356-
__ASM_EMIT("vclt.f32 q6, q1, q13") /* q6 = [L < 1] */ \
1356+
__ASM_EMIT("vcle.f32 q6, q1, q14") /* q6 = [L <= 0.5] */ \
13571357
__ASM_EMIT("vceq.f32 q7, q1, q5") /* q7 = [L == 0] */ \
1358-
__ASM_EMIT("vcgt.f32 q8, q1, q13") /* q8 = [L > 1] */ \
1359-
__ASM_EMIT("vbit q6, q5, q7") /* q6 = [L < 1] & [L != 0] */ \
1360-
__ASM_EMIT("vand q8, q8, q4") /* q8 = D/X & [L > 1] */ \
1361-
__ASM_EMIT("vand q6, q6, q2") /* q6 = D/L & [L < 1] & [L != 0] */ \
1362-
__ASM_EMIT("vorr q2, q8, q6") /* q2 = S = (D/L & [L < 1] & [L != 0]) | (D/X & [L > 1]) */ \
1358+
__ASM_EMIT("vcgt.f32 q8, q1, q14") /* q8 = [L > 0.5] */ \
1359+
__ASM_EMIT("vbit q6, q5, q7") /* q6 = [L <= 0.5] & [L != 0] */ \
1360+
__ASM_EMIT("vand q8, q8, q4") /* q8 = D/X & [L > 0.5] */ \
1361+
__ASM_EMIT("vand q6, q6, q2") /* q6 = D/L & [L <= 0.5] & [L != 0] */ \
1362+
__ASM_EMIT("vorr q2, q8, q6") /* q2 = S = (D/L & [L <= 0.5] & [L != 0]) | (D/X & [L > 0.5]) */ \
13631363
__ASM_EMIT("vmul.f32 q0, q0, q15") /* q0 = H * 1/6 */ \
13641364
__ASM_EMIT("vmul.f32 q2, q2, q14") /* q2 = S * 1/2 */ \
13651365

@@ -1385,7 +1385,7 @@ namespace lsp
13851385
H = (R - G) / d + 4.0f;
13861386
13871387
// Calculate saturation
1388-
if (L < 1.0f)
1388+
if (L < 0.5f)
13891389
S = (L != 0.0f) ? d / L : 0.0f;
13901390
else
13911391
S = (L != 1.0f) ? d / (1.0f - L) : 0.0f;

0 commit comments

Comments
 (0)