[primitives] add image copy primitive

* move freerdp_image_copy_no_overlap implementation to primitives
* add SSE4.1 and AVX2 optimizations
This commit is contained in:
akallabeth
2024-06-11 09:51:29 +02:00
parent 2ee987e665
commit 311068e605
9 changed files with 1023 additions and 214 deletions

View File

@@ -104,6 +104,12 @@ typedef pstatus_t (*__add_16s_t)(const INT16* WINPR_RESTRICT pSrc1,
UINT32 len);
typedef pstatus_t (*__add_16s_inplace_t)(INT16* WINPR_RESTRICT pSrcDst1,
INT16* WINPR_RESTRICT pSrcDst2, UINT32 len);
typedef pstatus_t (*__copy_no_overlap_t)(BYTE* WINPR_RESTRICT pDstData, DWORD DstFormat,
UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst, UINT32 nWidth,
UINT32 nHeight, const BYTE* WINPR_RESTRICT pSrcData,
DWORD SrcFormat, UINT32 nSrcStep, UINT32 nXSrc,
UINT32 nYSrc, const gdiPalette* WINPR_RESTRICT palette,
UINT32 flags);
typedef pstatus_t (*__lShiftC_16s_inplace_t)(INT16* WINPR_RESTRICT pSrcDst, UINT32 val, UINT32 len);
typedef pstatus_t (*__lShiftC_16s_t)(const INT16* pSrc, UINT32 val, INT16* pSrcDst, UINT32 len);
typedef pstatus_t (*__lShiftC_16u_t)(const UINT16* pSrc, UINT32 val, UINT16* pSrcDst, UINT32 len);
@@ -222,6 +228,7 @@ typedef struct
*/
__add_16s_inplace_t add_16s_inplace;
__lShiftC_16s_inplace_t lShiftC_16s_inplace;
__copy_no_overlap_t copy_no_overlap;
} primitives_t;
typedef enum