From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=kln1E11L; spf=pass (domain: outlook.com, ip: 40.92.66.100, mailfrom: marvin.haeuser@outlook.com) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.92.66.100]) by groups.io with SMTP; Tue, 24 Sep 2019 05:46:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lIaxdlcTr1OEsv6FsDBq2VsxFu8PpuJndkU8FKYs1vkY7Fxb2IGr5cRTYFJMrZgS5tgaasLuV7f6+rklD6flcYom0NTkFeSJH83E6+F33TeLok84pa3uH8mxI8y/bJxGMTI4vJNqlZdGoZYpkXwh7qa7kN5mEM/HorR7ilRQ3Y2GMP4/I7YCmnqW8+xdgnKEIDJGq2MftlO7AuXKYU8T4GXlkbgL8WEG02fjQZ5T78+B6jw796PXu7PPwXMe+udf9ExZvyRNPH25WMExk9nUso9soWXOGsUUVphciuiqL6bKXEbr+oKGylxykH5K6J+qlzSaX9XZ02aQ/EGKhwdyug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UPc2PQSPtb0DW5YlQw9IIrbIGIyZ4WQEsNX05OC5GEI=; b=gq5JkhFfmk9b8wkzmOVHjbTHwmVfESRPtKFQR31e+nKQwcV0DjwT1DPrQMaVR+sQInc1KwkkrgfR1BOGirdQ4bUMEKgwiGY5xdKyjn/9fhpnc9nMYkqp5yivc2ckEZY1bdj2BS6UTZy8a3al4MTUsZdkkD9v0XYZs5yc4ipSuZpBJFlQQ4ILVXIYKBYiCrnhY58ATdKif/27FgkIbeoIaT1rKFvEcTtF3inJURTbxNpOkK24xVQusBjPgMq4XqXgMswyt6YU7RP6unvlYRd/9RgV6nQvYkhL+v8+S/7MI/7TAxiZgb6Io8JHivxbOqhQxrdSVRm9aYALBxSYxWEwfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UPc2PQSPtb0DW5YlQw9IIrbIGIyZ4WQEsNX05OC5GEI=; b=kln1E11LJkV13XXZh/ENjNEZ0EuwbmRSYzxQMJOB0fNL9g7/Y+049EWOMHBGuK3QgZZWwsk9XTZSiNzxVIEViSyQp5+dweloquY7jd+WCaScKXlDVFxIWi2iuawhQDnm33AL5Qagr0UpKSlnLL5CYu6bsNX3dQXcrDOcN2Hfk/wlSX28jtlv7DaYXOjCDS0DIwbTo3Cl7xsscpohtKPctP/tk8+KB3q2Ttj29TFKRsHk0/Gye0zLwRusYLSDiQk24Q6ipWBdmSJQhTes9dk/BCS7K4bnm11AnlnJw9bS02C3I02QT0DRDrcD8G/sugij0o8bp///k3eplutBOIYYLw== Received: from DB5EUR01FT038.eop-EUR01.prod.protection.outlook.com (10.152.4.60) by DB5EUR01HT180.eop-EUR01.prod.protection.outlook.com (10.152.4.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2284.20; Tue, 24 Sep 2019 12:46:14 +0000 Received: from AM0PR07MB4386.eurprd07.prod.outlook.com (10.152.4.60) by DB5EUR01FT038.mail.protection.outlook.com (10.152.4.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.20 via Frontend Transport; Tue, 24 Sep 2019 12:46:14 +0000 Received: from AM0PR07MB4386.eurprd07.prod.outlook.com ([fe80::6056:53c8:6f16:3d8]) by AM0PR07MB4386.eurprd07.prod.outlook.com ([fe80::6056:53c8:6f16:3d8%3]) with mapi id 15.20.2305.013; Tue, 24 Sep 2019 12:46:14 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "devel@edk2.groups.io" CC: Jian J Wang , Hao A Wu Subject: [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider SourceX Thread-Topic: [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider SourceX Thread-Index: AQHVctYMgCwkp9D70UqlPjNJoZy/TA== Date: Tue, 24 Sep 2019 12:46:14 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR1PR01CA0027.eurprd01.prod.exchangelabs.com (2603:10a6:102::40) To AM0PR07MB4386.eurprd07.prod.outlook.com (2603:10a6:208:b3::11) x-incomingtopheadermarker: OriginalChecksum:F470255280D74CC8D02B9933DE45D0A1DD32B05B744D129429D6608FF94C41BC;UpperCasedChecksum:BAA843AA5CA0920CC34F8074361A26B0EA3A6928A9270262E1DF6A2DF515BECA;SizeAsReceived:7500;Count:49 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.23.0.windows.1 x-tmn: [jDcEqOdkcYubuGMn8uRrZT0ICSdMcbEA] x-microsoft-original-message-id: x-ms-publictraffictype: Email x-incomingheadercount: 49 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(5050001)(7020095)(20181119205)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(2017031321001)(1601125500)(1603101475)(1701031045);SRVR:DB5EUR01HT180; x-ms-traffictypediagnostic: DB5EUR01HT180: x-microsoft-antispam-message-info: t5H1DXZmjwN+wpVt54ACs57AADkq7BN9QSTUnUMo0JV7pJVhttXDV2ke3MtpjJihPzPJD9Rqqa9/ML668t5eE/HB+8RM9eJDcYhq0B/HJqlDdGnZ4aRrCx8mwH4pBxsAO9r+ryJBjmJzbiL6kWHVTeYHiViVz7gOPYDojhWVTsfkudpP0qUO+Uye+E2vSdK3 x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: aac13800-6475-44f0-c474-08d740ed2efe X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Sep 2019 12:46:14.1476 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR01HT180 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable From: Marvin Haeuser Currently, SourceX is not considered in the BufferToVideo operation when the 8-bit pixel format is used. Correctly add the resulting offset to prevent image corruption. Cc: Jian J Wang Cc: Hao A Wu Signed-off-by: Marvin Haeuser --- MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/M= deModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c index 47c5326e9958..a084cc81d32e 100644 --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c @@ -504,7 +504,7 @@ FrameBufferBltLibBufferToVideo ( Destination =3D Configure->FrameBuffer + Offset;=0D =0D if (Configure->PixelFormat =3D=3D PixelBlueGreenRedReserved8BitPerColo= r) {=0D - Source =3D (UINT8 *) BltBuffer + (SrcY * Delta);=0D + Source =3D (UINT8 *) BltBuffer + (SrcY * Delta) + (SourceX * sizeof = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));=0D } else {=0D for (IndexX =3D 0; IndexX < Width; IndexX++) {=0D Blt =3D=0D --=20 2.23.0.windows.1