Commit fcb8edee authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard

mfplat/buffer: Fix the image copy function for IMC2/IMC4 buffers with odd height.

parent 496073d5
......@@ -100,8 +100,7 @@ static void copy_image_imc1(BYTE *dest, LONG dest_stride, const BYTE *src, LONG
static void copy_image_imc2(BYTE *dest, LONG dest_stride, const BYTE *src, LONG src_stride, DWORD width, DWORD lines)
{
MFCopyImage(dest, dest_stride, src, src_stride, width / 2, lines / 2);
MFCopyImage(dest + dest_stride / 2, dest_stride, src + src_stride / 2, src_stride, width / 2, lines / 2);
MFCopyImage(dest, dest_stride / 2, src, src_stride / 2, width / 2, lines);
}
static inline struct buffer *impl_from_IMFMediaBuffer(IMFMediaBuffer *iface)
......
......@@ -6073,7 +6073,6 @@ static void test_MFCreate2DMediaBuffer(void)
case MAKEFOURCC('I','M','C','4'):
for (j = 0; j < ptr->height; j++)
for (k = 0; k < stride / 2; k++)
todo_wine_if(ptr->height % 2 == 1 && j >= 2)
ok(data[j * (pitch / 2) + k] == (((j + ptr->height) % 16) << 4) + (k % 16),
"Unexpected byte %02x instead of %02x at test %d row %d column %d.\n",
data[j * (pitch / 2) + k], (((j + ptr->height) % 16) << 4) + (k % 16), i, j + ptr->height, k);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment