}
}
-
-
-void
-fbCompositeSrc_x888x0565neon (
- pixman_implementation_t * impl,
- pixman_op_t op,
- pixman_image_t * pSrc,
- pixman_image_t * pMask,
- pixman_image_t * pDst,
- int32_t xSrc,
- int32_t ySrc,
- int32_t xMask,
- int32_t yMask,
- int32_t xDst,
- int32_t yDst,
- int32_t width,
- int32_t height)
-{
- uint16_t *dstLine, *dst;
- uint32_t *srcLine, *src;
- int dstStride, srcStride;
- uint32_t w;
-
- fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
- fbComposeGetStart (pDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
-
- if (width>=8)
- {
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- src = srcLine;
- srcLine += srcStride;
- w = width;
-
- do {
- while (w>=8)
- {
-#ifndef USE_GCC_INLINE_ASM
- vst1q_u16(dst, pack0565(vld4_u8((void*)src)));
-#else
- asm volatile (
- "vld4.8 {d4-d7}, [%[src]]\n\t"
- "vshll.u8 q0, d6, #8\n\t"
- "vshll.u8 q1, d5, #8\n\t"
- "vsriq.u16 q0, q1, #5\t\n"
- "vshll.u8 q1, d4, #8\n\t"
- "vsriq.u16 q0, q1, #11\t\n"
- "vst1.16 {q0}, [%[dst]]\n\t"
- :
- : [dst] "r" (dst), [src] "r" (src)
- : "memory", "d0","d1","d2","d3","d4","d5","d6","d7"
- );
-#endif
- src+=8;
- dst+=8;
- w-=8;
- }
- if (w != 0)
- {
- src -= (8-w);
- dst -= (8-w);
- w = 8; // do another vector
- }
- } while (w!=0);
- }
- }
- else
- {
- // Handle width<8
- while (height--)
- {
- dst = dstLine;
- dstLine += dstStride;
- src = srcLine;
- srcLine += srcStride;
- w = width;
-
- while (w>=2)
- {
- uint32x2_t sval, rgb, g, b;
- sval = vld1_u32(src);
- rgb = vshr_n_u32(sval,8-5); // r (5 bits)
- g = vshr_n_u32(sval,8+8-6); // g to bottom byte
- rgb = vsli_n_u32(rgb, g, 5);
- b = vshr_n_u32(sval,8+8+8-5); // b to bottom byte
- rgb = vsli_n_u32(rgb, b, 11);
- vst1_lane_u16(dst++,vreinterpret_u16_u32(rgb),0);
- vst1_lane_u16(dst++,vreinterpret_u16_u32(rgb),2);
- src+=2;
- w-=2;
- }
- if (w)
- {
- uint32x2_t sval, rgb, g, b;
- sval = vld1_dup_u32(src);
- rgb = vshr_n_u32(sval,8-5); // r (5 bits)
- g = vshr_n_u32(sval,8+8-6); // g to bottom byte
- rgb = vsli_n_u32(rgb, g, 5);
- b = vshr_n_u32(sval,8+8+8-5); // b to bottom byte
- rgb = vsli_n_u32(rgb, b, 11);
- vst1_lane_u16(dst++,vreinterpret_u16_u32(rgb),0);
- }
- }
- }
-}
-
-
void
fbCompositeSrc_8888x8x8888neon (
pixman_implementation_t * impl,