|
|
@ -213,7 +213,7 @@ xrdp_jpeg_deinit(void *handle)
|
|
|
|
|
|
|
|
|
|
|
|
struct mydata_comp
|
|
|
|
struct mydata_comp
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char *cb;
|
|
|
|
JOCTET *cb;
|
|
|
|
int cb_bytes;
|
|
|
|
int cb_bytes;
|
|
|
|
int total_done;
|
|
|
|
int total_done;
|
|
|
|
int overwrite;
|
|
|
|
int overwrite;
|
|
|
@ -265,8 +265,8 @@ my_term_destination(j_compress_ptr cinfo)
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
static int APP_CC
|
|
|
|
static int APP_CC
|
|
|
|
jp_do_compress(char *data, int width, int height, int bpp, int quality,
|
|
|
|
jp_do_compress(JOCTET *data, int width, int height, int bpp, int quality,
|
|
|
|
char *comp_data, int *comp_data_bytes)
|
|
|
|
JOCTET *comp_data, int *comp_data_bytes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct jpeg_compress_struct cinfo;
|
|
|
|
struct jpeg_compress_struct cinfo;
|
|
|
|
struct jpeg_error_mgr jerr;
|
|
|
|
struct jpeg_error_mgr jerr;
|
|
|
@ -336,9 +336,8 @@ jpeg_compress(char *in_data, int width, int height,
|
|
|
|
struct stream *s, struct stream *temp_s, int bpp,
|
|
|
|
struct stream *s, struct stream *temp_s, int bpp,
|
|
|
|
int byte_limit, int e, int quality)
|
|
|
|
int byte_limit, int e, int quality)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char *data;
|
|
|
|
JOCTET *data;
|
|
|
|
tui32 *src32;
|
|
|
|
tui32 *src32;
|
|
|
|
tui16 *src16;
|
|
|
|
|
|
|
|
tui8 *dst8;
|
|
|
|
tui8 *dst8;
|
|
|
|
tui32 pixel;
|
|
|
|
tui32 pixel;
|
|
|
|
int red;
|
|
|
|
int red;
|
|
|
@ -348,7 +347,7 @@ jpeg_compress(char *in_data, int width, int height,
|
|
|
|
int i;
|
|
|
|
int i;
|
|
|
|
int cdata_bytes;
|
|
|
|
int cdata_bytes;
|
|
|
|
|
|
|
|
|
|
|
|
data = temp_s->data;
|
|
|
|
data = (JOCTET *) temp_s->data;
|
|
|
|
dst8 = data;
|
|
|
|
dst8 = data;
|
|
|
|
|
|
|
|
|
|
|
|
if (bpp == 24)
|
|
|
|
if (bpp == 24)
|
|
|
@ -380,7 +379,8 @@ jpeg_compress(char *in_data, int width, int height,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cdata_bytes = byte_limit;
|
|
|
|
cdata_bytes = byte_limit;
|
|
|
|
jp_do_compress(data, width + e, height, 24, quality, s->p, &cdata_bytes);
|
|
|
|
jp_do_compress(data, width + e, height, 24, quality, (JOCTET *) s->p,
|
|
|
|
|
|
|
|
&cdata_bytes);
|
|
|
|
s->p += cdata_bytes;
|
|
|
|
s->p += cdata_bytes;
|
|
|
|
return cdata_bytes;
|
|
|
|
return cdata_bytes;
|
|
|
|
}
|
|
|
|
}
|
|
|
|