code refactoring + integrate rdesktop code for bitmap decompression

This commit is contained in:
speyrefitte
2014-06-30 18:04:51 +02:00
parent cbb9976866
commit c53841ac57
13 changed files with 1083 additions and 1023 deletions

View File

@@ -4,6 +4,5 @@
#include "../../src/rle/rle.h"
%End
int rle_decode_uint8(void* output, int width, int height, char* input, int size);
int rle_decode_uint16(void* output, int width, int height, char* input, int size);
int rle_decode_uint24(void* output, int width, int height, char* input, int size);
int bitmap_decompress(void * output, int width, int height, char * input, int size, int Bpp);

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,6 @@
#ifndef _RLE_H_
#define _RLE_H_
int rle_decode_uint8(char* output, int width, int height, char* input, int size);
int rle_decode_uint16(char* output, int width, int height, char* input, int size);
int rle_decode_uint24(char* output, int width, int height, char* input, int size);
int bitmap_decompress(char * output, int width, int height, char * input, int size, int Bpp);
#endif

View File

@@ -1,35 +0,0 @@
#ifndef _RLE_M_H_
#define _RLE_M_H_
#include "rle.h"
#define CVAL(p) ((unsigned char)(*(p++)))
#if defined(B_ENDIAN)
#define EIK0 1
#define EIK1 0
#else
#define EIK0 0
#define EIK1 1
#endif
#define REPEAT(statement) \
{ \
while ((count > 0) && (x < width)) \
{ \
statement; \
count--; \
x++; \
} \
}
#define MASK_UPDATE \
{ \
mixmask <<= 1; \
if ((mixmask & 0xff) == 0) \
{ \
mask = fom_mask ? fom_mask : CVAL(input); \
mixmask = 1; \
} \
}
#endif