[libcamera-devel] [PATCH 1/2] libcamera: formats: Fix colour encoding for "R" raw greyscale formats
David Plowman
david.plowman at raspberrypi.com
Thu Aug 4 12:45:49 CEST 2022
These are being used for raw monochrome sensors and so the colour
encoding should be "raw".
Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
---
src/libcamera/formats.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index 283ecb3d..7b98fef2 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -531,7 +531,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.multi = V4L2PixelFormat(),
},
.bitsPerPixel = 8,
- .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = false,
.pixelsPerGroup = 1,
.planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},
@@ -544,7 +544,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.multi = V4L2PixelFormat(),
},
.bitsPerPixel = 10,
- .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = false,
.pixelsPerGroup = 1,
.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},
@@ -557,7 +557,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.multi = V4L2PixelFormat(),
},
.bitsPerPixel = 12,
- .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = false,
.pixelsPerGroup = 1,
.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},
@@ -570,7 +570,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.multi = V4L2PixelFormat(),
},
.bitsPerPixel = 10,
- .colourEncoding = PixelFormatInfo::ColourEncodingYUV,
+ .colourEncoding = PixelFormatInfo::ColourEncodingRAW,
.packed = true,
.pixelsPerGroup = 4,
.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},
--
2.30.2
More information about the libcamera-devel
mailing list