<div dir="ltr"><div dir="ltr">Hi David,<div><br></div><div>Thank you for your work.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 15 Aug 2022 at 15:16, David Plowman via libcamera-devel <<a href="mailto:libcamera-devel@lists.libcamera.org">libcamera-devel@lists.libcamera.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The "R" pixel formats (R8, R10, R10_CSI2P etc.) record the associated<br>
colour space as being YUV rather than RAW, meaning that the code was<br>
not detecting them as being raw formats.<br>
<br>
In the case of Raspberry Pi, we deal only with raw formats, so the<br>
revised test must work correctly for both these and the standard Bayer<br>
formats.<br>
<br>
Signed-off-by: David Plowman <<a href="mailto:david.plowman@raspberrypi.com" target="_blank">david.plowman@raspberrypi.com</a>><br></blockquote><div><br></div><div>Reviewed-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com">naush@raspberrypi.com</a>></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 14 ++------------<br>
 1 file changed, 2 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
index e895584d..fae8e45e 100644<br>
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
@@ -105,18 +105,8 @@ V4L2DeviceFormat toV4L2DeviceFormat(const V4L2VideoDevice *dev,<br>
<br>
 bool isRaw(const PixelFormat &pixFmt)<br>
 {<br>
-  Â  Â  Â /*<br>
-  Â  Â  Â  * The isRaw test might be redundant right now the pipeline handler only<br>
-  Â  Â  Â  * supports RAW sensors. Leave it in for now, just as a sanity check.<br>
-  Â  Â  Â  */<br>
-  Â  Â  Â if (!pixFmt.isValid())<br>
-  Â  Â  Â  Â  Â  Â  Â return false;<br>
-<br>
-  Â  Â  Â const PixelFormatInfo &info = PixelFormatInfo::info(pixFmt);<br>
-  Â  Â  Â if (!info.isValid())<br>
-  Â  Â  Â  Â  Â  Â  Â return false;<br>
-<br>
-  Â  Â  Â return info.colourEncoding == PixelFormatInfo::ColourEncodingRAW;<br>
+  Â  Â  Â /* This test works for both Bayer and raw mono formats. */<br>
+  Â  Â  Â return BayerFormat::fromPixelFormat(pixFmt).isValid();<br>
 }<br>
<br>
 double scoreFormat(double desired, double actual)<br>
-- <br>
2.30.2<br>
<br>
</blockquote></div></div>