Merge pull request #10714 from akallabeth/sse-fix

[primitives,sse] fix a bug in sse4.1 primitives copy
This commit is contained in:
Martin Fleisz 2024-10-08 12:31:56 +02:00 committed by GitHub
commit 25c281818a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -172,6 +172,7 @@ static void requested_format_free(RequestedFormat** ppRequestedFormat)
return;
free((*ppRequestedFormat)->formatName);
free(*ppRequestedFormat);
*ppRequestedFormat = NULL;
}

View File

@ -201,13 +201,13 @@ pstatus_t sse_image_copy_no_overlap_convert(
WINPR_PRAGMA_UNROLL_LOOP
for (; x < width; x++)
{
const UINT32 color = FreeRDPReadColor(&srcLine[(x + nXSrc) * srcByte], SrcFormat);
const UINT32 color = FreeRDPReadColor_int(&srcLine[(x + nXSrc) * srcByte], SrcFormat);
const UINT32 dstColor = FreeRDPConvertColor(color, SrcFormat, DstFormat, palette);
FreeRDPWriteColor_int(&dstLine[(x + nXDst) * dstByte], DstFormat, dstColor);
}
for (; x < nWidth; x++)
{
const UINT32 color = FreeRDPReadColor(&srcLine[(x + nXSrc) * srcByte], SrcFormat);
const UINT32 color = FreeRDPReadColor_int(&srcLine[(x + nXSrc) * srcByte], SrcFormat);
const UINT32 dstColor = FreeRDPConvertColor(color, SrcFormat, DstFormat, palette);
FreeRDPWriteColor_int(&dstLine[(x + nXDst) * dstByte], DstFormat, dstColor);
}