[vlc-commits] [Git][videolan/vlc][master] screen/win32: remove 15-bit case

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Sep 15 12:30:17 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
5964ac1b by Steve Lhomme at 2023-09-15T12:05:45+00:00
screen/win32: remove 15-bit case

We can't detect it with BITSPIXEL according to [1]:

> When nIndex is BITSPIXEL and the device has 15bpp or 16bpp, the return value is 16.

And as the comment says, the "bitmap" format is really 15 bits, just as
in BITMAPV5HEADER [2]:

> If the bV5Compression member of the BITMAPV5HEADER structure is BI_RGB,
> the bmiColors member of BITMAPINFO is NULL. Each WORD in the bitmap
> array represents a single pixel. The relative intensities of red, green, and
> blue are represented with five bits for each color component. The value
> for blue is in the least significant five bits, followed by five bits each for
> green and red. The most significant bit is not used.

[1] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-getdevicecaps#return-value
[2] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapv5header

- - - - -


1 changed file:

- modules/access/screen/win32.c


Changes:

=====================================
modules/access/screen/win32.c
=====================================
@@ -129,7 +129,6 @@ int screen_InitCaptureGDI( demux_t *p_demux )
     {
     case 8: /* FIXME: set the palette */
         i_chroma = VLC_CODEC_RGB233; break;
-    case 15:
     case 16:    /* Yes it is really 15 bits (when using BI_RGB) */
         i_chroma = VLC_CODEC_RGB15; break;
     case 24:



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5964ac1b8adee2d3c99bea62009fc83fce525fc4

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5964ac1b8adee2d3c99bea62009fc83fce525fc4
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