[warnings] remove const params

Avoid const TYPE* const type declarations
This commit is contained in:
akallabeth 2024-09-12 14:28:46 +02:00
parent a1a1fc8658
commit c84655cd62
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
19 changed files with 212 additions and 227 deletions

View File

@ -118,21 +118,19 @@ typedef pstatus_t (*__rShiftC_16u_t)(const UINT16* pSrc, UINT32 val, UINT16* pSr
typedef pstatus_t (*__shiftC_16s_t)(const INT16* pSrc, INT32 val, INT16* pSrcDst, UINT32 len);
typedef pstatus_t (*__shiftC_16u_t)(const UINT16* pSrc, INT32 val, UINT16* pSrcDst, UINT32 len);
typedef pstatus_t (*__sign_16s_t)(const INT16* pSrc, INT16* pSrcDst, UINT32 len);
typedef pstatus_t (*__yCbCrToRGB_16s8u_P3AC4R_t)(const INT16* const WINPR_RESTRICT pSrc[3],
typedef pstatus_t (*__yCbCrToRGB_16s8u_P3AC4R_t)(const INT16* WINPR_RESTRICT pSrc[3],
UINT32 srcStep, BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi);
typedef pstatus_t (*__yCbCrToRGB_16s16s_P3P3_t)(const INT16* const WINPR_RESTRICT pSrc[3],
INT32 srcStep, INT16* WINPR_RESTRICT pDst[3],
INT32 dstStep,
typedef pstatus_t (*__yCbCrToRGB_16s16s_P3P3_t)(const INT16* WINPR_RESTRICT pSrc[3], INT32 srcStep,
INT16* WINPR_RESTRICT pDst[3], INT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi);
typedef pstatus_t (*__RGBToYCbCr_16s16s_P3P3_t)(const INT16* const WINPR_RESTRICT pSrc[3],
INT32 srcStep, INT16* WINPR_RESTRICT pDst[3],
INT32 dstStep,
typedef pstatus_t (*__RGBToYCbCr_16s16s_P3P3_t)(const INT16* WINPR_RESTRICT pSrc[3], INT32 srcStep,
INT16* WINPR_RESTRICT pDst[3], INT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi);
typedef pstatus_t (*__RGBToRGB_16s8u_P3AC4R_t)(const INT16* const WINPR_RESTRICT pSrc[3],
UINT32 srcStep, BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
typedef pstatus_t (*__RGBToRGB_16s8u_P3AC4R_t)(const INT16* WINPR_RESTRICT pSrc[3], UINT32 srcStep,
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi);
typedef pstatus_t (*__YCoCgToRGB_8u_AC4R_t)(const BYTE* WINPR_RESTRICT pSrc, INT32 srcStep,
BYTE* WINPR_RESTRICT pDst, UINT32 DstFormat,
@ -141,11 +139,11 @@ typedef pstatus_t (*__YCoCgToRGB_8u_AC4R_t)(const BYTE* WINPR_RESTRICT pSrc, INT
typedef pstatus_t (*__RGB565ToARGB_16u32u_C3C4_t)(const UINT16* WINPR_RESTRICT pSrc, INT32 srcStep,
UINT32* WINPR_RESTRICT pDst, INT32 dstStep,
UINT32 width, UINT32 height, UINT32 format);
typedef pstatus_t (*__YUV420ToRGB_8u_P3AC4R_t)(const BYTE* const WINPR_RESTRICT pSrc[3],
typedef pstatus_t (*__YUV420ToRGB_8u_P3AC4R_t)(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi);
typedef pstatus_t (*__YUV444ToRGB_8u_P3AC4R_t)(const BYTE* const WINPR_RESTRICT pSrc[3],
typedef pstatus_t (*__YUV444ToRGB_8u_P3AC4R_t)(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi);
@ -158,15 +156,15 @@ typedef pstatus_t (*__RGBToYUV444_8u_P3AC4R_t)(const BYTE* WINPR_RESTRICT pSrc,
UINT32 dstStep[3],
const prim_size_t* WINPR_RESTRICT roi);
typedef pstatus_t (*__YUV420CombineToYUV444_t)(avc444_frame_type type,
const BYTE* const WINPR_RESTRICT pSrc[3],
const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], UINT32 nWidth,
UINT32 nHeight, BYTE* WINPR_RESTRICT pDst[3],
const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi);
typedef pstatus_t (*__YUV444SplitToYUV420_t)(
const BYTE* const WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3],
BYTE* WINPR_RESTRICT pMainDst[3], const UINT32 dstMainStep[3], BYTE* WINPR_RESTRICT pAuxDst[3],
const UINT32 srcAuxStep[3], const prim_size_t* WINPR_RESTRICT roi);
const BYTE* WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pMainDst[3],
const UINT32 dstMainStep[3], BYTE* WINPR_RESTRICT pAuxDst[3], const UINT32 srcAuxStep[3],
const prim_size_t* WINPR_RESTRICT roi);
typedef pstatus_t (*__RGBToAVC444YUV_t)(const BYTE* WINPR_RESTRICT pSrc, UINT32 srcFormat,
UINT32 srcStep, BYTE* WINPR_RESTRICT pMainDst[3],
const UINT32 dstMainStep[3],

View File

@ -1050,8 +1050,8 @@ progressive_decompress_tile_first(PROGRESSIVE_CONTEXT* WINPR_RESTRICT progressiv
if (rc < 0)
goto fail;
rc = prims->yCbCrToRGB_16s8u_P3AC4R((const INT16* const*)pSrcDst, 64 * 2, tile->data,
tile->stride, progressive->format, &roi_64x64);
rc = prims->yCbCrToRGB_16s8u_P3AC4R((const INT16**)pSrcDst, 64 * 2, tile->data, tile->stride,
progressive->format, &roi_64x64);
fail:
BufferPool_Return(progressive->bufferPool, pBuffer);
return rc;
@ -1494,7 +1494,7 @@ progressive_decompress_tile_upgrade(PROGRESSIVE_CONTEXT* WINPR_RESTRICT progress
if (status < 0)
goto fail;
status = prims->yCbCrToRGB_16s8u_P3AC4R((const INT16* const*)pSrcDst, 64 * 2, tile->data,
status = prims->yCbCrToRGB_16s8u_P3AC4R((const INT16**)pSrcDst, 64 * 2, tile->data,
tile->stride, progressive->format, &roi_64x64);
fail:
BufferPool_Return(progressive->bufferPool, pBuffer);

View File

@ -358,7 +358,7 @@ const char* rpc_error_to_string(UINT32 code)
for (size_t index = 0; index < ARRAYSIZE(RPC_FAULT_CODES); index++)
{
const RPC_FAULT_CODE* const current = &RPC_FAULT_CODES[index];
const RPC_FAULT_CODE* current = &RPC_FAULT_CODES[index];
if (current->code == code)
{
(void)sprintf_s(buffer, ARRAYSIZE(buffer), "%s", current->name);
@ -368,7 +368,7 @@ const char* rpc_error_to_string(UINT32 code)
for (size_t index = 0; index < ARRAYSIZE(RPC_TSG_FAULT_CODES); index++)
{
const RPC_FAULT_CODE* const current = &RPC_TSG_FAULT_CODES[index];
const RPC_FAULT_CODE* current = &RPC_TSG_FAULT_CODES[index];
if (current->code == code)
{
(void)sprintf_s(buffer, ARRAYSIZE(buffer), "%s", current->name);
@ -378,7 +378,7 @@ const char* rpc_error_to_string(UINT32 code)
for (size_t index = 0; index < ARRAYSIZE(RPC_TSG_FAULT_CODES); index++)
{
const RPC_FAULT_CODE* const current = &RPC_TSG_FAULT_CODES[index];
const RPC_FAULT_CODE* current = &RPC_TSG_FAULT_CODES[index];
if (current->code == HRESULT_CODE(code))
{
(void)sprintf_s(buffer, ARRAYSIZE(buffer), "%s", current->name);
@ -395,21 +395,21 @@ const char* rpc_error_to_category(UINT32 code)
{
for (size_t index = 0; index < ARRAYSIZE(RPC_FAULT_CODES); index++)
{
const RPC_FAULT_CODE* const current = &RPC_FAULT_CODES[index];
const RPC_FAULT_CODE* current = &RPC_FAULT_CODES[index];
if (current->code == code)
return current->category;
}
for (size_t index = 0; index < ARRAYSIZE(RPC_TSG_FAULT_CODES); index++)
{
const RPC_FAULT_CODE* const current = &RPC_TSG_FAULT_CODES[index];
const RPC_FAULT_CODE* current = &RPC_TSG_FAULT_CODES[index];
if (current->code == code)
return current->category;
}
for (size_t index = 0; index < ARRAYSIZE(RPC_TSG_FAULT_CODES); index++)
{
const RPC_FAULT_CODE* const current = &RPC_TSG_FAULT_CODES[index];
const RPC_FAULT_CODE* current = &RPC_TSG_FAULT_CODES[index];
if (current->code == HRESULT_CODE(code))
return current->category;
}

View File

@ -41,9 +41,8 @@
#define logonInfoV2ReservedSize 558
#define logonInfoV2TotalSize (logonInfoV2Size + logonInfoV2ReservedSize)
static const char* const INFO_TYPE_LOGON_STRINGS[4] = { "Logon Info V1", "Logon Info V2",
"Logon Plain Notify",
"Logon Extended Info" };
static const char* INFO_TYPE_LOGON_STRINGS[4] = { "Logon Info V1", "Logon Info V2",
"Logon Plain Notify", "Logon Extended Info" };
/* This define limits the length of the strings in the label field. */
#define MAX_LABEL_LENGTH 40

View File

@ -348,7 +348,7 @@ static state_run_t license_server_recv(rdpLicense* license, wStream* s);
#ifdef WITH_DEBUG_LICENSE
static const char* const error_codes[] = { "ERR_UNKNOWN",
static const char* error_codes[] = { "ERR_UNKNOWN",
"ERR_INVALID_SERVER_CERTIFICATE",
"ERR_NO_LICENSE",
"ERR_INVALID_MAC",
@ -362,9 +362,8 @@ static const char* const error_codes[] = { "ERR_UNKNOWN",
"ERR_INVALID_PRODUCT_ID",
"ERR_INVALID_MESSAGE_LENGTH" };
static const char* const state_transitions[] = { "ST_UNKNOWN", "ST_TOTAL_ABORT", "ST_NO_TRANSITION",
"ST_RESET_PHASE_TO_START",
"ST_RESEND_LAST_MESSAGE" };
static const char* state_transitions[] = { "ST_UNKNOWN", "ST_TOTAL_ABORT", "ST_NO_TRANSITION",
"ST_RESET_PHASE_TO_START", "ST_RESEND_LAST_MESSAGE" };
static void license_print_product_info(const LICENSE_PRODUCT_INFO* productInfo)
{
@ -2851,8 +2850,8 @@ BOOL license_server_configure(rdpLicense* license)
freerdp_settings_get_uint32(settings, FreeRDP_ServerLicenseProductVersion);
const UINT32 issuerCount =
freerdp_settings_get_uint32(settings, FreeRDP_ServerLicenseProductIssuersCount);
const char* const* issuers = (const char* const*)freerdp_settings_get_pointer(
settings, FreeRDP_ServerLicenseProductIssuers);
const char** issuers =
(const char**)freerdp_settings_get_pointer(settings, FreeRDP_ServerLicenseProductIssuers);
WINPR_ASSERT(CompanyName);
WINPR_ASSERT(ProductName);

View File

@ -789,7 +789,7 @@ static INT64 get_layout_from_locale(const SYSTEM_LOCALE* locale)
{
for (size_t i = 0; i < ARRAYSIZE(LOCALE_KEYBOARD_LAYOUTS_TABLE); i++)
{
const LOCALE_KEYBOARD_LAYOUTS* const current = &LOCALE_KEYBOARD_LAYOUTS_TABLE[i];
const LOCALE_KEYBOARD_LAYOUTS* current = &LOCALE_KEYBOARD_LAYOUTS_TABLE[i];
WINPR_ASSERT(current);
if (current->locale == locale->code)
@ -826,7 +826,7 @@ const char* freerdp_get_system_locale_name_from_id(DWORD localeId)
{
for (size_t index = 0; index < ARRAYSIZE(LOCALE_NAME_TABLE); index++)
{
const LOCALE_NAME* const current = &LOCALE_NAME_TABLE[index];
const LOCALE_NAME* current = &LOCALE_NAME_TABLE[index];
if (localeId == current->localeId)
return current->name;
@ -881,7 +881,7 @@ DWORD freerdp_get_keyboard_default_layout_for_locale(DWORD locale)
{
for (size_t x = 0; x < ARRAYSIZE(LOCALE_KEYBOARD_LAYOUTS_TABLE); x++)
{
const LOCALE_KEYBOARD_LAYOUTS* const cur = &LOCALE_KEYBOARD_LAYOUTS_TABLE[x];
const LOCALE_KEYBOARD_LAYOUTS* cur = &LOCALE_KEYBOARD_LAYOUTS_TABLE[x];
if (cur->locale == locale)
return cur->keyboardLayouts[0];
}

View File

@ -130,11 +130,10 @@ static INLINE BYTE* neon_YuvToRgbPixel(BYTE* pRGB, int16x8_t Y, int16x8_t D, int
return pRGB;
}
static INLINE pstatus_t neon_YUV420ToX(const BYTE* const WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, const prim_size_t* WINPR_RESTRICT roi,
const uint8_t rPos, const uint8_t gPos, const uint8_t bPos,
const uint8_t aPos)
static INLINE pstatus_t neon_YUV420ToX(const BYTE* WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3],
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi, const uint8_t rPos,
const uint8_t gPos, const uint8_t bPos, const uint8_t aPos)
{
const UINT32 nWidth = roi->width;
const UINT32 nHeight = roi->height;
@ -280,11 +279,10 @@ static pstatus_t neon_YUV420ToRGB_8u_P3AC4R(const BYTE* WINPR_RESTRICT const pSr
}
}
static INLINE pstatus_t neon_YUV444ToX(const BYTE* const WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, const prim_size_t* WINPR_RESTRICT roi,
const uint8_t rPos, const uint8_t gPos, const uint8_t bPos,
const uint8_t aPos)
static INLINE pstatus_t neon_YUV444ToX(const BYTE* WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3],
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi, const uint8_t rPos,
const uint8_t gPos, const uint8_t bPos, const uint8_t aPos)
{
const UINT32 nWidth = roi->width;
const UINT32 nHeight = roi->height;
@ -371,9 +369,9 @@ static pstatus_t neon_YUV444ToRGB_8u_P3AC4R(const BYTE* WINPR_RESTRICT const pSr
}
}
static pstatus_t neon_LumaToYUV444(const BYTE* const WINPR_RESTRICT pSrcRaw[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDstRaw[3],
const UINT32 dstStep[3], const RECTANGLE_16* WINPR_RESTRICT roi)
static pstatus_t neon_LumaToYUV444(const BYTE* WINPR_RESTRICT pSrcRaw[3], const UINT32 srcStep[3],
BYTE* WINPR_RESTRICT pDstRaw[3], const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)
{
const UINT32 nWidth = roi->right - roi->left;
const UINT32 nHeight = roi->bottom - roi->top;
@ -534,7 +532,7 @@ static pstatus_t neon_ChromaFilter(BYTE* WINPR_RESTRICT pDst[3], const UINT32 ds
return PRIMITIVES_SUCCESS;
}
static pstatus_t neon_ChromaV1ToYUV444(const BYTE* const WINPR_RESTRICT pSrcRaw[3],
static pstatus_t neon_ChromaV1ToYUV444(const BYTE* WINPR_RESTRICT pSrcRaw[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDstRaw[3],
const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)
@ -625,10 +623,9 @@ static pstatus_t neon_ChromaV1ToYUV444(const BYTE* const WINPR_RESTRICT pSrcRaw[
return neon_ChromaFilter(pDst, dstStep, roi);
}
static pstatus_t neon_ChromaV2ToYUV444(const BYTE* const WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], UINT32 nTotalWidth,
UINT32 nTotalHeight, BYTE* WINPR_RESTRICT pDst[3],
const UINT32 dstStep[3],
static pstatus_t neon_ChromaV2ToYUV444(const BYTE* WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3],
UINT32 nTotalWidth, UINT32 nTotalHeight,
BYTE* WINPR_RESTRICT pDst[3], const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)
{
const UINT32 nWidth = roi->right - roi->left;
@ -711,7 +708,7 @@ static pstatus_t neon_ChromaV2ToYUV444(const BYTE* const WINPR_RESTRICT pSrc[3],
}
static pstatus_t neon_YUV420CombineToYUV444(avc444_frame_type type,
const BYTE* const WINPR_RESTRICT pSrc[3],
const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], UINT32 nWidth, UINT32 nHeight,
BYTE* WINPR_RESTRICT pDst[3], const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)

View File

@ -34,7 +34,7 @@
static primitives_t* generic = NULL;
static pstatus_t
neon_yCbCrToRGB_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], INT32 srcStep,
neon_yCbCrToRGB_16s16s_P3P3(const INT16* WINPR_RESTRICT pSrc[3], INT32 srcStep,
INT16* WINPR_RESTRICT pDst[3], INT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
@ -117,9 +117,8 @@ neon_yCbCrToRGB_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], INT32 src
return PRIMITIVES_SUCCESS;
}
static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R_X(const INT16* const WINPR_RESTRICT pSrc[3],
UINT32 srcStep, BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep,
static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R_X(const INT16* WINPR_RESTRICT pSrc[3], UINT32 srcStep,
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi, uint8_t rPos,
uint8_t gPos, uint8_t bPos, uint8_t aPos)
{
@ -233,9 +232,9 @@ static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R_X(const INT16* const WINPR_RESTRIC
return PRIMITIVES_SUCCESS;
}
static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT pSrc[3],
UINT32 srcStep, BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R(const INT16* WINPR_RESTRICT pSrc[3], UINT32 srcStep,
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)
{
switch (DstFormat)
@ -261,8 +260,8 @@ static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT
}
}
static pstatus_t neon_RGBToRGB_16s8u_P3AC4R_X(
const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
static pstatus_t
neon_RGBToRGB_16s8u_P3AC4R_X(const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */
@ -313,7 +312,7 @@ static pstatus_t neon_RGBToRGB_16s8u_P3AC4R_X(
}
static pstatus_t
neon_RGBToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
neon_RGBToRGB_16s8u_P3AC4R(const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */

View File

@ -106,8 +106,8 @@ fail:
return NULL;
}
static BOOL cl_kernel_set_sources(primitives_cl_kernel* ctx,
const BYTE* const WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3])
static BOOL cl_kernel_set_sources(primitives_cl_kernel* ctx, const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3])
{
const char* sourceNames[] = { "Y", "U", "V" };
@ -207,7 +207,7 @@ static BOOL cl_kernel_process(primitives_cl_kernel* ctx, BYTE* pDst)
return TRUE;
}
static pstatus_t opencl_YUVToRGB(const char* kernelName, const BYTE* const WINPR_RESTRICT pSrc[3],
static pstatus_t opencl_YUVToRGB(const char* kernelName, const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi)
{
@ -277,7 +277,7 @@ static BOOL primitives_init_opencl_context(primitives_opencl_context* WINPR_REST
if (ret != CL_SUCCESS || nplatforms < 1)
return FALSE;
cl_platform_id* platform_ids = calloc(nplatforms, sizeof(*platform_ids));
cl_platform_id* platform_ids = calloc(nplatforms, sizeof(cl_platform_id));
if (!platform_ids)
return FALSE;
@ -395,7 +395,7 @@ fail:
return FALSE;
}
static pstatus_t opencl_YUV420ToRGB_8u_P3AC4R(const BYTE* const WINPR_RESTRICT pSrc[3],
static pstatus_t opencl_YUV420ToRGB_8u_P3AC4R(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)
@ -440,7 +440,7 @@ static pstatus_t opencl_YUV420ToRGB_8u_P3AC4R(const BYTE* const WINPR_RESTRICT p
return opencl_YUVToRGB(kernel_name, pSrc, srcStep, pDst, dstStep, roi);
}
static pstatus_t opencl_YUV444ToRGB_8u_P3AC4R(const BYTE* const WINPR_RESTRICT pSrc[3],
static pstatus_t opencl_YUV444ToRGB_8u_P3AC4R(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)

View File

@ -31,7 +31,7 @@
#include "prim_internal.h"
#include "prim_YUV.h"
static pstatus_t general_LumaToYUV444(const BYTE* const WINPR_RESTRICT pSrcRaw[3],
static pstatus_t general_LumaToYUV444(const BYTE* WINPR_RESTRICT pSrcRaw[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDstRaw[3],
const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)
@ -139,7 +139,7 @@ static pstatus_t general_ChromaFilter(BYTE* WINPR_RESTRICT pDst[3], const UINT32
return PRIMITIVES_SUCCESS;
}
static pstatus_t general_ChromaV1ToYUV444(const BYTE* const WINPR_RESTRICT pSrcRaw[3],
static pstatus_t general_ChromaV1ToYUV444(const BYTE* WINPR_RESTRICT pSrcRaw[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDstRaw[3],
const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)
@ -214,7 +214,7 @@ static pstatus_t general_ChromaV1ToYUV444(const BYTE* const WINPR_RESTRICT pSrcR
return general_ChromaFilter(pDst, dstStep, roi);
}
static pstatus_t general_ChromaV2ToYUV444(const BYTE* const WINPR_RESTRICT pSrc[3],
static pstatus_t general_ChromaV2ToYUV444(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], UINT32 nTotalWidth,
UINT32 nTotalHeight, BYTE* WINPR_RESTRICT pDst[3],
const UINT32 dstStep[3],
@ -266,7 +266,7 @@ static pstatus_t general_ChromaV2ToYUV444(const BYTE* const WINPR_RESTRICT pSrc[
}
static pstatus_t general_YUV420CombineToYUV444(avc444_frame_type type,
const BYTE* const WINPR_RESTRICT pSrc[3],
const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], UINT32 nWidth,
UINT32 nHeight, BYTE* WINPR_RESTRICT pDst[3],
const UINT32 dstStep[3],
@ -298,7 +298,7 @@ static pstatus_t general_YUV420CombineToYUV444(avc444_frame_type type,
}
static pstatus_t
general_YUV444SplitToYUV420(const BYTE* const WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3],
general_YUV444SplitToYUV420(const BYTE* WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3],
BYTE* WINPR_RESTRICT pMainDst[3], const UINT32 dstMainStep[3],
BYTE* WINPR_RESTRICT pAuxDst[3], const UINT32 dstAuxStep[3],
const prim_size_t* WINPR_RESTRICT roi)
@ -386,7 +386,7 @@ general_YUV444SplitToYUV420(const BYTE* const WINPR_RESTRICT pSrc[3], const UINT
return PRIMITIVES_SUCCESS;
}
static pstatus_t general_YUV444ToRGB_8u_P3AC4R_general(const BYTE* const WINPR_RESTRICT pSrc[3],
static pstatus_t general_YUV444ToRGB_8u_P3AC4R_general(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3],
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
UINT32 DstFormat,
@ -424,7 +424,7 @@ static pstatus_t general_YUV444ToRGB_8u_P3AC4R_general(const BYTE* const WINPR_R
return PRIMITIVES_SUCCESS;
}
static pstatus_t general_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* const WINPR_RESTRICT pSrc[3],
static pstatus_t general_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3],
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
UINT32 DstFormat,
@ -461,7 +461,7 @@ static pstatus_t general_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* const WINPR_REST
return PRIMITIVES_SUCCESS;
}
static pstatus_t general_YUV444ToRGB_8u_P3AC4R(const BYTE* const WINPR_RESTRICT pSrc[3],
static pstatus_t general_YUV444ToRGB_8u_P3AC4R(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)
@ -482,7 +482,7 @@ static pstatus_t general_YUV444ToRGB_8u_P3AC4R(const BYTE* const WINPR_RESTRICT
* | G | = ( | 256 -48 -120 | | U - 128 | ) >> 8
* | B | ( | 256 475 0 | | V - 128 | )
*/
static pstatus_t general_YUV420ToRGB_8u_P3AC4R(const BYTE* const WINPR_RESTRICT pSrc[3],
static pstatus_t general_YUV420ToRGB_8u_P3AC4R(const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)

View File

@ -30,7 +30,7 @@
#define MINMAX(_v_, _l_, _h_) ((_v_) < (_l_) ? (_l_) : ((_v_) > (_h_) ? (_h_) : (_v_)))
#endif /* !MINMAX */
/* ------------------------------------------------------------------------- */
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* const WINPR_RESTRICT pSrc[3],
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* WINPR_RESTRICT pSrc[3],
UINT32 srcStep, BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)
@ -73,7 +73,7 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* const WINPR_R
return PRIMITIVES_SUCCESS;
}
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general(const INT16* const WINPR_RESTRICT pSrc[3],
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general(const INT16* WINPR_RESTRICT pSrc[3],
UINT32 srcStep, BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)
@ -114,7 +114,7 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general(const INT16* const WINP
return PRIMITIVES_SUCCESS;
}
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT pSrc[3],
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R(const INT16* WINPR_RESTRICT pSrc[3],
UINT32 srcStep, BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)
@ -135,7 +135,7 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRI
/* ------------------------------------------------------------------------- */
static pstatus_t
general_yCbCrToRGB_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], INT32 srcStep,
general_yCbCrToRGB_16s16s_P3P3(const INT16* WINPR_RESTRICT pSrc[3], INT32 srcStep,
INT16* WINPR_RESTRICT pDst[3], INT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
@ -214,7 +214,7 @@ general_yCbCrToRGB_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], INT32
/* ------------------------------------------------------------------------- */
static pstatus_t
general_RGBToYCbCr_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], INT32 srcStep,
general_RGBToYCbCr_16s16s_P3P3(const INT16* WINPR_RESTRICT pSrc[3], INT32 srcStep,
INT16* WINPR_RESTRICT pDst[3], INT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
@ -429,7 +429,7 @@ static INLINE fkt_writeScanline getScanlineWriteFunction(DWORD format)
/* ------------------------------------------------------------------------- */
static pstatus_t general_RGBToRGB_16s8u_P3AC4R_general(
const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */
@ -455,7 +455,7 @@ static pstatus_t general_RGBToRGB_16s8u_P3AC4R_general(
}
static pstatus_t general_RGBToRGB_16s8u_P3AC4R_BGRX(
const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */
@ -479,12 +479,13 @@ static pstatus_t general_RGBToRGB_16s8u_P3AC4R_BGRX(
return PRIMITIVES_SUCCESS;
}
static pstatus_t general_RGBToRGB_16s8u_P3AC4R(
const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
static pstatus_t
general_RGBToRGB_16s8u_P3AC4R(const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */
UINT32 DstFormat, const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
switch (DstFormat)
{

View File

@ -150,7 +150,7 @@ static __m128i* ssse3_YUV444Pixel(__m128i* WINPR_RESTRICT dst, __m128i Yraw, __m
return dst;
}
static pstatus_t ssse3_YUV420ToRGB_BGRX(const BYTE* const WINPR_RESTRICT pSrc[],
static pstatus_t ssse3_YUV420ToRGB_BGRX(const BYTE* WINPR_RESTRICT pSrc[],
const UINT32* WINPR_RESTRICT srcStep,
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi)
@ -204,9 +204,8 @@ static pstatus_t ssse3_YUV420ToRGB_BGRX(const BYTE* const WINPR_RESTRICT pSrc[],
return PRIMITIVES_SUCCESS;
}
static pstatus_t ssse3_YUV420ToRGB(const BYTE* const WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
static pstatus_t ssse3_YUV420ToRGB(const BYTE* WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3],
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)
{
switch (DstFormat)
@ -220,7 +219,7 @@ static pstatus_t ssse3_YUV420ToRGB(const BYTE* const WINPR_RESTRICT pSrc[3],
}
}
static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* const WINPR_RESTRICT pSrc[],
static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* WINPR_RESTRICT pSrc[],
const UINT32 srcStep[], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi)
@ -265,7 +264,7 @@ static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* const WINPR_RESTRI
return PRIMITIVES_SUCCESS;
}
static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R(const BYTE* const WINPR_RESTRICT pSrc[],
static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R(const BYTE* WINPR_RESTRICT pSrc[],
const UINT32 srcStep[], BYTE* WINPR_RESTRICT pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi)
@ -1087,9 +1086,9 @@ static pstatus_t ssse3_RGBToAVC444YUVv2(const BYTE* WINPR_RESTRICT pSrc, UINT32
}
}
static pstatus_t ssse3_LumaToYUV444(const BYTE* const WINPR_RESTRICT pSrcRaw[],
const UINT32 srcStep[], BYTE* WINPR_RESTRICT pDstRaw[],
const UINT32 dstStep[], const RECTANGLE_16* WINPR_RESTRICT roi)
static pstatus_t ssse3_LumaToYUV444(const BYTE* WINPR_RESTRICT pSrcRaw[], const UINT32 srcStep[],
BYTE* WINPR_RESTRICT pDstRaw[], const UINT32 dstStep[],
const RECTANGLE_16* WINPR_RESTRICT roi)
{
const UINT32 nWidth = roi->right - roi->left;
const UINT32 nHeight = roi->bottom - roi->top;
@ -1250,7 +1249,7 @@ static pstatus_t ssse3_ChromaFilter(BYTE* WINPR_RESTRICT pDst[], const UINT32 ds
return PRIMITIVES_SUCCESS;
}
static pstatus_t ssse3_ChromaV1ToYUV444(const BYTE* const WINPR_RESTRICT pSrcRaw[3],
static pstatus_t ssse3_ChromaV1ToYUV444(const BYTE* WINPR_RESTRICT pSrcRaw[3],
const UINT32 srcStep[3], BYTE* WINPR_RESTRICT pDstRaw[3],
const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)
@ -1348,10 +1347,9 @@ static pstatus_t ssse3_ChromaV1ToYUV444(const BYTE* const WINPR_RESTRICT pSrcRaw
return ssse3_ChromaFilter(pDst, dstStep, roi);
}
static pstatus_t ssse3_ChromaV2ToYUV444(const BYTE* const WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], UINT32 nTotalWidth,
UINT32 nTotalHeight, BYTE* WINPR_RESTRICT pDst[3],
const UINT32 dstStep[3],
static pstatus_t ssse3_ChromaV2ToYUV444(const BYTE* WINPR_RESTRICT pSrc[3], const UINT32 srcStep[3],
UINT32 nTotalWidth, UINT32 nTotalHeight,
BYTE* WINPR_RESTRICT pDst[3], const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)
{
const UINT32 nWidth = roi->right - roi->left;
@ -1465,7 +1463,7 @@ static pstatus_t ssse3_ChromaV2ToYUV444(const BYTE* const WINPR_RESTRICT pSrc[3]
}
static pstatus_t ssse3_YUV420CombineToYUV444(avc444_frame_type type,
const BYTE* const WINPR_RESTRICT pSrc[3],
const BYTE* WINPR_RESTRICT pSrc[3],
const UINT32 srcStep[3], UINT32 nWidth, UINT32 nHeight,
BYTE* WINPR_RESTRICT pDst[3], const UINT32 dstStep[3],
const RECTANGLE_16* WINPR_RESTRICT roi)

View File

@ -63,7 +63,7 @@ static inline void GNU_INLINE _mm_prefetch_buffer(char* WINPR_RESTRICT buffer, i
/*---------------------------------------------------------------------------*/
static pstatus_t
sse2_yCbCrToRGB_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], int srcStep,
sse2_yCbCrToRGB_16s16s_P3P3(const INT16* WINPR_RESTRICT pSrc[3], int srcStep,
INT16* WINPR_RESTRICT pDst[3], int dstStep,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
@ -203,7 +203,7 @@ sse2_yCbCrToRGB_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], int srcSt
/*---------------------------------------------------------------------------*/
static pstatus_t
sse2_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* const WINPR_RESTRICT pSrc[3], UINT32 srcStep,
sse2_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* WINPR_RESTRICT pSrc[3], UINT32 srcStep,
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
@ -401,7 +401,7 @@ sse2_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* const WINPR_RESTRICT pSrc[3], UIN
/*---------------------------------------------------------------------------*/
static pstatus_t
sse2_yCbCrToRGB_16s8u_P3AC4R_RGBX(const INT16* const WINPR_RESTRICT pSrc[3], UINT32 srcStep,
sse2_yCbCrToRGB_16s8u_P3AC4R_RGBX(const INT16* WINPR_RESTRICT pSrc[3], UINT32 srcStep,
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
@ -598,7 +598,7 @@ sse2_yCbCrToRGB_16s8u_P3AC4R_RGBX(const INT16* const WINPR_RESTRICT pSrc[3], UIN
}
static pstatus_t
sse2_yCbCrToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT pSrc[3], UINT32 srcStep,
sse2_yCbCrToRGB_16s8u_P3AC4R(const INT16* WINPR_RESTRICT pSrc[3], UINT32 srcStep,
BYTE* WINPR_RESTRICT pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
@ -628,7 +628,7 @@ sse2_yCbCrToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT pSrc[3], UINT32 s
* numbers. See the general code above.
*/
static pstatus_t
sse2_RGBToYCbCr_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], int srcStep,
sse2_RGBToYCbCr_16s16s_P3P3(const INT16* WINPR_RESTRICT pSrc[3], int srcStep,
INT16* WINPR_RESTRICT pDst[3], int dstStep,
const prim_size_t* WINPR_RESTRICT roi) /* region of interest */
{
@ -765,7 +765,7 @@ sse2_RGBToYCbCr_16s16s_P3P3(const INT16* const WINPR_RESTRICT pSrc[3], int srcSt
/*---------------------------------------------------------------------------*/
static pstatus_t sse2_RGBToRGB_16s8u_P3AC4R_BGRX(
const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */
@ -876,7 +876,7 @@ static pstatus_t sse2_RGBToRGB_16s8u_P3AC4R_BGRX(
}
static pstatus_t sse2_RGBToRGB_16s8u_P3AC4R_RGBX(
const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */
@ -987,7 +987,7 @@ static pstatus_t sse2_RGBToRGB_16s8u_P3AC4R_RGBX(
}
static pstatus_t sse2_RGBToRGB_16s8u_P3AC4R_XBGR(
const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */
@ -1098,7 +1098,7 @@ static pstatus_t sse2_RGBToRGB_16s8u_P3AC4R_XBGR(
}
static pstatus_t sse2_RGBToRGB_16s8u_P3AC4R_XRGB(
const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */
@ -1209,7 +1209,7 @@ static pstatus_t sse2_RGBToRGB_16s8u_P3AC4R_XRGB(
}
static pstatus_t
sse2_RGBToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
sse2_RGBToRGB_16s8u_P3AC4R(const INT16* WINPR_RESTRICT pSrc[3], /* 16-bit R,G, and B arrays */
UINT32 srcStep, /* bytes between rows in source data */
BYTE* WINPR_RESTRICT pDst, /* 32-bit interleaved ARGB (ABGR?) data */
UINT32 dstStep, /* bytes between rows in dest data */

View File

@ -34,56 +34,54 @@ extern "C"
WINPR_API int WINPR_JSON_version(char* buffer, size_t len);
WINPR_API WINPR_JSON* WINPR_JSON_Parse(const char* const value);
WINPR_API WINPR_JSON* WINPR_JSON_ParseWithLength(const char* const value, size_t buffer_length);
WINPR_API WINPR_JSON* WINPR_JSON_Parse(const char* value);
WINPR_API WINPR_JSON* WINPR_JSON_ParseWithLength(const char* value, size_t buffer_length);
WINPR_API void WINPR_JSON_Delete(WINPR_JSON* item);
WINPR_API size_t WINPR_JSON_GetArraySize(const WINPR_JSON* const array);
WINPR_API WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* const array, size_t index);
WINPR_API size_t WINPR_JSON_GetArraySize(const WINPR_JSON* array);
WINPR_API WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* array, size_t index);
WINPR_API WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* const object,
const char* const string);
WINPR_API WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* const object,
const char* const string);
WINPR_API BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* const object,
const char* const string);
WINPR_API WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* object, const char* string);
WINPR_API WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* object,
const char* string);
WINPR_API BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* object, const char* string);
WINPR_API const char* WINPR_JSON_GetErrorPtr(void);
WINPR_API const char* WINPR_JSON_GetStringValue(WINPR_JSON* item);
WINPR_API double WINPR_JSON_GetNumberValue(const WINPR_JSON* const item);
WINPR_API double WINPR_JSON_GetNumberValue(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsInvalid(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsFalse(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsTrue(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsBool(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsNull(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsNumber(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsString(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsArray(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsObject(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsInvalid(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsFalse(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsTrue(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsBool(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsNull(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsNumber(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsString(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsArray(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsObject(const WINPR_JSON* item);
WINPR_API WINPR_JSON* WINPR_JSON_CreateNull(void);
WINPR_API WINPR_JSON* WINPR_JSON_CreateTrue(void);
WINPR_API WINPR_JSON* WINPR_JSON_CreateFalse(void);
WINPR_API WINPR_JSON* WINPR_JSON_CreateBool(BOOL boolean);
WINPR_API WINPR_JSON* WINPR_JSON_CreateNumber(double num);
WINPR_API WINPR_JSON* WINPR_JSON_CreateString(const char* const string);
WINPR_API WINPR_JSON* WINPR_JSON_CreateString(const char* string);
WINPR_API WINPR_JSON* WINPR_JSON_CreateArray(void);
WINPR_API WINPR_JSON* WINPR_JSON_CreateObject(void);
WINPR_API WINPR_JSON* WINPR_JSON_AddNullToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddTrueToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddFalseToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddBoolToObject(WINPR_JSON* object, const char* const name,
WINPR_API WINPR_JSON* WINPR_JSON_AddNullToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddTrueToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddFalseToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddBoolToObject(WINPR_JSON* object, const char* name,
BOOL boolean);
WINPR_API WINPR_JSON* WINPR_JSON_AddNumberToObject(WINPR_JSON* object, const char* const name,
WINPR_API WINPR_JSON* WINPR_JSON_AddNumberToObject(WINPR_JSON* object, const char* name,
double number);
WINPR_API WINPR_JSON* WINPR_JSON_AddStringToObject(WINPR_JSON* object, const char* const name,
const char* const string);
WINPR_API WINPR_JSON* WINPR_JSON_AddObjectToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddArrayToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddStringToObject(WINPR_JSON* object, const char* name,
const char* string);
WINPR_API WINPR_JSON* WINPR_JSON_AddObjectToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddArrayToObject(WINPR_JSON* object, const char* name);
WINPR_API BOOL WINPR_JSON_AddItemToArray(WINPR_JSON* array, WINPR_JSON* item);

View File

@ -30,9 +30,9 @@ extern "C"
#endif
WINPR_API void string_list_free(char** string_list);
WINPR_API int string_list_length(const char* const* string_list);
WINPR_API char** string_list_copy(const char* const* string_list);
WINPR_API void string_list_print(FILE* out, const char* const* string_list);
WINPR_API int string_list_length(const char** string_list);
WINPR_API char** string_list_copy(const char** string_list);
WINPR_API void string_list_print(FILE* out, const char** string_list);
#ifdef __cplusplus
}

View File

@ -106,7 +106,7 @@ const char* _comm_serial_ioctl_name(ULONG number)
{
for (size_t x = 0; x < ARRAYSIZE(S_SERIAL_IOCTL_NAMES); x++)
{
const _SERIAL_IOCTL_NAME* const cur = &S_SERIAL_IOCTL_NAMES[x];
const _SERIAL_IOCTL_NAME* cur = &S_SERIAL_IOCTL_NAMES[x];
if (cur->number == number)
return cur->name;
}

View File

@ -953,7 +953,7 @@ static BOOL WINPR_init(void)
for (size_t x = 0; x < ARRAYSIZE(SecurityFunctionTableA_NAME_LIST); x++)
{
const SecurityFunctionTableA_NAME* const cur = &SecurityFunctionTableA_NAME_LIST[x];
const SecurityFunctionTableA_NAME* cur = &SecurityFunctionTableA_NAME_LIST[x];
InitializeConstWCharFromUtf8(cur->Name, BUFFER_NAME_LIST_W[x],
ARRAYSIZE(BUFFER_NAME_LIST_W[x]));
}

View File

@ -52,7 +52,7 @@ static struct json_object* json_object_new_null(void)
#endif
#if defined(USE_CJSON_COMPAT)
static double cJSON_GetNumberValue(const cJSON* const prop)
static double cJSON_GetNumberValue(const cJSON* prop)
{
#ifndef NAN
#ifdef _WIN32
@ -110,7 +110,7 @@ int WINPR_JSON_version(char* buffer, size_t len)
#endif
}
WINPR_JSON* WINPR_JSON_Parse(const char* const value)
WINPR_JSON* WINPR_JSON_Parse(const char* value)
{
#if defined(WITH_JSONC)
return json_tokener_parse(value);
@ -122,7 +122,7 @@ WINPR_JSON* WINPR_JSON_Parse(const char* const value)
#endif
}
WINPR_JSON* WINPR_JSON_ParseWithLength(const char* const value, size_t buffer_length)
WINPR_JSON* WINPR_JSON_ParseWithLength(const char* value, size_t buffer_length)
{
#if defined(WITH_JSONC)
WINPR_ASSERT(buffer_length <= INT_MAX);
@ -152,7 +152,7 @@ void WINPR_JSON_Delete(WINPR_JSON* item)
#endif
}
WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* const array, size_t index)
WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* array, size_t index)
{
#if defined(WITH_JSONC)
return json_object_array_get_idx((const json_object*)array, index);
@ -166,7 +166,7 @@ WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* const array, size_t index)
#endif
}
size_t WINPR_JSON_GetArraySize(const WINPR_JSON* const array)
size_t WINPR_JSON_GetArraySize(const WINPR_JSON* array)
{
#if defined(WITH_JSONC)
return json_object_array_length((const json_object*)array);
@ -181,7 +181,7 @@ size_t WINPR_JSON_GetArraySize(const WINPR_JSON* const array)
#endif
}
WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* const object, const char* const string)
WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* object, const char* string)
{
#if defined(WITH_JSONC)
return json_object_object_get((const json_object*)object, string);
@ -194,8 +194,7 @@ WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* const object, const char*
#endif
}
WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* const object,
const char* const string)
WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* object, const char* string)
{
#if defined(WITH_JSONC)
return json_object_object_get((const json_object*)object, string);
@ -208,7 +207,7 @@ WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* const object
#endif
}
BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* const object, const char* const string)
BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* object, const char* string)
{
#if defined(WITH_JSONC)
return json_object_object_get_ex((const json_object*)object, string, NULL);
@ -244,7 +243,7 @@ const char* WINPR_JSON_GetStringValue(WINPR_JSON* item)
#endif
}
double WINPR_JSON_GetNumberValue(const WINPR_JSON* const item)
double WINPR_JSON_GetNumberValue(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
return json_object_get_double((const json_object*)item);
@ -256,7 +255,7 @@ double WINPR_JSON_GetNumberValue(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsInvalid(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsInvalid(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
if (WINPR_JSON_IsArray(item))
@ -280,7 +279,7 @@ BOOL WINPR_JSON_IsInvalid(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsFalse(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsFalse(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
if (!json_object_is_type((const json_object*)item, json_type_boolean))
@ -295,7 +294,7 @@ BOOL WINPR_JSON_IsFalse(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsTrue(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsTrue(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
if (!json_object_is_type((const json_object*)item, json_type_boolean))
@ -310,7 +309,7 @@ BOOL WINPR_JSON_IsTrue(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsBool(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsBool(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
return json_object_is_type((const json_object*)item, json_type_boolean);
@ -322,7 +321,7 @@ BOOL WINPR_JSON_IsBool(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsNull(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsNull(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
return json_object_is_type((const json_object*)item, json_type_null);
@ -334,7 +333,7 @@ BOOL WINPR_JSON_IsNull(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsNumber(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsNumber(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
return json_object_is_type((const json_object*)item, json_type_int) ||
@ -347,7 +346,7 @@ BOOL WINPR_JSON_IsNumber(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsString(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsString(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
return json_object_is_type((const json_object*)item, json_type_string);
@ -359,7 +358,7 @@ BOOL WINPR_JSON_IsString(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsArray(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsArray(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
return json_object_is_type((const json_object*)item, json_type_array);
@ -371,7 +370,7 @@ BOOL WINPR_JSON_IsArray(const WINPR_JSON* const item)
#endif
}
BOOL WINPR_JSON_IsObject(const WINPR_JSON* const item)
BOOL WINPR_JSON_IsObject(const WINPR_JSON* item)
{
#if defined(WITH_JSONC)
return json_object_is_type((const json_object*)item, json_type_object);
@ -440,7 +439,7 @@ WINPR_JSON* WINPR_JSON_CreateNumber(double num)
#endif
}
WINPR_JSON* WINPR_JSON_CreateString(const char* const string)
WINPR_JSON* WINPR_JSON_CreateString(const char* string)
{
#if defined(WITH_JSONC)
return json_object_new_string(string);
@ -474,7 +473,7 @@ WINPR_JSON* WINPR_JSON_CreateObject(void)
#endif
}
WINPR_JSON* WINPR_JSON_AddNullToObject(WINPR_JSON* const object, const char* const name)
WINPR_JSON* WINPR_JSON_AddNullToObject(WINPR_JSON* object, const char* name)
{
#if defined(WITH_JSONC)
struct json_object* obj = json_object_new_null();
@ -493,7 +492,7 @@ WINPR_JSON* WINPR_JSON_AddNullToObject(WINPR_JSON* const object, const char* con
#endif
}
WINPR_JSON* WINPR_JSON_AddTrueToObject(WINPR_JSON* const object, const char* const name)
WINPR_JSON* WINPR_JSON_AddTrueToObject(WINPR_JSON* object, const char* name)
{
#if defined(WITH_JSONC)
struct json_object* obj = json_object_new_boolean(TRUE);
@ -512,7 +511,7 @@ WINPR_JSON* WINPR_JSON_AddTrueToObject(WINPR_JSON* const object, const char* con
#endif
}
WINPR_JSON* WINPR_JSON_AddFalseToObject(WINPR_JSON* const object, const char* const name)
WINPR_JSON* WINPR_JSON_AddFalseToObject(WINPR_JSON* object, const char* name)
{
#if defined(WITH_JSONC)
struct json_object* obj = json_object_new_boolean(FALSE);
@ -531,8 +530,7 @@ WINPR_JSON* WINPR_JSON_AddFalseToObject(WINPR_JSON* const object, const char* co
#endif
}
WINPR_JSON* WINPR_JSON_AddBoolToObject(WINPR_JSON* const object, const char* const name,
BOOL boolean)
WINPR_JSON* WINPR_JSON_AddBoolToObject(WINPR_JSON* object, const char* name, BOOL boolean)
{
#if defined(WITH_JSONC)
struct json_object* obj = json_object_new_boolean(boolean);
@ -552,8 +550,7 @@ WINPR_JSON* WINPR_JSON_AddBoolToObject(WINPR_JSON* const object, const char* con
#endif
}
WINPR_JSON* WINPR_JSON_AddNumberToObject(WINPR_JSON* const object, const char* const name,
double number)
WINPR_JSON* WINPR_JSON_AddNumberToObject(WINPR_JSON* object, const char* name, double number)
{
#if defined(WITH_JSONC)
struct json_object* obj = json_object_new_double(number);
@ -573,8 +570,7 @@ WINPR_JSON* WINPR_JSON_AddNumberToObject(WINPR_JSON* const object, const char* c
#endif
}
WINPR_JSON* WINPR_JSON_AddStringToObject(WINPR_JSON* const object, const char* const name,
const char* const string)
WINPR_JSON* WINPR_JSON_AddStringToObject(WINPR_JSON* object, const char* name, const char* string)
{
#if defined(WITH_JSONC)
struct json_object* obj = json_object_new_string(string);
@ -594,7 +590,7 @@ WINPR_JSON* WINPR_JSON_AddStringToObject(WINPR_JSON* const object, const char* c
#endif
}
WINPR_JSON* WINPR_JSON_AddObjectToObject(WINPR_JSON* const object, const char* const name)
WINPR_JSON* WINPR_JSON_AddObjectToObject(WINPR_JSON* object, const char* name)
{
#if defined(WITH_JSONC)
struct json_object* obj = json_object_new_object();
@ -629,7 +625,7 @@ BOOL WINPR_JSON_AddItemToArray(WINPR_JSON* array, WINPR_JSON* item)
#endif
}
WINPR_JSON* WINPR_JSON_AddArrayToObject(WINPR_JSON* const object, const char* const name)
WINPR_JSON* WINPR_JSON_AddArrayToObject(WINPR_JSON* object, const char* name)
{
#if defined(WITH_JSONC)
struct json_object* obj = json_object_new_array();

View File

@ -35,7 +35,7 @@ void string_list_free(char** string_list)
free(string_list);
}
int string_list_length(const char* const* string_list)
int string_list_length(const char** string_list)
{
int i = 0;
for (; string_list[i]; i++)
@ -44,7 +44,7 @@ int string_list_length(const char* const* string_list)
return i;
}
char** string_list_copy(const char* const* string_list)
char** string_list_copy(const char** string_list)
{
int length = string_list_length(string_list);
char** copy = calloc(length + 1, sizeof(char*));
@ -63,7 +63,7 @@ char** string_list_copy(const char* const* string_list)
return copy;
}
void string_list_print(FILE* out, const char* const* string_list)
void string_list_print(FILE* out, const char** string_list)
{
for (int j = 0; string_list[j]; j++)
{