[vlc-commits] [Git][videolan/vlc][master] wingdi: request BGRA for 32 bits display
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Aug 19 12:24:56 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
4cbe9814 by Steve Lhomme at 2023-08-19T07:16:51+00:00
wingdi: request BGRA for 32 bits display
In 32 bits we don't use the mask in the DC (BI_RGB [1]) so we don't need to
rely on a matching mask on input either.
The alpha byte of each pixel will be ignored.
It is more efficient and safe from a mask manipulation.
[1] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader
- - - - -
1 changed file:
- modules/video_output/win32/wingdi.c
Changes:
=====================================
modules/video_output/win32/wingdi.c
=====================================
@@ -276,11 +276,8 @@ static int Init(vout_display_t *vd, video_format_t *fmt)
fmt->i_gmask = 0x0000ff00;
fmt->i_bmask = 0x000000ff;
break;
- case 32:
- fmt->i_chroma = VLC_CODEC_RGB32;
- fmt->i_rmask = 0x00ff0000;
- fmt->i_gmask = 0x0000ff00;
- fmt->i_bmask = 0x000000ff;
+ case 32: // BGRX
+ fmt->i_chroma = VLC_CODEC_BGRA;
break;
default:
msg_Err(vd, "screen depth %i not supported", i_depth);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4cbe98144de90e1b6a379668fc637d918ab9752c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4cbe98144de90e1b6a379668fc637d918ab9752c
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