Commits on Source (3)
-
Steve Lhomme authored
We pick the input format, so we can use BI_RGB for each of them and set the proper mask to use on input. 8-bit RGB is supposed to use a palette so was already broken. 16-bit is actually using 15 bits [1] [2]: > If the biCompression member of the BITMAPHEADER 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/previous-versions/dd183376(v=vs.85) [2] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapv5header
0685aff0 -
Steve Lhomme authored
GetDeviceCaps(BITSPIXEL) doesn't differentiate between 15 and 16 bit depth and returns 16 [1]. It's OK because we use the same mask for both as BI_RGB is only using 15 bits for 16 bits. [1] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-getdevicecaps#return-value
bd25a5bc -
Steve Lhomme authored
VLC_CODEC_BGRA is supported but the alpha is discarded. Since we will most likely use a converter between the decoder and our display module, it's better not to request a fake alpha component. We allow keeping VLC_CODEC_BGRA if that's what the source provides.
4ea5d3b9