From aa35a327528c507505de33496dd214c40675fd6e Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 15 Jun 2014 16:17:40 -0700 Subject: libxrdp: 32 bpp compression changes / fixes --- libxrdp/xrdp_orders.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libxrdp/xrdp_orders.c') diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c index 7ba6cf01..1412386e 100644 --- a/libxrdp/xrdp_orders.c +++ b/libxrdp/xrdp_orders.c @@ -2327,8 +2327,16 @@ xrdp_orders_send_bitmap(struct xrdp_orders *self, init_stream(temp_s, 16384); p = s->p; i = height; - lines_sending = xrdp_bitmap_compress(data, width, height, s, bpp, 16384, - i - 1, temp_s, e); + if (bpp > 24) + { + lines_sending = xrdp_bitmap32_compress(data, width, height, s, bpp, 16384, + i - 1, temp_s, e); + } + else + { + lines_sending = xrdp_bitmap_compress(data, width, height, s, bpp, 16384, + i - 1, temp_s, e); + } if (lines_sending != height) { -- cgit v1.2.1 From b142a59e69ee2b4a721641fe7f5dc9dadb2bb020 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Tue, 17 Jun 2014 22:41:10 -0700 Subject: libxrdp: changes for planar compression --- libxrdp/xrdp_orders.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'libxrdp/xrdp_orders.c') diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c index 1412386e..88ffda8e 100644 --- a/libxrdp/xrdp_orders.c +++ b/libxrdp/xrdp_orders.c @@ -2322,15 +2322,16 @@ xrdp_orders_send_bitmap(struct xrdp_orders *self, } make_stream(s); - init_stream(s, 16384); + init_stream(s, 16384 * 2); make_stream(temp_s); - init_stream(temp_s, 16384); + init_stream(temp_s, 16384 * 2); p = s->p; i = height; if (bpp > 24) { - lines_sending = xrdp_bitmap32_compress(data, width, height, s, bpp, 16384, - i - 1, temp_s, e); + lines_sending = xrdp_bitmap32_compress(data, width, height, s, + bpp, 16384, + i - 1, temp_s, e, 0x30); } else { @@ -2590,15 +2591,16 @@ xrdp_orders_send_bitmap2(struct xrdp_orders *self, } make_stream(s); - init_stream(s, 16384); + init_stream(s, 16384 * 2); make_stream(temp_s); - init_stream(temp_s, 16384); + init_stream(temp_s, 16384 * 2); p = s->p; i = height; if (bpp > 24) { - lines_sending = xrdp_bitmap32_compress(data, width, height, s, bpp, 16384, - i - 1, temp_s, e); + lines_sending = xrdp_bitmap32_compress(data, width, height, s, + bpp, 16384, + i - 1, temp_s, e, 0x30); } else { -- cgit v1.2.1