File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020- Linux: New DRM/KMS screen grabber with plane-based capture - not feature complete yet
2121- Logging/Tracing: Introduced qlogging categories to enable dynamic tracing
2222- Home Assistant: Dynamically set brightness for higher dynamic range (#1922 )
23+ - Add DRM_FORMAT_RGB565 format to DRM frame grabber
2324
2425---
2526
Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ static PixelFormat GetPixelFormatForDrmFormat(uint32_t format)
119119{
120120 switch (format)
121121 {
122+ #ifdef DRM_FORMAT_RGB565
123+ case DRM_FORMAT_RGB565: return PixelFormat::BGR16;
124+ #endif
122125 case DRM_FORMAT_XRGB8888: return PixelFormat::BGR32;
123126 case DRM_FORMAT_ARGB8888: return PixelFormat::BGR32;
124127 case DRM_FORMAT_XBGR8888: return PixelFormat::RGB32;
@@ -258,6 +261,11 @@ static bool processLinearFramebuffer(const LinearFramebufferParams& params)
258261 lineLength = params.w * 2 ; // 16bpp luma
259262 }
260263#endif
264+ else if (params.pixelFormat == PixelFormat::BGR16)
265+ {
266+ size = params.w * params.h * 2 ;
267+ lineLength = params.w * 2 ;
268+ }
261269 else if (params.pixelFormat == PixelFormat::RGB32 || params.pixelFormat == PixelFormat::BGR32)
262270 {
263271 size = params.w * params.h * 4 ;
You can’t perform that action at this time.
0 commit comments