#define TAG FREERDP_TAG("codec")
+#define ALIGN(val, align) ((val) % (align) == 0) ? (val) : ((val) + (align) - (val) % (align))
+
static INLINE UINT32 planar_invert_format(BITMAP_PLANAR_CONTEXT* planar, BOOL alpha,
UINT32 DstFormat)
{
return FALSE;
context->bgr = FALSE;
- context->maxWidth = width;
- context->maxHeight = height;
+ context->maxWidth = ALIGN(width, 4);
+ context->maxHeight = ALIGN(height, 4);
context->maxPlaneSize = context->maxWidth * context->maxHeight;
context->nTempStep = context->maxWidth * 4;
free(context->planesBuffer);