Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRDP/FreeRDP-old.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Lee <llyzs@163.com>2011-06-16 09:30:19 +0400
committerVic Lee <llyzs@163.com>2011-06-16 09:30:19 +0400
commit1a0d69f77eadd665bc8b77105aac619cd3d5203c (patch)
tree45351a82cf7e00fbfa947f3760af2ffd690fa378
parent033f72a62a7acbf373d50975901ad7f8bee07eb0 (diff)
cunit/librfx: test larger image encoding.
-rw-r--r--cunit/test_librfx.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/cunit/test_librfx.c b/cunit/test_librfx.c
index c9031ca..7932390 100644
--- a/cunit/test_librfx.c
+++ b/cunit/test_librfx.c
@@ -132,6 +132,23 @@ static const uint8 rgb_scanline_data[] =
0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
+ 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
+
+ 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
+ 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
+ 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
+ 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
+ 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
+ 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00,
+ 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00,
+ 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00,
+ 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00,
+ 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00,
+ 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00,
+ 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
+ 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
+ 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
+ 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF
};
@@ -304,16 +321,16 @@ test_encode(void)
int i;
uint8 decode_buffer[4096 * 3];
- rgb_data = (uint8 *) malloc(64 * 64 * 3);
- for (i = 0; i < 64; i++)
- memcpy(rgb_data + i * 64 * 3, rgb_scanline_data, 64 * 3);
+ rgb_data = (uint8 *) malloc(100 * 80 * 3);
+ for (i = 0; i < 80; i++)
+ memcpy(rgb_data + i * 100 * 3, rgb_scanline_data, 80 * 3);
//hexdump(rgb_data, 64 * 64 * 3);
context = rfx_context_new();
context->mode = RLGR3;
rfx_context_set_pixel_format(context, RFX_PIXEL_FORMAT_RGB);
- rfx_encode_rgb(context, rgb_data, 64, 64, 64 * 3,
+ rfx_encode_rgb(context, rgb_data, 64, 64, 100 * 3,
test_quantization_values, test_quantization_values, test_quantization_values,
ycbcr_buffer, sizeof(ycbcr_buffer), &y_size, &cb_size, &cr_size);
//dump_buffer(context->cb_g_buffer, 4096);
@@ -355,7 +372,7 @@ test_message(void)
rfx_process_message(context, buffer, size);
size = rfx_compose_message_data(context, buffer, sizeof(buffer),
- &rect, 1, rgb_data, 64, 64, 64 * 3);
+ &rect, 1, rgb_data, 100, 80, 100 * 3);
/*hexdump(buffer, size);*/
rfx_context_free(context);