[vlc-devel] [PATCH] wingdi: use a better stretch mode

Steve Lhomme robux4 at ycbcr.xyz
Tue Apr 30 10:38:10 CEST 2019


This gives a much better picture quality.

If the call fails (COLORONCOLOR not supported) this has no effect and the old
ugly stretch mode is used.
---
 modules/video_output/win32/wingdi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index 1e41500294..8403fa935c 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -170,6 +170,8 @@ static void Display(vout_display_t *vd, picture_t *picture)
 
     if (sys->area.place.width  != vd->source.i_visible_width ||
         sys->area.place.height != vd->source.i_visible_height) {
+        SetStretchBltMode(hdc, COLORONCOLOR);
+
         StretchBlt(hdc, sys->area.place.x, sys->area.place.y,
                    sys->area.place.width, sys->area.place.height,
                    sys->off_dc,
-- 
2.17.1



More information about the vlc-devel mailing list