From 21aad643f3fc5b85d38f10f1b1ea4389c92f4258 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 28 Jan 2019 21:26:01 -0800 Subject: [PATCH] Use 32 pixel alignment for HEVC to fix Intel green line issue --- app/streaming/video/ffmpeg-renderers/dxva2.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/dxva2.cpp b/app/streaming/video/ffmpeg-renderers/dxva2.cpp index 35ca49de..2ac67014 100644 --- a/app/streaming/video/ffmpeg-renderers/dxva2.cpp +++ b/app/streaming/video/ffmpeg-renderers/dxva2.cpp @@ -671,9 +671,13 @@ bool DXVA2Renderer::initialize(SDL_Window* window, int videoFormat, int width, i int alignment; - // HEVC using DXVA requires 128B alignment + // HEVC using DXVA requires 128 pixel alignment, however Intel GPUs decoding HEVC + // using StretchRect() to render draw a translucent green line at the top of + // the screen in full-screen mode at 720p/1080p unless we use 32 pixel alignment. + // This appears to work without issues on AMD and Nvidia GPUs too, so we will + // do it unconditionally for now. if (m_VideoFormat & VIDEO_FORMAT_MASK_H265) { - alignment = 128; + alignment = 32; } else { alignment = 16;