| Index: source/row_gcc.cc
|
| diff --git a/source/row_gcc.cc b/source/row_gcc.cc
|
| index 1ac7ef1aa398b249491619563ac67cf57bc8472b..6b0d4ad24bb8b99a9c52c6596c6f06c1ae0c2aee 100644
|
| --- a/source/row_gcc.cc
|
| +++ b/source/row_gcc.cc
|
| @@ -5366,6 +5366,34 @@ void ARGBPolynomialRow_AVX2(const uint8* src_argb,
|
| }
|
| #endif // HAS_ARGBPOLYNOMIALROW_AVX2
|
|
|
| +#ifdef HAS_HALFFLOATROW_AVX2
|
| +void HalfFloatRow_AVX2(const uint16* src, int16* dst, float scale, int width) {
|
| + asm volatile (
|
| + "vbroadcastss %3, %%ymm4 \n"
|
| +
|
| + // 8 pixel loop.
|
| + LABELALIGN
|
| + "1: \n"
|
| + "vpmovzxwd " MEMACCESS(0) ",%%ymm0 \n" // 8 shorts -> 8 ints
|
| + "lea " MEMLEA(0x10,0) ",%0 \n"
|
| + "vcvtdq2ps %%ymm0,%%ymm0 \n"
|
| + "vmulps %%ymm0,%%ymm4,%%ymm0 \n"
|
| + "vcvtps2ph $3, %%ymm0, %%xmm0 \n"
|
| + "vmovdqu %%xmm0," MEMACCESS(1) " \n"
|
| + "lea " MEMLEA(0x10,1) ",%1 \n"
|
| + "sub $0x8,%2 \n"
|
| + "jg 1b \n"
|
| + "vzeroupper \n"
|
| + : "+r"(src), // %0
|
| + "+r"(dst), // %1
|
| + "+r"(width) // %2
|
| + : "x"(scale) // %3
|
| + : "memory", "cc",
|
| + "xmm0", "xmm4"
|
| + );
|
| +}
|
| +#endif // HAS_HALFFLOATROW_AVX2
|
| +
|
| #ifdef HAS_ARGBCOLORTABLEROW_X86
|
| // Tranform ARGB pixels with color table.
|
| void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb,
|
|
|