mfreerdp-server: enabled SSE2 optimizations, fixed warnings

This commit is contained in:
C-o-r-E 2012-12-12 19:13:26 -05:00
parent a060c8894d
commit 6fa0342471
3 changed files with 17 additions and 16 deletions

View File

@ -73,13 +73,13 @@ struct mf_info
//STREAM* s;
//screen and monitor info
int screenID;
int virtscreen_width;
int virtscreen_height;
int servscreen_width;
int servscreen_height;
int servscreen_xoffset;
int servscreen_yoffset;
UINT32 screenID;
UINT32 virtscreen_width;
UINT32 virtscreen_height;
UINT32 servscreen_width;
UINT32 servscreen_height;
UINT32 servscreen_xoffset;
UINT32 servscreen_yoffset;
//int frame_idx;
int bitsPerPixel;

View File

@ -133,7 +133,7 @@ int mf_mlion_display_info(UINT32* disp_width, UINT32* disp_height, UINT32* scale
CGDisplayModeRef mode = CGDisplayCopyDisplayMode(display_id);
size_t pixelWidth = CGDisplayModeGetPixelWidth(mode);
size_t pixelHeight = CGDisplayModeGetPixelHeight(mode);
//size_t pixelHeight = CGDisplayModeGetPixelHeight(mode);
size_t wide = CGDisplayPixelsWide(display_id);
size_t high = CGDisplayPixelsHigh(display_id);

View File

@ -191,9 +191,10 @@ void mf_peer_context_new(freerdp_peer* client, mfPeerContext* context)
context->rfx_context->width = client->settings->DesktopWidth;
context->rfx_context->height = client->settings->DesktopHeight;
rfx_context_set_pixel_format(context->rfx_context, RDP_PIXEL_FORMAT_B8G8R8A8);
rfx_context_set_cpu_opt(context->rfx_context, CPU_SSE2);
context->nsc_context = nsc_context_new();
nsc_context_set_pixel_format(context->nsc_context, RDP_PIXEL_FORMAT_B8G8R8A8);
//context->nsc_context = nsc_context_new();
//nsc_context_set_pixel_format(context->nsc_context, RDP_PIXEL_FORMAT_B8G8R8A8);
context->s = stream_new(0xFFFF);
@ -217,7 +218,7 @@ void mf_peer_context_free(freerdp_peer* client, mfPeerContext* context)
stream_free(context->s);
rfx_context_free(context->rfx_context);
nsc_context_free(context->nsc_context);
//nsc_context_free(context->nsc_context);
#ifdef CHANNEL_AUDIN_SERVER
if (context->audin)
@ -251,7 +252,7 @@ void mf_peer_init(freerdp_peer* client)
if(info_timer)
{
//printf("created timer\n");
dispatch_source_set_timer(info_timer, DISPATCH_TIME_NOW, 41ull * NSEC_PER_MSEC, 100ull * NSEC_PER_MSEC);
dispatch_source_set_timer(info_timer, DISPATCH_TIME_NOW, 33ull * NSEC_PER_MSEC, 100ull * NSEC_PER_MSEC);
dispatch_source_set_event_handler(info_timer, ^{
//printf("dispatch\n");
mfEvent* event = mf_event_new(MF_EVENT_TYPE_FRAME_TICK);
@ -394,7 +395,7 @@ void mf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT1
//printf("Client sent an extended mouse event (flags:0x%04X pos: %d,%d)\n", flags, x, y);
}
static void mf_peer_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_16* areas)
/*static void mf_peer_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_16* areas)
{
BYTE i;
@ -404,7 +405,7 @@ static void mf_peer_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_16*
{
printf(" (%d, %d) (%d, %d)\n", areas[i].left, areas[i].top, areas[i].right, areas[i].bottom);
}
}
}*/
static void mf_peer_suppress_output(rdpContext* context, BYTE allow, RECTANGLE_16* area)
{
@ -511,7 +512,7 @@ void* mf_peer_main_loop(void* arg)
client->settings->NlaSecurity = FALSE;
client->settings->RemoteFxCodec = TRUE;
client->settings->SuppressOutput = TRUE;
client->settings->RefreshRect = TRUE;
client->settings->RefreshRect = FALSE;
client->PostConnect = mf_peer_post_connect;
client->Activate = mf_peer_activate;
@ -522,7 +523,7 @@ void* mf_peer_main_loop(void* arg)
client->input->MouseEvent = mf_peer_mouse_event;
client->input->ExtendedMouseEvent = mf_peer_extended_mouse_event;
client->update->RefreshRect = mf_peer_refresh_rect;
//client->update->RefreshRect = mf_peer_refresh_rect;
client->update->SuppressOutput = mf_peer_suppress_output;
client->Initialize(client);