freerdp: get rid of old types

This commit is contained in:
Marc-André Moreau
2012-10-09 03:26:39 -04:00
parent 1bf8a45519
commit 9d064171a7
265 changed files with 3634 additions and 3668 deletions

View File

@@ -58,7 +58,7 @@
#define BLACK_PIXEL 0x000000
#define WHITE_PIXEL 0xFFFFFF
typedef uint32 PIXEL;
typedef UINT32 PIXEL;
static const BYTE g_MaskBit0 = 0x01; /* Least significant bit */
static const BYTE g_MaskBit1 = 0x02;
@@ -79,7 +79,7 @@ static const BYTE g_MaskLiteRunLength = 0x0F;
* Reads the supplied order header and extracts the compression
* order code ID.
*/
static uint32 ExtractCodeId(BYTE bOrderHdr)
static UINT32 ExtractCodeId(BYTE bOrderHdr)
{
int code;
@@ -115,10 +115,10 @@ static uint32 ExtractCodeId(BYTE bOrderHdr)
/**
* Extract the run length of a compression order.
*/
static uint32 ExtractRunLength(uint32 code, BYTE* pbOrderHdr, uint32* advance)
static UINT32 ExtractRunLength(UINT32 code, BYTE* pbOrderHdr, UINT32* advance)
{
uint32 runLength;
uint32 ladvance;
UINT32 runLength;
UINT32 ladvance;
ladvance = 1;
runLength = 0;

View File

@@ -35,7 +35,7 @@ int freerdp_get_pixel(BYTE * data, int x, int y, int width, int height, int bpp)
int start;
int shift;
UINT16 *src16;
uint32 *src32;
UINT32 *src32;
int red, green, blue;
switch (bpp)
@@ -59,7 +59,7 @@ int freerdp_get_pixel(BYTE * data, int x, int y, int width, int height, int bpp)
blue = data[2];
return RGB24(red, green, blue);
case 32:
src32 = (uint32*) data;
src32 = (UINT32*) data;
return src32[y * width + x];
default:
break;
@@ -91,7 +91,7 @@ void freerdp_set_pixel(BYTE* data, int x, int y, int width, int height, int bpp,
}
}
static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
static INLINE void freerdp_color_split_rgb(UINT32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
{
*red = *green = *blue = 0;
*alpha = (clrconv->alpha) ? 0xFF : 0x00;
@@ -142,7 +142,7 @@ static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, BYTE* red, BY
}
}
static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
static INLINE void freerdp_color_split_bgr(UINT32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
{
*red = *green = *blue = 0;
*alpha = (clrconv->alpha) ? 0xFF : 0x00;
@@ -193,7 +193,7 @@ static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, BYTE* red, BY
}
}
static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
static INLINE void freerdp_color_make_rgb(UINT32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
{
switch (bpp)
{
@@ -234,7 +234,7 @@ static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, BYTE* red, BYT
}
}
static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
static INLINE void freerdp_color_make_bgr(UINT32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
{
switch (bpp)
{
@@ -275,13 +275,13 @@ static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, BYTE* red, BYT
}
}
uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
UINT32 freerdp_color_convert_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
{
BYTE red = 0;
BYTE green = 0;
BYTE blue = 0;
BYTE alpha = 0xFF;
uint32 dstColor = 0;
UINT32 dstColor = 0;
freerdp_color_split_rgb(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv);
freerdp_color_make_rgb(&dstColor, dstBpp, &red, &green, &blue, &alpha, clrconv);
@@ -289,13 +289,13 @@ uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO
return dstColor;
}
uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
UINT32 freerdp_color_convert_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
{
BYTE red = 0;
BYTE green = 0;
BYTE blue = 0;
BYTE alpha = 0xFF;
uint32 dstColor = 0;
UINT32 dstColor = 0;
freerdp_color_split_bgr(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv);
freerdp_color_make_bgr(&dstColor, dstBpp, &red, &green, &blue, &alpha, clrconv);
@@ -303,13 +303,13 @@ uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO
return dstColor;
}
uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
UINT32 freerdp_color_convert_rgb_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
{
BYTE red = 0;
BYTE green = 0;
BYTE blue = 0;
BYTE alpha = 0xFF;
uint32 dstColor = 0;
UINT32 dstColor = 0;
freerdp_color_split_rgb(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv);
freerdp_color_make_bgr(&dstColor, dstBpp, &red, &green, &blue, &alpha, clrconv);
@@ -317,13 +317,13 @@ uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HC
return dstColor;
}
uint32 freerdp_color_convert_bgr_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
UINT32 freerdp_color_convert_bgr_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
{
BYTE red = 0;
BYTE green = 0;
BYTE blue = 0;
BYTE alpha = 0xFF;
uint32 dstColor = 0;
UINT32 dstColor = 0;
freerdp_color_split_bgr(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv);
freerdp_color_make_rgb(&dstColor, dstBpp, &red, &green, &blue, &alpha, clrconv);
@@ -331,7 +331,7 @@ uint32 freerdp_color_convert_bgr_rgb(uint32 srcColor, int srcBpp, int dstBpp, HC
return dstColor;
}
uint32 freerdp_color_convert_var(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
UINT32 freerdp_color_convert_var(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
{
if (clrconv->invert)
return freerdp_color_convert_var_bgr(srcColor, srcBpp, dstBpp, clrconv);
@@ -339,7 +339,7 @@ uint32 freerdp_color_convert_var(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO
return freerdp_color_convert_var_rgb(srcColor, srcBpp, dstBpp, clrconv);
}
uint32 freerdp_color_convert_var_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
UINT32 freerdp_color_convert_var_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
{
if (srcBpp > 16)
return freerdp_color_convert_bgr_rgb(srcColor, srcBpp, dstBpp, clrconv);
@@ -347,7 +347,7 @@ uint32 freerdp_color_convert_var_rgb(uint32 srcColor, int srcBpp, int dstBpp, HC
return freerdp_color_convert_rgb(srcColor, srcBpp, dstBpp, clrconv);
}
uint32 freerdp_color_convert_var_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
UINT32 freerdp_color_convert_var_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
{
if (srcBpp > 16)
return freerdp_color_convert_bgr(srcColor, srcBpp, dstBpp, clrconv);
@@ -361,10 +361,10 @@ BYTE* freerdp_image_convert_8bpp(BYTE* srcData, BYTE* dstData, int width, int he
BYTE red;
BYTE green;
BYTE blue;
uint32 pixel;
UINT32 pixel;
BYTE *src8;
UINT16 *dst16;
uint32 *dst32;
UINT32 *dst32;
if (dstBpp == 8)
{
@@ -418,7 +418,7 @@ BYTE* freerdp_image_convert_8bpp(BYTE* srcData, BYTE* dstData, int width, int he
dstData = (BYTE*) malloc(width * height * 4);
src8 = (BYTE*) srcData;
dst32 = (uint32*) dstData;
dst32 = (UINT32*) dstData;
for (i = width * height; i > 0; i--)
{
pixel = *src8;
@@ -442,10 +442,10 @@ BYTE* freerdp_image_convert_15bpp(BYTE* srcData, BYTE* dstData, int width, int h
BYTE red;
BYTE green;
BYTE blue;
uint32 pixel;
UINT32 pixel;
UINT16 *src16;
UINT16 *dst16;
uint32 *dst32;
UINT32 *dst32;
if (dstBpp == 15 || (dstBpp == 16 && clrconv->rgb555))
{
@@ -462,7 +462,7 @@ BYTE* freerdp_image_convert_15bpp(BYTE* srcData, BYTE* dstData, int width, int h
dstData = (BYTE*) malloc(width * height * 4);
src16 = (UINT16 *) srcData;
dst32 = (uint32 *) dstData;
dst32 = (UINT32 *) dstData;
for (i = width * height; i > 0; i--)
{
pixel = *src16;
@@ -566,16 +566,16 @@ BYTE* freerdp_image_convert_16bpp(BYTE* srcData, BYTE* dstData, int width, int h
else if (dstBpp == 32)
{
int i;
uint32 pixel;
UINT32 pixel;
UINT16* src16;
uint32* dst32;
UINT32* dst32;
BYTE red, green, blue;
if (dstData == NULL)
dstData = (BYTE*) malloc(width * height * 4);
src16 = (UINT16*) srcData;
dst32 = (uint32*) dstData;
dst32 = (UINT32*) dstData;
for (i = width * height; i > 0; i--)
{
@@ -622,14 +622,14 @@ BYTE* freerdp_image_convert_32bpp(BYTE* srcData, BYTE* dstData, int width, int h
{
int index;
UINT16 *dst16;
uint32 *src32;
UINT32 *src32;
BYTE red, green, blue;
if (dstData == NULL)
dstData = (BYTE*) malloc(width * height * 2);
dst16 = (UINT16*) dstData;
src32 = (uint32*) srcData;
src32 = (UINT32*) srcData;
for (index = 0; index < width * height; index++)
{
@@ -798,7 +798,7 @@ BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width,
{
BYTE* data;
BYTE bmask;
uint32* icon;
UINT32* icon;
int x, y, bit;
int maskIndex;
@@ -816,7 +816,7 @@ BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width,
if (bpp < 32)
{
maskIndex = 0;
icon = (uint32*) dstData;
icon = (UINT32*) dstData;
for (y = 0; y < height; y++)
{
@@ -884,11 +884,11 @@ BYTE* freerdp_glyph_convert(int width, int height, BYTE* data)
return dstData;
}
BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv)
BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, UINT32 bgcolor, UINT32 fgcolor, HCLRCONV clrconv)
{
int index;
UINT16* dst16;
uint32* dst32;
UINT32* dst32;
BYTE* dstData;
BYTE bitMask;
int bitIndex;
@@ -972,7 +972,7 @@ BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBp
else if (dstBpp == 32)
{
dstData = (BYTE*) malloc(width * height * 4);
dst32 = (uint32*) dstData;
dst32 = (UINT32*) dstData;
for (index = height; index > 0; index--)
{
@@ -1037,10 +1037,10 @@ void freerdp_alpha_cursor_convert(BYTE* alphaData, BYTE* xorMask, BYTE* andMask,
void freerdp_image_swap_color_order(BYTE* data, int width, int height)
{
int x, y;
uint32* pixel;
UINT32* pixel;
BYTE a, r, g, b;
pixel = (uint32*) data;
pixel = (UINT32*) data;
for (y = 0; y < height; y++)
{
@@ -1053,7 +1053,7 @@ void freerdp_image_swap_color_order(BYTE* data, int width, int height)
}
}
HCLRCONV freerdp_clrconv_new(uint32 flags)
HCLRCONV freerdp_clrconv_new(UINT32 flags)
{
HCLRCONV clrconv = xnew(CLRCONV);

View File

@@ -22,8 +22,8 @@
/**
* Write a foreground/background image to a destination buffer.
*/
static BYTE* WRITEFGBGIMAGE(BYTE* pbDest, uint32 rowDelta,
BYTE bitmask, PIXEL fgPel, uint32 cBits)
static BYTE* WRITEFGBGIMAGE(BYTE* pbDest, UINT32 rowDelta,
BYTE bitmask, PIXEL fgPel, UINT32 cBits)
{
PIXEL xorPixel;
@@ -143,7 +143,7 @@ static BYTE* WRITEFGBGIMAGE(BYTE* pbDest, uint32 rowDelta,
* for the first line of compressed data.
*/
static BYTE* WRITEFIRSTLINEFGBGIMAGE(BYTE* pbDest, BYTE bitmask,
PIXEL fgPel, uint32 cBits)
PIXEL fgPel, UINT32 cBits)
{
if (bitmask & g_MaskBit0)
{
@@ -251,8 +251,8 @@ static BYTE* WRITEFIRSTLINEFGBGIMAGE(BYTE* pbDest, BYTE bitmask,
/**
* Decompress an RLE compressed bitmap.
*/
void RLEDECOMPRESS(BYTE* pbSrcBuffer, uint32 cbSrcBuffer, BYTE* pbDestBuffer,
uint32 rowDelta, uint32 width, uint32 height)
void RLEDECOMPRESS(BYTE* pbSrcBuffer, UINT32 cbSrcBuffer, BYTE* pbDestBuffer,
UINT32 rowDelta, UINT32 width, UINT32 height)
{
BYTE* pbSrc = pbSrcBuffer;
BYTE* pbEnd = pbSrcBuffer + cbSrcBuffer;
@@ -266,10 +266,10 @@ void RLEDECOMPRESS(BYTE* pbSrcBuffer, uint32 cbSrcBuffer, BYTE* pbDestBuffer,
BYTE bitmask;
PIXEL pixelA, pixelB;
uint32 runLength;
uint32 code;
UINT32 runLength;
UINT32 code;
uint32 advance;
UINT32 advance;
RLEEXTRA
@@ -278,7 +278,7 @@ void RLEDECOMPRESS(BYTE* pbSrcBuffer, uint32 cbSrcBuffer, BYTE* pbDestBuffer,
/* Watch out for the end of the first scanline. */
if (fFirstLine)
{
if ((uint32)(pbDest - pbDestBuffer) >= rowDelta)
if ((UINT32)(pbDest - pbDestBuffer) >= rowDelta)
{
fFirstLine = FALSE;
fInsertFgPel = FALSE;

View File

@@ -49,7 +49,7 @@ static BYTE LOMHTab[] = {0, 4, 10, 19};
static BYTE CopyOffsetBitsLUT[] = {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15 };
static uint32 CopyOffsetBaseLUT[] = {
static UINT32 CopyOffsetBaseLUT[] = {
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153, 65537 };
static BYTE LOMBitsLUT[] = {
@@ -104,7 +104,7 @@ UINT16 getLOMindex(UINT16 huff)
return HuffIndexLOM[LOMHTab[miniLOMhash(huff)]];
}
uint32 transposebits(uint32 x)
UINT32 transposebits(UINT32 x)
{
x = ((x & 0x55555555) << 1) | ((x >> 1) & 0x55555555);
x = ((x & 0x33333333) << 2) | ((x >> 2) & 0x33333333);
@@ -119,16 +119,16 @@ uint32 transposebits(uint32 x)
}
#define cache_add(_s, _x) do { \
*((uint32*)((_s)+2)) <<= 16; \
*((uint32*)((_s)+2)) |= (*((uint32*)(_s)) >> 16); \
*((uint32*)(_s)) = (*((uint32*)(_s)) << 16) | (_x); } while(0)
*((UINT32*)((_s)+2)) <<= 16; \
*((UINT32*)((_s)+2)) |= (*((UINT32*)(_s)) >> 16); \
*((UINT32*)(_s)) = (*((UINT32*)(_s)) << 16) | (_x); } while(0)
#define cache_swap(_s, _i) do { \
UINT16 t = *(_s); \
*(_s) = *((_s) + (_i)); \
*((_s) + (_i)) = t; } while(0)
int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen)
{
int type = ctype & 0x0f;
@@ -169,11 +169,11 @@ int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uin
* @return True on success, False on failure
*/
int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen)
{
BYTE* history_buf; /* uncompressed data goes here */
BYTE* history_ptr; /* points to next free slot in history_buf */
uint32 d32; /* we process 4 compressed bytes at a time */
UINT32 d32; /* we process 4 compressed bytes at a time */
UINT16 copy_offset; /* location to copy data from */
UINT16 lom; /* length of match */
BYTE* src_ptr; /* used while copying compressed data */
@@ -182,7 +182,7 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u
int bits_left; /* bits left in d34 for processing */
int cur_bits_left; /* bits left in cur_byte for processing */
int tmp;
uint32 i32;
UINT32 i32;
printf("decompress_rdp_4:\n");
@@ -599,11 +599,11 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u
* @return True on success, False on failure
*/
int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen)
{
BYTE* history_buf; /* uncompressed data goes here */
BYTE* history_ptr; /* points to next free slot in bistory_buf */
uint32 d32; /* we process 4 compressed bytes at a time */
UINT32 d32; /* we process 4 compressed bytes at a time */
UINT16 copy_offset; /* location to copy data from */
UINT16 lom; /* length of match */
BYTE* src_ptr; /* used while copying compressed data */
@@ -612,7 +612,7 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u
int bits_left; /* bits left in d32 for processing */
int cur_bits_left; /* bits left in cur_byte for processing */
int tmp;
uint32 i32;
UINT32 i32;
if ((dec == NULL) || (dec->history_buf == NULL))
{
@@ -1063,12 +1063,12 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u
* @return True on success, False on failure
*/
int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen)
{
BYTE* history_buf; /* uncompressed data goes here */
UINT16* offset_cache; /* Copy Offset cache */
BYTE* history_ptr; /* points to next free slot in bistory_buf */
uint32 d32; /* we process 4 compressed bytes at a time */
UINT32 d32; /* we process 4 compressed bytes at a time */
UINT16 copy_offset; /* location to copy data from */
UINT16 lom; /* length of match */
UINT16 LUTIndex; /* LookUp table Index */
@@ -1078,7 +1078,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u
int bits_left; /* bits left in d32 for processing */
int cur_bits_left; /* bits left in cur_byte for processing */
int tmp, i;
uint32 i32;
UINT32 i32;
if ((dec == NULL) || (dec->history_buf == NULL))
{
@@ -1398,7 +1398,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u
* @return True on success, False on failure
*/
int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen)
{
return FALSE;
}

View File

@@ -551,22 +551,22 @@ BOOL compress_rdp_5(struct rdp_mppc_enc* enc, BYTE* srcData, int len)
char* cptr2;
int opb_index; /* index into outputBuffer */
int bits_left; /* unused bits in current byte in outputBuffer */
uint32 copy_offset; /* pattern match starts here... */
uint32 lom; /* ...and matches this many bytes */
UINT32 copy_offset; /* pattern match starts here... */
UINT32 lom; /* ...and matches this many bytes */
int last_crc_index; /* don't compute CRC beyond this index */
UINT16 *hash_table; /* hash table for pattern matching */
uint32 i;
uint32 j;
uint32 k;
uint32 x;
UINT32 i;
UINT32 j;
UINT32 k;
UINT32 x;
BYTE data;
UINT16 data16;
uint32 historyOffset;
UINT32 historyOffset;
UINT16 crc;
uint32 ctr;
uint32 saved_ctr;
uint32 data_end;
UINT32 ctr;
UINT32 saved_ctr;
UINT32 data_end;
BYTE byte_val;
crc = 0;

View File

@@ -100,10 +100,10 @@ static void nsc_decode(NSC_CONTEXT* context)
}
}
static void nsc_rle_decode(BYTE* in, BYTE* out, uint32 origsz)
static void nsc_rle_decode(BYTE* in, BYTE* out, UINT32 origsz)
{
uint32 len;
uint32 left;
UINT32 len;
UINT32 left;
BYTE value;
left = origsz;
@@ -121,13 +121,13 @@ static void nsc_rle_decode(BYTE* in, BYTE* out, uint32 origsz)
in++;
if (*in < 0xFF)
{
len = (uint32) *in++;
len = (UINT32) *in++;
len += 2;
}
else
{
in++;
len = *((uint32*) in);
len = *((UINT32*) in);
in += 4;
}
memset(out, value, len);
@@ -141,15 +141,15 @@ static void nsc_rle_decode(BYTE* in, BYTE* out, uint32 origsz)
}
}
*((uint32*)out) = *((uint32*)in);
*((UINT32*)out) = *((UINT32*)in);
}
static void nsc_rle_decompress_data(NSC_CONTEXT* context)
{
UINT16 i;
BYTE* rle;
uint32 origsize;
uint32 planesize;
UINT32 origsize;
UINT32 planesize;
rle = context->nsc_stream.Planes;
@@ -174,7 +174,7 @@ static void nsc_stream_initialize(NSC_CONTEXT* context, STREAM* s)
int i;
for (i = 0; i < 4; i++)
stream_read_uint32(s, context->nsc_stream.PlaneByteCount[i]);
stream_read_UINT32(s, context->nsc_stream.PlaneByteCount[i]);
stream_read_BYTE(s, context->nsc_stream.ColorLossLevel);
stream_read_BYTE(s, context->nsc_stream.ChromaSubSamplingLevel);
@@ -186,9 +186,9 @@ static void nsc_stream_initialize(NSC_CONTEXT* context, STREAM* s)
static void nsc_context_initialize(NSC_CONTEXT* context, STREAM* s)
{
int i;
uint32 length;
uint32 tempWidth;
uint32 tempHeight;
UINT32 length;
UINT32 tempWidth;
UINT32 tempHeight;
nsc_stream_initialize(context, s);
length = context->width * context->height * 4;
@@ -281,7 +281,7 @@ NSC_CONTEXT* nsc_context_new(void)
return nsc_context;
}
void nsc_context_set_cpu_opt(NSC_CONTEXT* context, uint32 cpu_opt)
void nsc_context_set_cpu_opt(NSC_CONTEXT* context, UINT32 cpu_opt)
{
if (cpu_opt)
NSC_INIT_SIMD(context);
@@ -317,7 +317,7 @@ void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_f
}
void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
UINT16 width, UINT16 height, BYTE* data, uint32 length)
UINT16 width, UINT16 height, BYTE* data, UINT32 length)
{
STREAM* s;

View File

@@ -37,9 +37,9 @@
static void nsc_context_initialize_encode(NSC_CONTEXT* context)
{
int i;
uint32 length;
uint32 tempWidth;
uint32 tempHeight;
UINT32 length;
UINT32 tempWidth;
UINT32 tempHeight;
tempWidth = ROUND_UP_TO(context->width, 8);
tempHeight = ROUND_UP_TO(context->height, 2);
@@ -83,8 +83,8 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, BYTE* bmpdata, int r
INT16 g_val;
INT16 b_val;
BYTE a_val;
uint32 tempWidth;
uint32 tempHeight;
UINT32 tempWidth;
UINT32 tempHeight;
tempWidth = ROUND_UP_TO(context->width, 8);
tempHeight = ROUND_UP_TO(context->height, 2);
@@ -209,8 +209,8 @@ static void nsc_encode_subsampling(NSC_CONTEXT* context)
INT8* co_src1;
INT8* cg_src0;
INT8* cg_src1;
uint32 tempWidth;
uint32 tempHeight;
UINT32 tempWidth;
UINT32 tempHeight;
tempWidth = ROUND_UP_TO(context->width, 8);
tempHeight = ROUND_UP_TO(context->height, 2);
@@ -246,11 +246,11 @@ void nsc_encode(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride)
}
}
static uint32 nsc_rle_encode(BYTE* in, BYTE* out, uint32 origsz)
static UINT32 nsc_rle_encode(BYTE* in, BYTE* out, UINT32 origsz)
{
uint32 left;
uint32 runlength = 1;
uint32 planesize = 0;
UINT32 left;
UINT32 runlength = 1;
UINT32 planesize = 0;
left = origsz;
/**
@@ -304,8 +304,8 @@ static void nsc_rle_compress_data(NSC_CONTEXT* context)
{
UINT16 i;
BYTE* rle;
uint32 origsize;
uint32 planesize;
UINT32 origsize;
UINT32 planesize;
rle = context->nsc_stream.Planes;
@@ -351,10 +351,10 @@ void nsc_compose_message(NSC_CONTEXT* context, STREAM* s,
/* Assemble the NSCodec message into stream */
stream_check_size(s, 20);
stream_write_uint32(s, context->nsc_stream.PlaneByteCount[0]); /* LumaPlaneByteCount (4 bytes) */
stream_write_uint32(s, context->nsc_stream.PlaneByteCount[1]); /* OrangeChromaPlaneByteCount (4 bytes) */
stream_write_uint32(s, context->nsc_stream.PlaneByteCount[2]); /* GreenChromaPlaneByteCount (4 bytes) */
stream_write_uint32(s, context->nsc_stream.PlaneByteCount[3]); /* AlphaPlaneByteCount (4 bytes) */
stream_write_UINT32(s, context->nsc_stream.PlaneByteCount[0]); /* LumaPlaneByteCount (4 bytes) */
stream_write_UINT32(s, context->nsc_stream.PlaneByteCount[1]); /* OrangeChromaPlaneByteCount (4 bytes) */
stream_write_UINT32(s, context->nsc_stream.PlaneByteCount[2]); /* GreenChromaPlaneByteCount (4 bytes) */
stream_write_UINT32(s, context->nsc_stream.PlaneByteCount[3]); /* AlphaPlaneByteCount (4 bytes) */
stream_write_BYTE(s, context->nsc_stream.ColorLossLevel); /* ColorLossLevel (1 byte) */
stream_write_BYTE(s, context->nsc_stream.ChromaSubSamplingLevel); /* ChromaSubsamplingLevel (1 byte) */
stream_write_UINT16(s, 0); /* Reserved (2 bytes) */

View File

@@ -49,8 +49,8 @@ static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, BYTE* bmpdata,
__m128i y_val;
__m128i co_val;
__m128i cg_val;
uint32 tempWidth;
uint32 tempHeight;
UINT32 tempWidth;
UINT32 tempHeight;
tempWidth = ROUND_UP_TO(context->width, 8);
tempHeight = ROUND_UP_TO(context->height, 2);
@@ -291,8 +291,8 @@ static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context)
INT8* co_src1;
INT8* cg_src0;
INT8* cg_src1;
uint32 tempWidth;
uint32 tempHeight;
UINT32 tempWidth;
UINT32 tempHeight;
__m128i t;
__m128i val;
__m128i mask = _mm_set1_epi16(0xFF);

View File

@@ -34,7 +34,7 @@
struct _NSC_CONTEXT_PRIV
{
BYTE* plane_buf[5]; /* Decompressed Plane Buffers in the respective order */
uint32 plane_buf_length; /* Lengths of each plane buffer */
UINT32 plane_buf_length; /* Lengths of each plane buffer */
/* profilers */
PROFILER_DEFINE(prof_nsc_rle_decompress_data);

View File

@@ -64,7 +64,7 @@
* The order of the values are:
* LL3, LH3, HL3, HH3, LH2, HL2, HH2, LH1, HL1, HH1
*/
static const uint32 rfx_default_quantization_values[] =
static const UINT32 rfx_default_quantization_values[] =
{
6, 6, 6, 6, 7, 7, 8, 8, 8, 9
};
@@ -168,7 +168,7 @@ RFX_CONTEXT* rfx_context_new(void)
return context;
}
void rfx_context_set_cpu_opt(RFX_CONTEXT* context, uint32 cpu_opt)
void rfx_context_set_cpu_opt(RFX_CONTEXT* context, UINT32 cpu_opt)
{
/* enable SIMD CPU acceleration if detected */
if (cpu_opt & CPU_SSE2)
@@ -225,10 +225,10 @@ void rfx_context_reset(RFX_CONTEXT* context)
static void rfx_process_message_sync(RFX_CONTEXT* context, STREAM* s)
{
uint32 magic;
UINT32 magic;
/* RFX_SYNC */
stream_read_uint32(s, magic); /* magic (4 bytes), 0xCACCACCA */
stream_read_UINT32(s, magic); /* magic (4 bytes), 0xCACCACCA */
if (magic != WF_MAGIC)
{
@@ -334,10 +334,10 @@ static void rfx_process_message_context(RFX_CONTEXT* context, STREAM* s)
static void rfx_process_message_frame_begin(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s)
{
uint32 frameIdx;
UINT32 frameIdx;
UINT16 numRegions;
stream_read_uint32(s, frameIdx); /* frameIdx (4 bytes), if codec is in video mode, must be ignored */
stream_read_UINT32(s, frameIdx); /* frameIdx (4 bytes), if codec is in video mode, must be ignored */
stream_read_UINT16(s, numRegions); /* numRegions (2 bytes) */
DEBUG_RFX("RFX_FRAME_BEGIN: frameIdx:%d numRegions:%d", frameIdx, numRegions);
@@ -415,10 +415,10 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
{
int i;
UINT16 subtype;
uint32 blockLen;
uint32 blockType;
uint32 tilesDataSize;
uint32* quants;
UINT32 blockLen;
UINT32 blockType;
UINT32 tilesDataSize;
UINT32* quants;
BYTE quant;
int pos;
@@ -450,12 +450,12 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
return;
}
stream_read_uint32(s, tilesDataSize); /* tilesDataSize (4 bytes) */
stream_read_UINT32(s, tilesDataSize); /* tilesDataSize (4 bytes) */
if (context->quants != NULL)
context->quants = (uint32*) realloc((void*) context->quants, context->num_quants * 10 * sizeof(uint32));
context->quants = (UINT32*) realloc((void*) context->quants, context->num_quants * 10 * sizeof(UINT32));
else
context->quants = (uint32*) malloc(context->num_quants * 10 * sizeof(uint32));
context->quants = (UINT32*) malloc(context->num_quants * 10 * sizeof(UINT32));
quants = context->quants;
/* quantVals */
@@ -493,7 +493,7 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
{
/* RFX_TILE */
stream_read_UINT16(s, blockType); /* blockType (2 bytes), must be set to CBT_TILE (0xCAC3) */
stream_read_uint32(s, blockLen); /* blockLen (4 bytes) */
stream_read_UINT32(s, blockLen); /* blockLen (4 bytes) */
pos = stream_get_pos(s) - 6 + blockLen;
@@ -509,12 +509,12 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
}
}
RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length)
RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, UINT32 length)
{
int pos;
STREAM* s;
uint32 blockLen;
uint32 blockType;
UINT32 blockLen;
UINT32 blockType;
RFX_MESSAGE* message;
s = stream_new(0);
@@ -525,7 +525,7 @@ RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length
{
/* RFX_BLOCKT */
stream_read_UINT16(s, blockType); /* blockType (2 bytes) */
stream_read_uint32(s, blockLen); /* blockLen (4 bytes) */
stream_read_UINT32(s, blockLen); /* blockLen (4 bytes) */
DEBUG_RFX("blockType 0x%X blockLen %d", blockType, blockLen);
@@ -632,15 +632,15 @@ void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message)
static void rfx_compose_message_sync(RFX_CONTEXT* context, STREAM* s)
{
stream_write_UINT16(s, WBT_SYNC); /* BlockT.blockType */
stream_write_uint32(s, 12); /* BlockT.blockLen */
stream_write_uint32(s, WF_MAGIC); /* magic */
stream_write_UINT32(s, 12); /* BlockT.blockLen */
stream_write_UINT32(s, WF_MAGIC); /* magic */
stream_write_UINT16(s, WF_VERSION_1_0); /* version */
}
static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
{
stream_write_UINT16(s, WBT_CODEC_VERSIONS); /* BlockT.blockType */
stream_write_uint32(s, 10); /* BlockT.blockLen */
stream_write_UINT32(s, 10); /* BlockT.blockLen */
stream_write_BYTE(s, 1); /* numCodecs */
stream_write_BYTE(s, 1); /* codecs.codecId */
stream_write_UINT16(s, WF_VERSION_1_0); /* codecs.version */
@@ -649,7 +649,7 @@ static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
static void rfx_compose_message_channels(RFX_CONTEXT* context, STREAM* s)
{
stream_write_UINT16(s, WBT_CHANNELS); /* BlockT.blockType */
stream_write_uint32(s, 12); /* BlockT.blockLen */
stream_write_UINT32(s, 12); /* BlockT.blockLen */
stream_write_BYTE(s, 1); /* numChannels */
stream_write_BYTE(s, 0); /* Channel.channelId */
stream_write_UINT16(s, context->width); /* Channel.width */
@@ -661,7 +661,7 @@ static void rfx_compose_message_context(RFX_CONTEXT* context, STREAM* s)
UINT16 properties;
stream_write_UINT16(s, WBT_CONTEXT); /* CodecChannelT.blockType */
stream_write_uint32(s, 13); /* CodecChannelT.blockLen */
stream_write_UINT32(s, 13); /* CodecChannelT.blockLen */
stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
stream_write_BYTE(s, 0); /* ctxId */
@@ -702,10 +702,10 @@ static void rfx_compose_message_frame_begin(RFX_CONTEXT* context, STREAM* s)
stream_check_size(s, 14);
stream_write_UINT16(s, WBT_FRAME_BEGIN); /* CodecChannelT.blockType */
stream_write_uint32(s, 14); /* CodecChannelT.blockLen */
stream_write_UINT32(s, 14); /* CodecChannelT.blockLen */
stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
stream_write_uint32(s, context->frame_idx); /* frameIdx */
stream_write_UINT32(s, context->frame_idx); /* frameIdx */
stream_write_UINT16(s, 1); /* numRegions */
context->frame_idx++;
@@ -721,7 +721,7 @@ static void rfx_compose_message_region(RFX_CONTEXT* context, STREAM* s,
stream_check_size(s, size);
stream_write_UINT16(s, WBT_REGION); /* CodecChannelT.blockType */
stream_write_uint32(s, size); /* set CodecChannelT.blockLen later */
stream_write_UINT32(s, size); /* set CodecChannelT.blockLen later */
stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
stream_write_BYTE(s, 1); /* regionFlags */
@@ -741,7 +741,7 @@ static void rfx_compose_message_region(RFX_CONTEXT* context, STREAM* s,
static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s,
BYTE* tile_data, int tile_width, int tile_height, int rowstride,
const uint32* quantVals, int quantIdxY, int quantIdxCb, int quantIdxCr,
const UINT32* quantVals, int quantIdxY, int quantIdxCb, int quantIdxCr,
int xIdx, int yIdx)
{
int YLen = 0;
@@ -753,7 +753,7 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s,
start_pos = stream_get_pos(s);
stream_write_UINT16(s, CBT_TILE); /* BlockT.blockType */
stream_seek_uint32(s); /* set BlockT.blockLen later */
stream_seek_UINT32(s); /* set BlockT.blockLen later */
stream_write_BYTE(s, quantIdxY);
stream_write_BYTE(s, quantIdxCb);
stream_write_BYTE(s, quantIdxCr);
@@ -772,7 +772,7 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s,
end_pos = stream_get_pos(s);
stream_set_pos(s, start_pos + 2);
stream_write_uint32(s, 19 + YLen + CbLen + CrLen); /* BlockT.blockLen */
stream_write_UINT32(s, 19 + YLen + CbLen + CrLen); /* BlockT.blockLen */
stream_set_pos(s, start_pos + 13);
stream_write_UINT16(s, YLen);
stream_write_UINT16(s, CbLen);
@@ -788,8 +788,8 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s,
int start_pos, end_pos;
int i;
int numQuants;
const uint32* quantVals;
const uint32* quantValsPtr;
const UINT32* quantVals;
const UINT32* quantValsPtr;
int quantIdxY;
int quantIdxCb;
int quantIdxCr;
@@ -826,7 +826,7 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s,
start_pos = stream_get_pos(s);
stream_write_UINT16(s, WBT_EXTENSION); /* CodecChannelT.blockType */
stream_seek_uint32(s); /* set CodecChannelT.blockLen later */
stream_seek_UINT32(s); /* set CodecChannelT.blockLen later */
stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
stream_write_UINT16(s, CBT_TILESET); /* subtype */
@@ -835,7 +835,7 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s,
stream_write_BYTE(s, numQuants); /* numQuants */
stream_write_BYTE(s, 0x40); /* tileSize */
stream_write_UINT16(s, numTiles); /* numTiles */
stream_seek_uint32(s); /* set tilesDataSize later */
stream_seek_UINT32(s); /* set tilesDataSize later */
quantValsPtr = quantVals;
for (i = 0; i < numQuants * 5; i++)
@@ -863,9 +863,9 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s,
end_pos = stream_get_pos(s);
stream_set_pos(s, start_pos + 2);
stream_write_uint32(s, size); /* CodecChannelT.blockLen */
stream_write_UINT32(s, size); /* CodecChannelT.blockLen */
stream_set_pos(s, start_pos + 18);
stream_write_uint32(s, tilesDataSize);
stream_write_UINT32(s, tilesDataSize);
stream_set_pos(s, end_pos);
}
@@ -875,7 +875,7 @@ static void rfx_compose_message_frame_end(RFX_CONTEXT* context, STREAM* s)
stream_check_size(s, 8);
stream_write_UINT16(s, WBT_FRAME_END); /* CodecChannelT.blockType */
stream_write_uint32(s, 8); /* CodecChannelT.blockLen */
stream_write_UINT32(s, 8); /* CodecChannelT.blockLen */
stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
}

View File

@@ -90,9 +90,9 @@ static void rfx_decode_format_rgb(INT16* r_buf, INT16* g_buf, INT16* b_buf,
void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf)
{
/* sint32 is used intentionally because we calculate with shifted factors! */
sint32 y, cb, cr;
sint32 r, g, b;
/* INT32 is used intentionally because we calculate with shifted factors! */
INT32 y, cb, cr;
INT32 r, g, b;
int i;
/**
@@ -149,7 +149,7 @@ void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf)
}
}
static void rfx_decode_component(RFX_CONTEXT* context, const uint32* quantization_values,
static void rfx_decode_component(RFX_CONTEXT* context, const UINT32* quantization_values,
const BYTE* data, int size, INT16* buffer)
{
PROFILER_ENTER(context->priv->prof_rfx_decode_component);
@@ -174,9 +174,9 @@ static void rfx_decode_component(RFX_CONTEXT* context, const uint32* quantizatio
}
void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in,
int y_size, const uint32 * y_quants,
int cb_size, const uint32 * cb_quants,
int cr_size, const uint32 * cr_quants, BYTE* rgb_buffer)
int y_size, const UINT32 * y_quants,
int cb_size, const UINT32 * cb_quants,
int cr_size, const UINT32 * cr_quants, BYTE* rgb_buffer)
{
PROFILER_ENTER(context->priv->prof_rfx_decode_rgb);

View File

@@ -25,9 +25,9 @@
void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf);
void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in,
int y_size, const uint32 * y_quants,
int cb_size, const uint32 * cb_quants,
int cr_size, const uint32 * cr_quants, BYTE* rgb_buffer);
int y_size, const UINT32 * y_quants,
int cb_size, const UINT32 * cb_quants,
int cr_size, const UINT32 * cr_quants, BYTE* rgb_buffer);
#endif /* __RFX_DECODE_H */

View File

@@ -182,10 +182,10 @@ static void rfx_encode_format_rgb(const BYTE* rgb_data, int width, int height, i
void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf)
{
/* sint32 is used intentionally because we calculate with shifted factors! */
/* INT32 is used intentionally because we calculate with shifted factors! */
int i;
sint32 r, g, b;
sint32 y, cb, cr;
INT32 r, g, b;
INT32 y, cb, cr;
/**
* The encoded YCbCr coefficients are represented as 11.5 fixed-point numbers:
@@ -222,7 +222,7 @@ void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf)
}
}
static void rfx_encode_component(RFX_CONTEXT* context, const uint32* quantization_values,
static void rfx_encode_component(RFX_CONTEXT* context, const UINT32* quantization_values,
INT16* data, BYTE* buffer, int buffer_size, int* size)
{
PROFILER_ENTER(context->priv->prof_rfx_encode_component);
@@ -247,7 +247,7 @@ static void rfx_encode_component(RFX_CONTEXT* context, const uint32* quantizatio
}
void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride,
const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants,
const UINT32* y_quants, const UINT32* cb_quants, const UINT32* cr_quants,
STREAM* data_out, int* y_size, int* cb_size, int* cr_size)
{
INT16* y_r_buffer = context->priv->y_r_buffer;

View File

@@ -25,7 +25,7 @@
void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf);
void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride,
const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants,
const UINT32* y_quants, const UINT32* cb_quants, const UINT32* cr_quants,
STREAM* data_out, int* y_size, int* cb_size, int* cr_size);
#endif

View File

@@ -88,7 +88,7 @@ void rfx_decode_YCbCr_to_RGB_NEON(INT16 * y_r_buffer, INT16 * cb_g_buffer, INT16
}
static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
rfx_quantization_decode_block_NEON(INT16 * buffer, const int buffer_size, const uint32 factor)
rfx_quantization_decode_block_NEON(INT16 * buffer, const int buffer_size, const UINT32 factor)
{
if (factor <= 6)
return;
@@ -107,7 +107,7 @@ rfx_quantization_decode_block_NEON(INT16 * buffer, const int buffer_size, const
}
void
rfx_quantization_decode_NEON(INT16 * buffer, const uint32 * quantization_values)
rfx_quantization_decode_NEON(INT16 * buffer, const UINT32 * quantization_values)
{
rfx_quantization_decode_block_NEON(buffer, 1024, quantization_values[8]); /* HL1 */
rfx_quantization_decode_block_NEON(buffer + 1024, 1024, quantization_values[7]); /* LH1 */
@@ -314,7 +314,7 @@ int isNeonSupported()
return 0;
}
uint64_t features = android_getCpuFeatures();
UINT64_t features = android_getCpuFeatures();
if ((features & ANDROID_CPU_ARM_FEATURE_ARMv7))
{
if (features & ANDROID_CPU_ARM_FEATURE_NEON)

View File

@@ -23,7 +23,7 @@
#include "rfx_quantization.h"
static void rfx_quantization_decode_block(INT16* buffer, int buffer_size, uint32 factor)
static void rfx_quantization_decode_block(INT16* buffer, int buffer_size, UINT32 factor)
{
INT16* dst;
@@ -36,7 +36,7 @@ static void rfx_quantization_decode_block(INT16* buffer, int buffer_size, uint32
}
}
void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values)
void rfx_quantization_decode(INT16* buffer, const UINT32* quantization_values)
{
/* Scale the values so that they are represented as 11.5 fixed-point number */
rfx_quantization_decode_block(buffer, 4096, 5);
@@ -53,7 +53,7 @@ void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values)
rfx_quantization_decode_block(buffer + 4032, 64, quantization_values[0] - 6); /* LL3 */
}
static void rfx_quantization_encode_block(INT16* buffer, int buffer_size, uint32 factor)
static void rfx_quantization_encode_block(INT16* buffer, int buffer_size, UINT32 factor)
{
INT16* dst;
INT16 half;
@@ -68,7 +68,7 @@ static void rfx_quantization_encode_block(INT16* buffer, int buffer_size, uint32
}
}
void rfx_quantization_encode(INT16* buffer, const uint32* quantization_values)
void rfx_quantization_encode(INT16* buffer, const UINT32* quantization_values)
{
rfx_quantization_encode_block(buffer, 1024, quantization_values[8] - 6); /* HL1 */
rfx_quantization_encode_block(buffer + 1024, 1024, quantization_values[7] - 6); /* LH1 */

View File

@@ -22,7 +22,7 @@
#include <freerdp/codec/rfx.h>
void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values);
void rfx_quantization_encode(INT16* buffer, const uint32* quantization_values);
void rfx_quantization_decode(INT16* buffer, const UINT32* quantization_values);
void rfx_quantization_encode(INT16* buffer, const UINT32* quantization_values);
#endif /* __RFX_QUANTIZATION_H */

View File

@@ -72,7 +72,7 @@
/* Returns the least number of bits required to represent a given value */
#define GetMinBits(_val, _nbits) \
{ \
uint32 _v = _val; \
UINT32 _v = _val; \
_nbits = 0; \
while (_v) \
{ \
@@ -150,7 +150,7 @@ int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buff
if (k)
{
int mag;
uint32 sign;
UINT32 sign;
/* RL MODE */
while (!rfx_bitstream_eos(bs))
@@ -179,14 +179,14 @@ int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buff
}
else
{
uint32 mag;
uint32 nIdx;
uint32 val1;
uint32 val2;
UINT32 mag;
UINT32 nIdx;
UINT32 val1;
UINT32 val2;
/* GR (GOLOMB-RICE) MODE */
GetGRCode(&krp, &kr, vk, mag16) /* values coded are 2 * magnitude - sign */
mag = (uint32) mag16;
mag = (UINT32) mag16;
if (mode == RLGR1)
{
@@ -271,13 +271,13 @@ int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buff
/* Outputs the Golomb/Rice encoding of a non-negative integer */
#define CodeGR(krp, val) rfx_rlgr_code_gr(bs, krp, val)
static void rfx_rlgr_code_gr(RFX_BITSTREAM* bs, int* krp, uint32 val)
static void rfx_rlgr_code_gr(RFX_BITSTREAM* bs, int* krp, UINT32 val)
{
int kr = *krp >> LSGR;
/* unary part of GR code */
uint32 vk = (val) >> kr;
UINT32 vk = (val) >> kr;
OutputBit(vk, 1);
OutputBit(1, 0);
@@ -371,7 +371,7 @@ int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buff
if (mode == RLGR1)
{
uint32 twoMs;
UINT32 twoMs;
/* RLGR1 variant */
@@ -394,10 +394,10 @@ int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buff
}
else /* mode == RLGR3 */
{
uint32 twoMs1;
uint32 twoMs2;
uint32 sum2Ms;
uint32 nIdx;
UINT32 twoMs1;
UINT32 twoMs2;
UINT32 sum2Ms;
UINT32 nIdx;
/* RLGR3 variant */

View File

@@ -225,7 +225,7 @@ static void rfx_encode_rgb_to_ycbcr_sse2(INT16* y_r_buffer, INT16* cb_g_buffer,
}
static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const uint32 factor)
rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const UINT32 factor)
{
__m128i a;
__m128i * ptr = (__m128i*) buffer;
@@ -244,7 +244,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* buffer, const uint32* quantization_values)
static void rfx_quantization_decode_sse2(INT16* buffer, const UINT32* quantization_values)
{
_mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16));
@@ -263,7 +263,7 @@ static void rfx_quantization_decode_sse2(INT16* buffer, const uint32* quantizati
}
static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
rfx_quantization_encode_block_sse2(INT16* buffer, const int buffer_size, const uint32 factor)
rfx_quantization_encode_block_sse2(INT16* buffer, const int buffer_size, const UINT32 factor)
{
__m128i a;
__m128i* ptr = (__m128i*) buffer;
@@ -285,7 +285,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* buffer, const uint32* quantization_values)
static void rfx_quantization_encode_sse2(INT16* buffer, const UINT32* quantization_values)
{
_mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16));