From 9f0a8b930fd8eead931fbf36c754bb9f505d7c01 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 23 Nov 2022 22:15:56 -0800 Subject: [PATCH] [cscore] Use MFVideoFormat_L8 for Gray on Windows (#4701) --- cscore/src/main/native/windows/UsbCameraImpl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cscore/src/main/native/windows/UsbCameraImpl.cpp b/cscore/src/main/native/windows/UsbCameraImpl.cpp index c291212c01..016ea77f38 100644 --- a/cscore/src/main/native/windows/UsbCameraImpl.cpp +++ b/cscore/src/main/native/windows/UsbCameraImpl.cpp @@ -467,8 +467,7 @@ LRESULT UsbCameraImpl::PumpMain(HWND hwnd, UINT uiMsg, WPARAM wParam, static cs::VideoMode::PixelFormat GetFromGUID(const GUID& guid) { // Compare GUID to one of the supported ones - if (IsEqualGUID(guid, MFVideoFormat_NV12)) { - // GrayScale + if (IsEqualGUID(guid, MFVideoFormat_L8)) { return cs::VideoMode::PixelFormat::kGray; } else if (IsEqualGUID(guid, MFVideoFormat_YUY2)) { return cs::VideoMode::PixelFormat::kYUYV;