20 #ifndef FREERDP_CODEC_YUV_H
21 #define FREERDP_CODEC_YUV_H
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 #include <freerdp/constants.h>
32 typedef struct S_YUV_CONTEXT YUV_CONTEXT;
34 FREERDP_API BOOL yuv420_context_decode(
35 YUV_CONTEXT* WINPR_RESTRICT context,
const BYTE* WINPR_RESTRICT pYUVData[3],
36 const UINT32 iStride[3], UINT32 yuvHeight, DWORD DstFormat, BYTE* WINPR_RESTRICT dest,
37 UINT32 nDstStep,
const RECTANGLE_16* WINPR_RESTRICT regionRects, UINT32 numRegionRects);
38 FREERDP_API BOOL yuv420_context_encode(YUV_CONTEXT* WINPR_RESTRICT context,
39 const BYTE* WINPR_RESTRICT rgbData, UINT32 srcStep,
40 UINT32 srcFormat,
const UINT32 iStride[3],
41 BYTE* WINPR_RESTRICT yuvData[3],
43 UINT32 numRegionRects);
45 FREERDP_API BOOL yuv444_context_decode(
46 YUV_CONTEXT* WINPR_RESTRICT context, BYTE type,
const BYTE* WINPR_RESTRICT pYUVData[3],
47 const UINT32 iStride[3], UINT32 srcYuvHeight, BYTE* WINPR_RESTRICT pYUVDstData[3],
48 const UINT32 iDstStride[3], DWORD DstFormat, BYTE* WINPR_RESTRICT dest, UINT32 nDstStep,
49 const RECTANGLE_16* WINPR_RESTRICT regionRects, UINT32 numRegionRects);
50 FREERDP_API BOOL yuv444_context_encode(YUV_CONTEXT* WINPR_RESTRICT context, BYTE version,
51 const BYTE* WINPR_RESTRICT pSrcData, UINT32 nSrcStep,
52 UINT32 SrcFormat,
const UINT32 iStride[3],
53 BYTE* WINPR_RESTRICT pYUVLumaData[3],
54 BYTE* WINPR_RESTRICT pYUVChromaData[3],
56 UINT32 numRegionRects);
58 FREERDP_API BOOL yuv_context_reset(YUV_CONTEXT* WINPR_RESTRICT context, UINT32 width,
61 FREERDP_API
void yuv_context_free(YUV_CONTEXT* context);
63 WINPR_ATTR_MALLOC(yuv_context_free, 1)
64 FREERDP_API YUV_CONTEXT* yuv_context_new(BOOL encoder, UINT32 ThreadingFlags);