libfreerdp-codec: avoid intermediate copy with planar egfx

This commit is contained in:
Marc-André Moreau 2014-06-19 13:55:34 -04:00
parent 57b0e4d010
commit 160a3c4b61
2 changed files with 5 additions and 8 deletions

View File

@ -303,13 +303,10 @@ int xf_SurfaceCommand_Planar(xfContext* xfc, RdpgfxClientContext* context, RDPGF
if (!surface)
return -1;
DstData = surface->data;
status = planar_decompress(NULL, cmd->data, cmd->length, &DstData,
PIXEL_FORMAT_XRGB32, cmd->width * 4, 0, 0, cmd->width, cmd->height);
freerdp_image_copy(surface->data, PIXEL_FORMAT_XRGB32, surface->scanline, cmd->left, cmd->top,
cmd->width, cmd->height, DstData, PIXEL_FORMAT_XRGB32, cmd->width * 4, 0, 0);
free(DstData);
PIXEL_FORMAT_XRGB32, surface->scanline, cmd->left, cmd->top, cmd->width, cmd->height);
invalidRect.left = cmd->left;
invalidRect.top = cmd->top;

View File

@ -62,7 +62,7 @@ static int planar_decompress_plane_rle(BYTE* pSrcData, UINT32 SrcSize, BYTE* pDs
for (y = beg; y != end; y += inc)
{
dstp = &pDstData[(y * nDstStep) + nChannel];
dstp = &pDstData[((nYDst + y) * nDstStep) + (nXDst * 4) + nChannel];
pixel = 0;
currentScanline = dstp;
@ -189,7 +189,7 @@ static int planar_decompress_plane_raw(BYTE* pSrcData, UINT32 SrcSize, BYTE* pDs
for (y = beg; y != end; y += inc)
{
dstp = &pDstData[(y * nDstStep) + nChannel];
dstp = &pDstData[((nYDst + y) * nDstStep) + (nXDst * 4) + nChannel];
for (x = 0; x < nWidth; x++)
{