[vlc-commits] [Git][videolan/vlc][master] wingdi: use the default mask
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Mon Aug 28 17:03:42 UTC 2023
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
c94ec24e by Steve Lhomme at 2023-08-28T15:39:10+00:00
wingdi: use the default mask
This will use the same masks as we did, but it's better to explicitly say we
use the default masks.
- - - - -
1 changed file:
- modules/video_output/win32/wingdi.c
Changes:
=====================================
modules/video_output/win32/wingdi.c
=====================================
@@ -268,21 +268,12 @@ static int Init(vout_display_t *vd, video_format_t *fmt)
break;
case 15:
fmt->i_chroma = VLC_CODEC_RGB15;
- fmt->i_rmask = 0x7c00;
- fmt->i_gmask = 0x03e0;
- fmt->i_bmask = 0x001f;
break;
case 16:
fmt->i_chroma = VLC_CODEC_RGB16;
- fmt->i_rmask = 0xf800;
- fmt->i_gmask = 0x07e0;
- fmt->i_bmask = 0x001f;
break;
case 24:
fmt->i_chroma = VLC_CODEC_RGB24;
- fmt->i_rmask = 0x00ff0000;
- fmt->i_gmask = 0x0000ff00;
- fmt->i_bmask = 0x000000ff;
break;
case 32: // BGRX
fmt->i_chroma = VLC_CODEC_BGRA;
@@ -292,6 +283,10 @@ static int Init(vout_display_t *vd, video_format_t *fmt)
ReleaseDC(CommonVideoHWND(&sys->area), window_dc);
return VLC_EGENERIC;
}
+ fmt->i_rmask = 0;
+ fmt->i_gmask = 0;
+ fmt->i_bmask = 0;
+ video_format_FixRgb(fmt);
/* Initialize offscreen bitmap */
sys->bmiInfo.bmiHeader = (BITMAPINFOHEADER) {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c94ec24e78a616c6f967b9a50d3bae8deabab262
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c94ec24e78a616c6f967b9a50d3bae8deabab262
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list