Fixed progressive decoding.
This commit is contained in:
parent
1608799522
commit
2594262ed4
@ -1577,14 +1577,8 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
|
|||||||
UINT32 offset = 0;
|
UINT32 offset = 0;
|
||||||
RFX_RECT* rect = NULL;
|
RFX_RECT* rect = NULL;
|
||||||
REGION16 clippingRects, updateRegion;
|
REGION16 clippingRects, updateRegion;
|
||||||
PROGRESSIVE_BLOCK_SYNC sync;
|
|
||||||
PROGRESSIVE_BLOCK_REGION* region;
|
|
||||||
PROGRESSIVE_BLOCK_CONTEXT context;
|
|
||||||
PROGRESSIVE_BLOCK_FRAME_BEGIN frameBegin;
|
|
||||||
PROGRESSIVE_BLOCK_FRAME_END frameEnd;
|
|
||||||
PROGRESSIVE_SURFACE_CONTEXT* surface;
|
PROGRESSIVE_SURFACE_CONTEXT* surface;
|
||||||
RFX_COMPONENT_CODEC_QUANT* quantVal;
|
PROGRESSIVE_BLOCK_REGION* region;
|
||||||
RFX_PROGRESSIVE_CODEC_QUANT* quantProgVal;
|
|
||||||
progressive->invert = FREERDP_PIXEL_FORMAT_IS_ABGR(DstFormat) ? TRUE : FALSE;
|
progressive->invert = FREERDP_PIXEL_FORMAT_IS_ABGR(DstFormat) ? TRUE : FALSE;
|
||||||
surface = (PROGRESSIVE_SURFACE_CONTEXT*) progressive_get_surface_data(
|
surface = (PROGRESSIVE_SURFACE_CONTEXT*) progressive_get_surface_data(
|
||||||
progressive, surfaceId);
|
progressive, surfaceId);
|
||||||
@ -1598,6 +1592,12 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
|
|||||||
|
|
||||||
while ((blocksLen - offset) >= 6)
|
while ((blocksLen - offset) >= 6)
|
||||||
{
|
{
|
||||||
|
PROGRESSIVE_BLOCK_SYNC sync;
|
||||||
|
PROGRESSIVE_BLOCK_CONTEXT context;
|
||||||
|
PROGRESSIVE_BLOCK_FRAME_BEGIN frameBegin;
|
||||||
|
PROGRESSIVE_BLOCK_FRAME_END frameEnd;
|
||||||
|
RFX_COMPONENT_CODEC_QUANT* quantVal;
|
||||||
|
RFX_PROGRESSIVE_CODEC_QUANT* quantProgVal;
|
||||||
boffset = 0;
|
boffset = 0;
|
||||||
block = &blocks[offset];
|
block = &blocks[offset];
|
||||||
blockType = *((UINT16*) &block[boffset + 0]); /* blockType (2 bytes) */
|
blockType = *((UINT16*) &block[boffset + 0]); /* blockType (2 bytes) */
|
||||||
@ -1896,7 +1896,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
|
|||||||
for (i = 0; i < region->numRects; i++)
|
for (i = 0; i < region->numRects; i++)
|
||||||
{
|
{
|
||||||
RECTANGLE_16 clippingRect;
|
RECTANGLE_16 clippingRect;
|
||||||
RFX_RECT* rect = &(region->rects[i]);
|
const RFX_RECT* rect = &(region->rects[i]);
|
||||||
clippingRect.left = nXDst + rect->x;
|
clippingRect.left = nXDst + rect->x;
|
||||||
clippingRect.top = nYDst + rect->y;
|
clippingRect.top = nYDst + rect->y;
|
||||||
clippingRect.right = clippingRect.left + rect->width;
|
clippingRect.right = clippingRect.left + rect->width;
|
||||||
@ -1920,15 +1920,16 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
|
|||||||
|
|
||||||
for (j = 0; j < nbUpdateRects; j++)
|
for (j = 0; j < nbUpdateRects; j++)
|
||||||
{
|
{
|
||||||
UINT32 nXSrc;
|
const RECTANGLE_16* rect = &updateRects[j];
|
||||||
UINT32 nYSrc;
|
const UINT32 nXSrc = rect->left - (nXDst + tile->x);
|
||||||
nWidth = updateRects[j].right - updateRects[j].left;
|
const UINT32 nYSrc = rect->top - (nYDst + tile->y);
|
||||||
nHeight = updateRects[j].bottom - updateRects[j].top;
|
const UINT32 width = rect->right - rect->left;
|
||||||
nXSrc = updateRects[j].left - (nXDst + tile->x);
|
const UINT32 height = rect->bottom - rect->top;
|
||||||
nYSrc = updateRects[j].top - (nYDst + tile->y);
|
|
||||||
|
|
||||||
if (!freerdp_image_copy(pDstData, DstFormat, nDstStep, nXDst, nYDst,
|
if (!freerdp_image_copy(pDstData, DstFormat, nDstStep,
|
||||||
nWidth, nHeight, tile->data, PIXEL_FORMAT_XRGB32,
|
rect->left, rect->top,
|
||||||
|
width, height,
|
||||||
|
tile->data, PIXEL_FORMAT_BGRX32,
|
||||||
64 * 4, nXSrc, nYSrc, NULL))
|
64 * 4, nXSrc, nYSrc, NULL))
|
||||||
{
|
{
|
||||||
rc = -42;
|
rc = -42;
|
||||||
|
Loading…
Reference in New Issue
Block a user