From 387fa0201a942ccabd2de0fe9091f25efa13731d Mon Sep 17 00:00:00 2001 From: eduar-hte <130087371+eduar-hte@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:08:18 +0000 Subject: [PATCH] [codec,yuv] Align width and height for AVC444 decoding to 32 - Windows seems to be aligning to 32 in current versions of RDP, which can be noticed in non-standard resolutions (that are not multiple of 32 after aligning to 16). - 16-byte alignment was initially introduced in commit 8adc2ba --- libfreerdp/codec/yuv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreerdp/codec/yuv.c b/libfreerdp/codec/yuv.c index 0fb099e89..e23b1ae28 100644 --- a/libfreerdp/codec/yuv.c +++ b/libfreerdp/codec/yuv.c @@ -479,7 +479,7 @@ static void CALLBACK yuv444_combine_work_callback(PTP_CALLBACK_INSTANCE instance const RECTANGLE_16* rect = ¶m->rect; WINPR_ASSERT(rect); - const UINT32 alignedWidth = yuv->width + ((yuv->width % 16 != 0) ? 16 - yuv->width % 16 : 0); + const UINT32 alignedWidth = yuv->width + ((yuv->width % 32 != 0) ? 32 - yuv->width % 32 : 0); const UINT32 alignedHeight = yuv->height + ((yuv->height % 16 != 0) ? 16 - yuv->height % 16 : 0);