23#ifndef FREERDP_CODEC_NSCODEC_H
24#define FREERDP_CODEC_NSCODEC_H
26#include <freerdp/api.h>
27#include <freerdp/types.h>
28#include <freerdp/constants.h>
30#include <winpr/stream.h>
42 NSC_ALLOW_SUBSAMPLING,
43 NSC_DYNAMIC_COLOR_FIDELITY,
49#if defined(WITH_FREERDP_DEPRECATED)
50 WINPR_DEPRECATED_VAR(
"Use nsc_context_set_parameters(NSC_COLOR_FORMAT)",
51 WINPR_ATTR_NODISCARD FREERDP_API BOOL nsc_context_set_pixel_format(
52 NSC_CONTEXT* context, UINT32 pixel_format));
64 FREERDP_API BOOL nsc_context_set_parameters(NSC_CONTEXT* WINPR_RESTRICT context,
65 NSC_PARAMETER what, UINT32 value);
89 FREERDP_API BOOL nsc_process_message(NSC_CONTEXT* WINPR_RESTRICT context, UINT16 bpp,
90 UINT32 width, UINT32 height,
const BYTE* data,
91 UINT32 length, BYTE* WINPR_RESTRICT pDstData,
92 UINT32 DstFormat, UINT32 nDstStride, UINT32 nXDst,
93 UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, UINT32 flip);
108 FREERDP_API BOOL nsc_compose_message(NSC_CONTEXT* WINPR_RESTRICT context,
110 const BYTE* WINPR_RESTRICT bmpdata, UINT32 width,
111 UINT32 height, UINT32 scanline);
113#if !defined(WITHOUT_FREERDP_3x_DEPRECATED)
115 WINPR_DEPRECATED_VAR(
116 "[since 3.23.0] deprecated, insecure! missing length checks. use nsc_process_message",
117 WINPR_ATTR_NODISCARD FREERDP_API BOOL
118 nsc_decompose_message(NSC_CONTEXT* WINPR_RESTRICT context,
wStream* WINPR_RESTRICT s,
119 BYTE* WINPR_RESTRICT bmpdata, UINT32 x, UINT32 y, UINT32 width,
120 UINT32 height, UINT32 rowstride, UINT32 format, UINT32 flip));
132 FREERDP_API BOOL nsc_context_reset(NSC_CONTEXT* WINPR_RESTRICT context, UINT32 width,
135 FREERDP_API
void nsc_context_free(NSC_CONTEXT* context);
137 WINPR_ATTR_MALLOC(nsc_context_free, 1)
139 FREERDP_API NSC_CONTEXT* nsc_context_new(
void);