libyuv/unit_test
Frank Barchard 11dd1b956f ARGBToAR30 use vpmulhuw to replicate fields
AR30 is optimized with 3 techniques
1. vpmulhuw 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. vpshufb is used to shift and mask 2 channels of R and B

Red Blue
With the 8 bit value in the upper bits, vpmulhuw by (1024+4) will produce a 10
bit value in the low 10 bits of each 16 bit value. This is whats wanted for the
blue channel. The red needs to be shifted 4 left, so multiply by (1024+4)*16 for
red.

Alpha Green
Alpha and Green are already in the high bits so vpand can zero out the other
bits, keeping just 2 upper bits of alpha and 8 bit green. The same multiplier
could be used for Green - (1024+4) putting the 10 bit green in the lsb.  Alpha
would be a simple multiplier to shift it into position.  It wants a gap of 10
above the green.  Green is 10 bits, so there are 6 bits in the low short.  4
more are needed, so a multiplier of 4 gets the 2 bits into the upper 16 bits,
and then a shift of 4 is a multiply of 16, so (4*16) = 64.  Then shift the
result left 10 to position the A and G channels.

Bug: libyuv:751
Test: ARGBToAR30_Opt
Change-Id: Ie4f20dce18203bae7b75acb1fd5232db8a8a4f11
Reviewed-on: https://chromium-review.googlesource.com/820046
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-12-12 02:57:54 +00:00
..
testdata Detect asimd as same as Neon for Arm features. Used on Juno aarch64 linux. 2014-09-22 18:30:17 +00:00
basictypes_test.cc break up unittests into categories 2015-10-13 16:01:07 -07:00
color_test.cc Step thru full color test by increments of 5 for better test speed. 2017-09-19 02:01:53 +00:00
compare_test.cc Convert16To8Row_SSSE3 port from AVX2 2017-11-28 19:22:39 +00:00
convert_test.cc ARGBToAR30 use vpmulhuw to replicate fields 2017-12-12 02:57:54 +00:00
cpu_test.cc Add H010ToARGB for 10 bit YUV to ARGB 2017-12-07 20:17:50 +00:00
cpu_thread_test.cc MaskCpuFlags return cpuinfo so InitCpuFlags can call it 2017-05-24 22:27:03 +00:00
math_test.cc clang-format libyuv 2016-11-07 17:37:23 -08:00
planar_test.cc Convert16To8Row_SSSE3 port from AVX2 2017-11-28 19:22:39 +00:00
rotate_argb_test.cc clang-format libyuv 2016-11-07 17:37:23 -08:00
rotate_test.cc clang-format libyuv 2016-11-07 17:37:23 -08:00
scale_argb_test.cc scale test clipping code unused cpu parameters removed 2017-02-14 03:26:50 +00:00
scale_test.cc H420ToRAW and H420ToRGB24 added for bt.709 support. 2017-11-17 01:20:05 +00:00
unit_test.cc Add MaskCpuFlags(benchmark_cpu_info_) to unittest initialization 2017-09-12 19:13:06 +00:00
unit_test.h clang-format for align_buffer_page_end and free_aligned_buffer_page_end 2017-11-10 22:36:39 +00:00
video_common_test.cc H010ToAR30 for 10 bit bt.709 YUV to 30 bit RGB 2017-11-22 23:58:30 +00:00