FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
prim_copy.h
1
21#ifndef FREERDP_LIB_PRIM_COPY_H
22#define FREERDP_LIB_PRIM_COPY_H
23
24#include <winpr/wtypes.h>
25#include <winpr/sysinfo.h>
26
27#include <freerdp/config.h>
28#include <freerdp/primitives.h>
29
30pstatus_t generic_image_copy_no_overlap_convert(
31 BYTE* WINPR_RESTRICT pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
32 UINT32 nWidth, UINT32 nHeight, const BYTE* WINPR_RESTRICT pSrcData, DWORD SrcFormat,
33 UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc, const gdiPalette* WINPR_RESTRICT palette,
34 int64_t srcVMultiplier, int64_t srcVOffset, int64_t dstVMultiplier, int64_t dstVOffset);
35
36pstatus_t generic_image_copy_no_overlap_memcpy(
37 BYTE* WINPR_RESTRICT pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
38 UINT32 nWidth, UINT32 nHeight, const BYTE* WINPR_RESTRICT pSrcData, DWORD SrcFormat,
39 UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc, const gdiPalette* WINPR_RESTRICT palette,
40 int64_t srcVMultiplier, int64_t srcVOffset, int64_t dstVMultiplier, int64_t dstVOffset,
41 UINT32 flags);
42
43FREERDP_LOCAL void primitives_init_copy_sse41_int(primitives_t* WINPR_RESTRICT prims);
44static inline void primitives_init_copy_sse41(primitives_t* WINPR_RESTRICT prims)
45{
46 if (!IsProcessorFeaturePresent(PF_SSE4_1_INSTRUCTIONS_AVAILABLE))
47 return;
48
49 primitives_init_copy_sse41_int(prims);
50}
51
52#if defined(WITH_AVX2)
53FREERDP_LOCAL void primitives_init_copy_avx2_int(primitives_t* WINPR_RESTRICT prims);
54static inline void primitives_init_copy_avx2(primitives_t* WINPR_RESTRICT prims)
55{
56 if (!IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE))
57 return;
58
59 primitives_init_copy_avx2_int(prims);
60}
61#endif
62
63#endif