From: Yuxuan Shui <yshui@codeweavers.com> Now both wg_parser and wg_transform uses a 2-byte alignment for YV12/NV12/I420 strides, we can update wg_format_get_stride to report the correct strides for these formats. --- dlls/mfreadwrite/tests/mfplat.c | 6 +++--- dlls/winegstreamer/main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c index 82ade919670..c1f4d8213e4 100644 --- a/dlls/mfreadwrite/tests/mfplat.c +++ b/dlls/mfreadwrite/tests/mfplat.c @@ -2126,7 +2126,7 @@ static void test_source_reader_stride(void) ok(IsEqualGUID(&subtype, &MFVideoFormat_NV12), "Got subtype %s.\n", debugstr_guid(&subtype)); hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_DEFAULT_STRIDE, &stride); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(stride == 162, "Got stride %u.\n", stride); + ok(stride == 162, "Got stride %u.\n", stride); compressed = 0; hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_COMPRESSED, &compressed); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -2154,7 +2154,7 @@ static void test_source_reader_stride(void) ok(IsEqualGUID(&subtype, &MFVideoFormat_YV12), "Got subtype %s.\n", debugstr_guid(&subtype)); hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_DEFAULT_STRIDE, &stride); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(stride == 162, "Got stride %u.\n", stride); + ok(stride == 162, "Got stride %u.\n", stride); compressed = 0; hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_COMPRESSED, &compressed); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -2182,7 +2182,7 @@ static void test_source_reader_stride(void) ok(IsEqualGUID(&subtype, &MFVideoFormat_I420), "Got subtype %s.\n", debugstr_guid(&subtype)); hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_DEFAULT_STRIDE, &stride); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(stride == 162, "Got stride %u.\n", stride); + ok(stride == 162, "Got stride %u.\n", stride); compressed = 0; hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_COMPRESSED, &compressed); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index c7893f71026..24814c138b2 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -860,7 +860,7 @@ unsigned int wg_format_get_stride(const struct wg_format *format) case WG_VIDEO_FORMAT_I420: case WG_VIDEO_FORMAT_NV12: case WG_VIDEO_FORMAT_YV12: - return ALIGN(width, 4); /* Y plane */ + return ALIGN(width, 2); /* Y plane */ case WG_VIDEO_FORMAT_UNKNOWN: FIXME("Cannot calculate stride for unknown video format.\n"); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10654