summaryrefslogtreecommitdiff
path: root/thirdparty/etcpak
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-06-29 14:22:56 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-06-29 14:31:57 +0200
commitde75085c7f2e466441c477c2b2429e23d5e0881e (patch)
tree3fdd7f8404ae57fb572842b59b42e49a6d8ef381 /thirdparty/etcpak
parent26dd4746a1a979132ef81c4674d3ea558a77710a (diff)
etcpak: Fix Android ARMv7 build with NDK r23
Fix merged upstream. Fixes #62516.
Diffstat (limited to 'thirdparty/etcpak')
-rw-r--r--thirdparty/etcpak/ProcessRGB.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/thirdparty/etcpak/ProcessRGB.cpp b/thirdparty/etcpak/ProcessRGB.cpp
index fdb0967ce7..4dc3bf23af 100644
--- a/thirdparty/etcpak/ProcessRGB.cpp
+++ b/thirdparty/etcpak/ProcessRGB.cpp
@@ -3216,9 +3216,9 @@ etcpak_force_inline static uint16x8_t ErrorProbe_EAC_NEON( uint8x8_t recVal, uin
uint8x8_t srcValWide;
#ifndef __aarch64__
if( Index < 8 )
- srcValWide = vdup_lane_u8( vget_low_u8( alphaBlock ), ClampConstant( Index, 0, 8 ) );
+ srcValWide = vdup_lane_u8( vget_low_u8( alphaBlock ), ClampConstant( Index, 0, 7 ) );
else
- srcValWide = vdup_lane_u8( vget_high_u8( alphaBlock ), ClampConstant( Index - 8, 0, 8 ) );
+ srcValWide = vdup_lane_u8( vget_high_u8( alphaBlock ), ClampConstant( Index - 8, 0, 7 ) );
#else
srcValWide = vdup_laneq_u8( alphaBlock, Index );
#endif
@@ -3256,9 +3256,9 @@ etcpak_force_inline static int16x8_t WidenMultiplier_EAC_NEON( int16x8_t multipl
constexpr int Lane = GetMulSel( Index );
#ifndef __aarch64__
if( Lane < 4 )
- return vdupq_lane_s16( vget_low_s16( multipliers ), ClampConstant( Lane, 0, 4 ) );
+ return vdupq_lane_s16( vget_low_s16( multipliers ), ClampConstant( Lane, 0, 3 ) );
else
- return vdupq_lane_s16( vget_high_s16( multipliers ), ClampConstant( Lane - 4, 0, 4 ) );
+ return vdupq_lane_s16( vget_high_s16( multipliers ), ClampConstant( Lane - 4, 0, 3 ) );
#else
return vdupq_laneq_s16( multipliers, Lane );
#endif