[PATCH 3/3] winegstreamer: Use videobox to align and padd NV12 video buffers.
Rémi Bernon
rbernon at codeweavers.com
Wed Oct 27 10:04:16 CDT 2021
Native MF aligns the NV12 planes on 16 pixels, and Greedfall expects it.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/winegstreamer/wg_parser.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index a3b88529c60..4cadf87ccd0 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -605,6 +605,7 @@ static NTSTATUS wg_parser_stream_enable(void *args)
const struct wg_parser_stream_enable_params *params = args;
struct wg_parser_stream *stream = params->stream;
const struct wg_format *format = params->format;
+ uint32_t aligned_height;
stream->current_format = *format;
stream->enabled = true;
@@ -621,9 +622,14 @@ static NTSTATUS wg_parser_stream_enable(void *args)
gst_util_set_object_arg(G_OBJECT(stream->flip), "method", "vertical-flip");
break;
+ case WG_VIDEO_FORMAT_NV12:
+ aligned_height = (stream->current_format.u.video.height + 0xf) & ~0xf;
+ g_object_set(G_OBJECT(stream->videobox), "bottom",
+ stream->current_format.u.video.height - aligned_height, NULL);
+ stream->current_format.u.video.height = aligned_height;
+ /* fallthrough */
case WG_VIDEO_FORMAT_AYUV:
case WG_VIDEO_FORMAT_I420:
- case WG_VIDEO_FORMAT_NV12:
case WG_VIDEO_FORMAT_UYVY:
case WG_VIDEO_FORMAT_YUY2:
case WG_VIDEO_FORMAT_YV12:
--
2.33.0
More information about the wine-devel
mailing list