mirror of https://github.com/FreeRDP/FreeRDP
[keyword,restrict] do not use for shift operations
shifting operations are done on a in/out buffer, so the restrict keyword is not appropriate for that.
This commit is contained in:
parent
b72b4fecff
commit
fe28f9ed9c
|
@ -103,18 +103,12 @@ typedef pstatus_t (*__alphaComp_argb_t)(const BYTE* WINPR_RESTRICT pSrc1, UINT32
|
|||
typedef pstatus_t (*__add_16s_t)(const INT16* WINPR_RESTRICT pSrc1,
|
||||
const INT16* WINPR_RESTRICT pSrc2, INT16* WINPR_RESTRICT pDst,
|
||||
UINT32 len);
|
||||
typedef pstatus_t (*__lShiftC_16s_t)(const INT16* WINPR_RESTRICT pSrc, UINT32 val,
|
||||
INT16* WINPR_RESTRICT pSrcDst, UINT32 len);
|
||||
typedef pstatus_t (*__lShiftC_16u_t)(const UINT16* WINPR_RESTRICT pSrc, UINT32 val,
|
||||
UINT16* WINPR_RESTRICT pSrcDst, UINT32 len);
|
||||
typedef pstatus_t (*__rShiftC_16s_t)(const INT16* WINPR_RESTRICT pSrc, UINT32 val,
|
||||
INT16* WINPR_RESTRICT pSrcDst, UINT32 len);
|
||||
typedef pstatus_t (*__rShiftC_16u_t)(const UINT16* WINPR_RESTRICT pSrc, UINT32 val,
|
||||
UINT16* WINPR_RESTRICT pSrcDst, UINT32 len);
|
||||
typedef pstatus_t (*__shiftC_16s_t)(const INT16* WINPR_RESTRICT pSrc, INT32 val,
|
||||
INT16* WINPR_RESTRICT pSrcDst, UINT32 len);
|
||||
typedef pstatus_t (*__shiftC_16u_t)(const UINT16* WINPR_RESTRICT pSrc, INT32 val,
|
||||
UINT16* WINPR_RESTRICT pSrcDst, 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);
|
||||
typedef pstatus_t (*__rShiftC_16s_t)(const INT16* pSrc, UINT32 val, INT16* pSrcDst, UINT32 len);
|
||||
typedef pstatus_t (*__rShiftC_16u_t)(const UINT16* pSrc, UINT32 val, UINT16* pSrcDst, UINT32 len);
|
||||
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* WINPR_RESTRICT pSrc, INT16* WINPR_RESTRICT pDst,
|
||||
UINT32 len);
|
||||
typedef pstatus_t (*__yCbCrToRGB_16s8u_P3AC4R_t)(const INT16* const WINPR_RESTRICT pSrc[3],
|
||||
|
|
|
@ -858,10 +858,7 @@ static INLINE void progressive_rfx_decode_block(const primitives_t* prims, INT16
|
|||
if (!shift)
|
||||
return;
|
||||
|
||||
WINPR_ASSERT(length <= 1024);
|
||||
INT16 dst[1024] = { 0 };
|
||||
prims->lShiftC_16s(buffer, shift, dst, length);
|
||||
memcpy(buffer, dst, length * sizeof(INT16));
|
||||
prims->lShiftC_16s(buffer, shift, buffer, length);
|
||||
}
|
||||
|
||||
static INLINE int progressive_rfx_decode_component(PROGRESSIVE_CONTEXT* progressive,
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
/* rfx_decode_YCbCr_to_RGB_NEON code now resides in the primitives library. */
|
||||
|
||||
static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
||||
rfx_quantization_decode_block_NEON(INT16* WINPR_RESTRICT buffer, const int buffer_size,
|
||||
const UINT32 factor)
|
||||
rfx_quantization_decode_block_NEON(INT16* buffer, const size_t buffer_size, const UINT32 factor)
|
||||
{
|
||||
int16x8_t quantFactors = vdupq_n_s16(factor);
|
||||
int16x8_t* buf = (int16x8_t*)buffer;
|
||||
|
@ -49,8 +48,7 @@ rfx_quantization_decode_block_NEON(INT16* WINPR_RESTRICT buffer, const int buffe
|
|||
} while (buf < buf_end);
|
||||
}
|
||||
|
||||
static void rfx_quantization_decode_NEON(INT16* WINPR_RESTRICT buffer,
|
||||
const UINT32* WINPR_RESTRICT quantVals)
|
||||
static void rfx_quantization_decode_NEON(INT16* buffer, const UINT32* WINPR_RESTRICT quantVals)
|
||||
{
|
||||
WINPR_ASSERT(buffer);
|
||||
WINPR_ASSERT(quantVals);
|
||||
|
|
|
@ -41,9 +41,8 @@
|
|||
* LL3 4032 8x8 64
|
||||
*/
|
||||
|
||||
static void rfx_quantization_decode_block(const primitives_t* WINPR_RESTRICT prims,
|
||||
INT16* WINPR_RESTRICT buffer, UINT32 buffer_size,
|
||||
UINT32 factor)
|
||||
static void rfx_quantization_decode_block(const primitives_t* WINPR_RESTRICT prims, INT16* buffer,
|
||||
UINT32 buffer_size, UINT32 factor)
|
||||
{
|
||||
if (factor == 0)
|
||||
return;
|
||||
|
@ -51,7 +50,7 @@ static void rfx_quantization_decode_block(const primitives_t* WINPR_RESTRICT pri
|
|||
prims->lShiftC_16s(buffer, factor, buffer, buffer_size);
|
||||
}
|
||||
|
||||
void rfx_quantization_decode(INT16* WINPR_RESTRICT buffer, const UINT32* WINPR_RESTRICT quantVals)
|
||||
void rfx_quantization_decode(INT16* buffer, const UINT32* WINPR_RESTRICT quantVals)
|
||||
{
|
||||
const primitives_t* prims = primitives_get();
|
||||
WINPR_ASSERT(buffer);
|
||||
|
@ -69,8 +68,7 @@ void rfx_quantization_decode(INT16* WINPR_RESTRICT buffer, const UINT32* WINPR_R
|
|||
rfx_quantization_decode_block(prims, &buffer[4032], 64, quantVals[0] - 1); /* LL3 */
|
||||
}
|
||||
|
||||
static void rfx_quantization_encode_block(INT16* WINPR_RESTRICT buffer, size_t buffer_size,
|
||||
UINT32 factor)
|
||||
static void rfx_quantization_encode_block(INT16* buffer, size_t buffer_size, UINT32 factor)
|
||||
{
|
||||
INT16* dst;
|
||||
INT16 half;
|
||||
|
@ -86,8 +84,7 @@ static void rfx_quantization_encode_block(INT16* WINPR_RESTRICT buffer, size_t b
|
|||
}
|
||||
}
|
||||
|
||||
void rfx_quantization_encode(INT16* WINPR_RESTRICT buffer,
|
||||
const UINT32* WINPR_RESTRICT quantization_values)
|
||||
void rfx_quantization_encode(INT16* buffer, const UINT32* WINPR_RESTRICT quantization_values)
|
||||
{
|
||||
WINPR_ASSERT(buffer);
|
||||
WINPR_ASSERT(quantization_values);
|
||||
|
|
|
@ -64,7 +64,7 @@ static __inline void __attribute__((ATTRIBUTES)) _mm_prefetch_buffer(char* buffe
|
|||
/* rfx_encode_rgb_to_ycbcr_sse2 code now resides in the primitives library. */
|
||||
|
||||
static __inline void __attribute__((ATTRIBUTES))
|
||||
rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const UINT32 factor)
|
||||
rfx_quantization_decode_block_sse2(INT16* buffer, const size_t buffer_size, const UINT32 factor)
|
||||
{
|
||||
__m128i a;
|
||||
__m128i* ptr = (__m128i*)buffer;
|
||||
|
@ -82,8 +82,7 @@ rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const U
|
|||
} while (ptr < buf_end);
|
||||
}
|
||||
|
||||
static void rfx_quantization_decode_sse2(INT16* WINPR_RESTRICT buffer,
|
||||
const UINT32* WINPR_RESTRICT quantVals)
|
||||
static void rfx_quantization_decode_sse2(INT16* buffer, const UINT32* WINPR_RESTRICT quantVals)
|
||||
{
|
||||
WINPR_ASSERT(buffer);
|
||||
WINPR_ASSERT(quantVals);
|
||||
|
@ -124,7 +123,7 @@ rfx_quantization_encode_block_sse2(INT16* buffer, const int buffer_size, const U
|
|||
} while (ptr < buf_end);
|
||||
}
|
||||
|
||||
static void rfx_quantization_encode_sse2(INT16* WINPR_RESTRICT buffer,
|
||||
static void rfx_quantization_encode_sse2(INT16* buffer,
|
||||
const UINT32* WINPR_RESTRICT quantization_values)
|
||||
{
|
||||
WINPR_ASSERT(buffer);
|
||||
|
|
Loading…
Reference in New Issue