mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 08:54:38 +09:00
Fix rounding error in progressive codec
The grid is composed of 64x64 blocks and should not be smaller than the surface. If width or height were not a multiple of 64 the previous rounding resulted in a grid smaller than the surface.
This commit is contained in:
@@ -262,8 +262,8 @@ PROGRESSIVE_SURFACE_CONTEXT* progressive_surface_context_new(UINT16 surfaceId, U
|
||||
surface->id = surfaceId;
|
||||
surface->width = width;
|
||||
surface->height = height;
|
||||
surface->gridWidth = (width + (width % 64)) / 64;
|
||||
surface->gridHeight = (height + (height % 64)) / 64;
|
||||
surface->gridWidth = (width + (64 - width % 64)) / 64;
|
||||
surface->gridHeight = (height + (64 - height % 64)) / 64;
|
||||
surface->gridSize = surface->gridWidth * surface->gridHeight;
|
||||
|
||||
surface->tiles = (RFX_PROGRESSIVE_TILE*) calloc(surface->gridSize, sizeof(RFX_PROGRESSIVE_TILE));
|
||||
|
||||
Reference in New Issue
Block a user