mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix V4L2 BGR24 handling (#1748)
This commit is contained in:
parent
8c303c8b9c
commit
897e4aac8a
@ -54,7 +54,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(ControlIDPropertyMap, _controlIDPropertyMap, (initCont
|
||||
static PixelFormat GetPixelFormat(const unsigned int format)
|
||||
{
|
||||
if (format == V4L2_PIX_FMT_RGB32) return PixelFormat::RGB32;
|
||||
if (format == V4L2_PIX_FMT_RGB24) return PixelFormat::BGR24;
|
||||
if (format == V4L2_PIX_FMT_BGR24) return PixelFormat::BGR24;
|
||||
if (format == V4L2_PIX_FMT_YUYV) return PixelFormat::YUYV;
|
||||
if (format == V4L2_PIX_FMT_UYVY) return PixelFormat::UYVY;
|
||||
if (format == V4L2_PIX_FMT_NV12) return PixelFormat::NV12;
|
||||
@ -558,7 +558,7 @@ void V4L2Grabber::init_device(VideoStandard videoStandard)
|
||||
break;
|
||||
|
||||
case PixelFormat::BGR24:
|
||||
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24;
|
||||
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_BGR24;
|
||||
break;
|
||||
|
||||
case PixelFormat::YUYV:
|
||||
@ -691,7 +691,7 @@ void V4L2Grabber::init_device(VideoStandard videoStandard)
|
||||
}
|
||||
break;
|
||||
|
||||
case V4L2_PIX_FMT_RGB24:
|
||||
case V4L2_PIX_FMT_BGR24:
|
||||
{
|
||||
_pixelFormat = PixelFormat::BGR24;
|
||||
_frameByteSize = _width * _height * 3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user