diff options
author | Frank Barchard <fbarchard@chromium.org> | 2017-12-12 11:05:46 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2017-12-12 20:12:58 +0000 |
commit | c3677514309ca27d3f8ffb22272a9b699e544131 (patch) | |
tree | dcf034719ce760a059ed427a0adf32b087a8b9f8 /source/convert_from_argb.cc | |
parent | d94a4867bf8be91e4c0fa8b7a4133ba060fe524f (diff) | |
download | libyuv-c3677514309ca27d3f8ffb22272a9b699e544131.tar.gz |
ARGBToAR30 SSSE3 use pmulhuw to replicate fields
AR30 is optimized with 3 techniques
1. pmulhuw is used to replicate 8 bits to 10 bits.
2. Two channels are processed at a time. R and B, and A and G.
3. pshufb is used to shift and mask 2 channels of R and B
Bug: libyuv:751
Test: ARGBToAR30_Opt
Change-Id: I4e62d6caa4df7d0ae80395fa911d3c922b6b897b
Reviewed-on: https://chromium-review.googlesource.com/822520
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/convert_from_argb.cc')
-rw-r--r-- | source/convert_from_argb.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/convert_from_argb.cc b/source/convert_from_argb.cc index 02a54685..4dca2405 100644 --- a/source/convert_from_argb.cc +++ b/source/convert_from_argb.cc @@ -1333,11 +1333,11 @@ int ARGBToAR30(const uint8* src_argb, height = 1; src_stride_argb = dst_stride_ar30 = 0; } -#if defined(HAS_ARGBTOAR30ROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2)) { - ARGBToAR30Row = ARGBToAR30Row_Any_SSE2; +#if defined(HAS_ARGBTOAR30ROW_SSSE3) + if (TestCpuFlag(kCpuHasSSSE3)) { + ARGBToAR30Row = ARGBToAR30Row_Any_SSSE3; if (IS_ALIGNED(width, 4)) { - ARGBToAR30Row = ARGBToAR30Row_SSE2; + ARGBToAR30Row = ARGBToAR30Row_SSSE3; } } #endif |