diff options
author | Frank Barchard <fbarchard@google.com> | 2024-01-08 23:38:36 -0800 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-01-10 00:08:22 +0000 |
commit | af6ac8265bbd07bcf977526458b60305c4304288 (patch) | |
tree | 3c344bd0ccf39cedd725ac29a5f76b4107dc1363 /source | |
parent | ee53a66c5cfe6723f924818cbed92abe01749b83 (diff) | |
download | libyuv-af6ac8265bbd07bcf977526458b60305c4304288.tar.gz |
AVX10 cpuid detect added
Replace unused popcount feature bit
Bug: libyuv:911
Change-Id: Icd88fcc732751d39b0950d5f09a58bc9ac2c4e30
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5179911
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source')
-rw-r--r-- | source/cpu_id.cc | 2 | ||||
-rw-r--r-- | source/row_lasx.cc | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/source/cpu_id.cc b/source/cpu_id.cc index 5dfe3b3a..eedce16b 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -322,7 +322,7 @@ static SAFEBUFFERS int GetCpuFlags(void) { cpu_info |= (cpu_info7[2] & 0x00000040) ? kCpuHasAVX512VBMI2 : 0; cpu_info |= (cpu_info7[2] & 0x00000800) ? kCpuHasAVX512VNNI : 0; cpu_info |= (cpu_info7[2] & 0x00001000) ? kCpuHasAVX512VBITALG : 0; - cpu_info |= (cpu_info7[2] & 0x00004000) ? kCpuHasAVX512VPOPCNTDQ : 0; + cpu_info |= (cpu_einfo7[3] & 0x00080000) ? kCpuHasAVX10 : 0; } } #endif diff --git a/source/row_lasx.cc b/source/row_lasx.cc index 0814ef1c..be85022e 100644 --- a/source/row_lasx.cc +++ b/source/row_lasx.cc @@ -543,7 +543,8 @@ void I422ToARGB4444Row_LASX(const uint8_t* src_y, __m256i vec_yb, vec_yg, vec_ub, vec_vr, vec_ug, vec_vg; __m256i vec_ubvr, vec_ugvg; __m256i const_0x80 = __lasx_xvldi(0x80); - __m256i alpha = (__m256i)v4u64{0xF000F000F000F000, 0xF000F000F000F000, 0xF000F000F000F000, 0xF000F000F000F000}; + __m256i alpha = (__m256i)v4u64{0xF000F000F000F000, 0xF000F000F000F000, + 0xF000F000F000F000, 0xF000F000F000F000}; __m256i mask = {0x00F000F000F000F0, 0x00F000F000F000F0, 0x00F000F000F000F0, 0x00F000F000F000F0}; @@ -595,7 +596,7 @@ void I422ToARGB1555Row_LASX(const uint8_t* src_y, __m256i vec_ubvr, vec_ugvg; __m256i const_0x80 = __lasx_xvldi(0x80); __m256i alpha = (__m256i)v4u64{0x8000800080008000, 0x8000800080008000, - 0x8000800080008000, 0x8000800080008000}; + 0x8000800080008000, 0x8000800080008000}; YUVTORGB_SETUP(yuvconstants, vec_ub, vec_vr, vec_ug, vec_vg, vec_yg, vec_yb); vec_ubvr = __lasx_xvilvl_h(vec_ub, vec_vr); @@ -799,7 +800,7 @@ void ARGBToUVRow_LASX(const uint8_t* src_argb0, __m256i control = {0x0000000400000000, 0x0000000500000001, 0x0000000600000002, 0x0000000700000003}; __m256i const_0x8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, - 0x8080808080808080, 0x8080808080808080}; + 0x8080808080808080, 0x8080808080808080}; for (x = 0; x < len; x++) { DUP4_ARG2(__lasx_xvld, src_argb0, 0, src_argb0, 32, src_argb0, 64, @@ -1037,7 +1038,7 @@ void ARGBToUV444Row_LASX(const uint8_t* src_argb, __m256i const_94 = __lasx_xvldi(94); __m256i const_18 = __lasx_xvldi(18); __m256i const_0x8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, - 0x8080808080808080, 0x8080808080808080}; + 0x8080808080808080, 0x8080808080808080}; __m256i control = {0x0000000400000000, 0x0000000500000001, 0x0000000600000002, 0x0000000700000003}; for (x = 0; x < len; x++) { @@ -1609,7 +1610,7 @@ void ARGB1555ToUVRow_LASX(const uint8_t* src_argb1555, __m256i const_94 = __lasx_xvldi(0x42F); __m256i const_18 = __lasx_xvldi(0x409); __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, - 0x8080808080808080, 0x8080808080808080}; + 0x8080808080808080, 0x8080808080808080}; for (x = 0; x < len; x++) { DUP4_ARG2(__lasx_xvld, src_argb1555, 0, src_argb1555, 32, next_argb1555, 0, @@ -1726,7 +1727,7 @@ void RGB565ToUVRow_LASX(const uint8_t* src_rgb565, __m256i const_94 = __lasx_xvldi(0x42F); __m256i const_18 = __lasx_xvldi(0x409); __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, - 0x8080808080808080, 0x8080808080808080}; + 0x8080808080808080, 0x8080808080808080}; for (x = 0; x < len; x++) { DUP4_ARG2(__lasx_xvld, src_rgb565, 0, src_rgb565, 32, next_rgb565, 0, @@ -1793,7 +1794,7 @@ void RGB24ToUVRow_LASX(const uint8_t* src_rgb24, __m256i const_94 = __lasx_xvldi(0x42F); __m256i const_18 = __lasx_xvldi(0x409); __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, - 0x8080808080808080, 0x8080808080808080}; + 0x8080808080808080, 0x8080808080808080}; __m256i shuff0_b = {0x15120F0C09060300, 0x00000000001E1B18, 0x15120F0C09060300, 0x00000000001E1B18}; __m256i shuff1_b = {0x0706050403020100, 0x1D1A1714110A0908, @@ -1856,7 +1857,7 @@ void RAWToUVRow_LASX(const uint8_t* src_raw, __m256i const_94 = __lasx_xvldi(0x42F); __m256i const_18 = __lasx_xvldi(0x409); __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, - 0x8080808080808080, 0x8080808080808080}; + 0x8080808080808080, 0x8080808080808080}; __m256i shuff0_r = {0x15120F0C09060300, 0x00000000001E1B18, 0x15120F0C09060300, 0x00000000001E1B18}; __m256i shuff1_r = {0x0706050403020100, 0x1D1A1714110A0908, @@ -2242,7 +2243,7 @@ void ARGBToUVJRow_LASX(const uint8_t* src_argb, __m256i const_53 = __lasx_xvldi(0x435); __m256i const_10 = __lasx_xvldi(0x40A); __m256i const_8080 = (__m256i)v4u64{0x8080808080808080, 0x8080808080808080, - 0x8080808080808080, 0x8080808080808080}; + 0x8080808080808080, 0x8080808080808080}; __m256i shuff = {0x1614060412100200, 0x1E1C0E0C1A180A08, 0x1715070513110301, 0x1F1D0F0D1B190B09}; |