[cscore] Add UYVY image support (#4700)

This commit is contained in:
Peter Johnson
2022-11-23 22:00:31 -08:00
committed by GitHub
parent 4307d0ee8b
commit 2bca43779e
11 changed files with 77 additions and 6 deletions

View File

@@ -82,6 +82,8 @@ static VideoMode::PixelFormat ToPixelFormat(__u32 pixelFormat) {
return VideoMode::kBGR;
case V4L2_PIX_FMT_GREY:
return VideoMode::kGray;
case V4L2_PIX_FMT_UYVY:
return VideoMode::kUYVY;
default:
return VideoMode::kUnknown;
}
@@ -100,6 +102,8 @@ static __u32 FromPixelFormat(VideoMode::PixelFormat pixelFormat) {
return V4L2_PIX_FMT_BGR24;
case VideoMode::kGray:
return V4L2_PIX_FMT_GREY;
case VideoMode::kUYVY:
return V4L2_PIX_FMT_UYVY;
default:
return 0;
}