mmx: add src_8888_0565
authorMatt Turner <mattst88@gmail.com>
Thu, 19 Apr 2012 21:33:27 +0000 (17:33 -0400)
committerMatt Turner <mattst88@gmail.com>
Fri, 27 Apr 2012 18:12:28 +0000 (14:12 -0400)
commit2ddd1c498b723e8e48a38eef01d5befba30b5259
tree69137f60e6e43b5dbfc09c08d1f90d25540bfcea
parent3e8fe65a0893fcd82bdea205de49f53be32bb074
mmx: add src_8888_0565

Uses the pmadd technique described in
http://software.intel.com/sites/landingpage/legacy/mmx/MMX_App_24-16_Bit_Conversion.pdf

The technique uses the packssdw instruction which uses signed
saturatation. This works in their example because they pack 888 to 555
leaving the high bit as zero. For packing to 565, it is unsuitable, so
we replace it with an or+shuffle.

Loongson:
src_8888_0565 =  L1: 106.13  L2:  83.57  M: 33.46 ( 68.90%)  HT: 30.29  VT: 27.67  R: 26.11  RT: 15.06 ( 135Kops/s)
src_8888_0565 =  L1: 122.10  L2: 117.53  M: 37.97 ( 78.58%)  HT: 33.14  VT: 30.09  R: 29.01  RT: 15.76 ( 139Kops/s)

ARM/iwMMXt:
src_8888_0565 =  L1:  67.88  L2:  56.61  M: 31.20 ( 56.74%)  HT: 29.22  VT: 27.01  R: 25.39  RT: 19.29 ( 130Kops/s)
src_8888_0565 =  L1: 110.38  L2:  82.33  M: 40.92 ( 73.22%)  HT: 35.63  VT: 32.22  R: 30.07  RT: 18.40 ( 132Kops/s)
pixman/loongson-mmintrin.h
pixman/pixman-mmx.c