Merge branch 'master' of github.com:FreeRDP/FreeRDP

This commit is contained in:
Marc-André Moreau 2013-07-15 17:14:40 -04:00
commit ba69071d04
7 changed files with 42 additions and 13 deletions

View File

@ -106,6 +106,8 @@ struct _RFX_CONTEXT
void (*quantization_encode)(INT16* buffer, const UINT32* quantization_values);
void (*dwt_2d_decode)(INT16* buffer, INT16* dwt_buffer);
void (*dwt_2d_encode)(INT16* buffer, INT16* dwt_buffer);
int (*rlgr_decode)(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buffer, int buffer_size);
int (*rlgr_encode)(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buffer, int buffer_size);
/* private definitions */
RFX_CONTEXT_PRIV* priv;

View File

@ -45,6 +45,7 @@
#include "rfx_encode.h"
#include "rfx_quantization.h"
#include "rfx_dwt.h"
#include "rfx_rlgr.h"
#include "rfx_sse2.h"
#include "rfx_neon.h"
@ -137,6 +138,7 @@ static void rfx_profiler_print(RFX_CONTEXT* context)
PROFILER_PRINT_FOOTER;
}
RFX_CONTEXT* rfx_context_new(void)
{
HKEY hKey;
@ -159,8 +161,8 @@ RFX_CONTEXT* rfx_context_new(void)
/*
* align buffers to 16 byte boundary (needed for SSE/NEON instructions)
*
* y_r_buffer, cb_g_buffer, cr_b_buffer: 64 * 64 * 4 = 16384 (0x4000)
* dwt_buffer: 32 * 32 * 2 * 2 * 4 = 16384, maximum sub-band width is 32
* y_r_buffer, cb_g_buffer, cr_b_buffer: 64 * 64 * sizeof(INT16) = 8192 (0x2000)
* dwt_buffer: 32 * 32 * 2 * 2 * sizeof(INT16) = 8192, maximum sub-band width is 32
*
* Additionally we add 32 bytes (16 in front and 16 at the back of the buffer)
* in order to allow optimized functions (SEE, NEON) to read from positions
@ -168,7 +170,7 @@ RFX_CONTEXT* rfx_context_new(void)
* performed at the BufferPool_Take function calls in rfx_encode/decode.c.
*/
context->priv->BufferPool = BufferPool_New(TRUE, 16384 + 32, 16);
context->priv->BufferPool = BufferPool_New(TRUE, 8192 + 32, 16);
#ifdef _WIN32
{
@ -239,6 +241,8 @@ RFX_CONTEXT* rfx_context_new(void)
context->quantization_encode = rfx_quantization_encode;
context->dwt_2d_decode = rfx_dwt_2d_decode;
context->dwt_2d_encode = rfx_dwt_2d_encode;
context->rlgr_decode = rfx_rlgr_decode;
context->rlgr_encode = rfx_rlgr_encode;
RFX_INIT_SIMD(context);

View File

@ -103,7 +103,7 @@ static void rfx_decode_component(RFX_CONTEXT* context, const UINT32* quantizatio
PROFILER_ENTER(context->priv->prof_rfx_decode_component);
PROFILER_ENTER(context->priv->prof_rfx_rlgr_decode);
rfx_rlgr_decode(context->mode, data, size, buffer, 4096);
context->rlgr_decode(context->mode, data, size, buffer, 4096);
PROFILER_EXIT(context->priv->prof_rfx_rlgr_decode);
PROFILER_ENTER(context->priv->prof_rfx_differential_decode);

View File

@ -209,7 +209,7 @@ static void rfx_encode_component(RFX_CONTEXT* context, const UINT32* quantizatio
PROFILER_EXIT(context->priv->prof_rfx_differential_encode);
PROFILER_ENTER(context->priv->prof_rfx_rlgr_encode);
*size = rfx_rlgr_encode(context->mode, data, 4096, buffer, buffer_size);
*size = context->rlgr_encode(context->mode, data, 4096, buffer, buffer_size);
PROFILER_EXIT(context->priv->prof_rfx_rlgr_encode);
PROFILER_EXIT(context->priv->prof_rfx_encode_component);

View File

@ -209,7 +209,7 @@ static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 s
#ifdef WITH_DEBUG_RDP
DEBUG_RDP("recv Fast-Path %s Update (0x%X), length:%d",
updateCode < ARRAYSIZE(FASTPATH_UPDATETYPE_STRINGS) ? FASTPATH_UPDATETYPE_STRINGS[updateCode] : "???", updateCode, capacity);
updateCode < ARRAYSIZE(FASTPATH_UPDATETYPE_STRINGS) ? FASTPATH_UPDATETYPE_STRINGS[updateCode] : "???", updateCode, size);
#endif
switch (updateCode)

View File

@ -107,7 +107,7 @@ void license_print_scope_list(SCOPE_LIST* scopeList)
for (index = 0; index < scopeList->count; index++)
{
scope = &scopeList->array[index];
fprintf(stderr, "\t%s\n", (char*) scope->buffer);
fprintf(stderr, "\t%s\n", (char*) scope->data);
}
}
@ -810,11 +810,11 @@ BOOL license_read_platform_challenge_packet(rdpLicense* license, wStream* s)
fprintf(stderr, "\n");
fprintf(stderr, "EncryptedPlatformChallenge:\n");
winpr_HexDump(license->EncryptedPlatformChallenge->buffer, license->EncryptedPlatformChallenge->length);
winpr_HexDump(license->EncryptedPlatformChallenge->data, license->EncryptedPlatformChallenge->length);
fprintf(stderr, "\n");
fprintf(stderr, "PlatformChallenge:\n");
winpr_HexDump(license->PlatformChallenge->buffer, license->PlatformChallenge->length);
winpr_HexDump(license->PlatformChallenge->data, license->PlatformChallenge->length);
fprintf(stderr, "\n");
fprintf(stderr, "MacData:\n");
@ -937,13 +937,13 @@ void license_write_new_license_request_packet(rdpLicense* license, wStream* s)
fprintf(stderr, "\n");
fprintf(stderr, "EncryptedPremasterSecret\n");
winpr_HexDump(license->EncryptedPremasterSecret->buffer, license->EncryptedPremasterSecret->length);
winpr_HexDump(license->EncryptedPremasterSecret->data, license->EncryptedPremasterSecret->length);
fprintf(stderr, "\n");
fprintf(stderr, "ClientUserName (%d): %s\n", license->ClientUserName->length, (char*) license->ClientUserName->buffer);
fprintf(stderr, "ClientUserName (%d): %s\n", license->ClientUserName->length, (char*) license->ClientUserName->data);
fprintf(stderr, "\n");
fprintf(stderr, "ClientMachineName (%d): %s\n", license->ClientMachineName->length, (char*) license->ClientMachineName->buffer);
fprintf(stderr, "ClientMachineName (%d): %s\n", license->ClientMachineName->length, (char*) license->ClientMachineName->data);
fprintf(stderr, "\n");
#endif
}
@ -1048,7 +1048,7 @@ void license_send_platform_challenge_response_packet(rdpLicense* license)
fprintf(stderr, "\n");
fprintf(stderr, "EncryptedHardwareId:\n");
winpr_HexDump(license->EncryptedHardwareId->buffer, 20);
winpr_HexDump(license->EncryptedHardwareId->data, 20);
fprintf(stderr, "\n");
#endif

View File

@ -739,6 +739,28 @@ void gdi_ellipse_cb(rdpContext* context, ELLIPSE_CB_ORDER* ellipse_cb)
fprintf(stderr, "EllipseCB\n");
}
void gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surface_frame_marker)
{
DEBUG_GDI("frameId %d frameAction %d",
surface_frame_marker->frameId,
surface_frame_marker->frameAction);
/* TODO: Implement frame marker completely */
switch (surface_frame_marker->frameAction)
{
case SURFACECMD_FRAMEACTION_BEGIN:
break;
case SURFACECMD_FRAMEACTION_END:
if (context->instance->settings->FrameAcknowledge > 0)
{
IFCALL(context->instance->update->SurfaceFrameAcknowledge, context, surface_frame_marker->frameId);
}
break;
}
}
int tilenum = 0;
void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_command)
@ -890,6 +912,7 @@ void gdi_register_update_callbacks(rdpUpdate* update)
primary->EllipseCB = gdi_ellipse_cb;
update->SurfaceBits = gdi_surface_bits;
update->SurfaceFrameMarker = gdi_surface_frame_marker;
}
void gdi_init_primary(rdpGdi* gdi)