[libcamera-devel] libcamera on pinephone
Pavel Machek
pavel at ucw.cz
Wed Jun 22 10:37:34 CEST 2022
Hi!
> > > > Could you print the length of all planes and see how they look like in
> > > > memory ? Also note that the two planes have the same fd so they
> > > > seem to be contiguous in memory if I'm not mistaken ?
> >
> > That may be above my skill level (sorry).
> >
> > > We really need data offset support for V4L2 buffer planes in the V4L2
> > > API :-S See http://lore.kernel.org/linux-media/20200804192939.2251988-3-helen.koike@collabora.com/
> >
> > But I understood enough to realize that I420 is problematic, switched
> > to 1280x720-BA810x31384142 and now I have... something ;-).
>
> How did you switch to that format ? The `cam -I` output below lists
> SBGGR8 only, which surprises me as I thought both sensors of the
> Pinephone had an internal ISP, and supported outputting YUV.
>
> If you've hacked sources somewhere to disable other formats, that
> shouldn't be needed. The `-s pixelformat=...` argument to cam lets you
> pick a pixel format on the command line.
Ok, thanks for hints. I indeed hacked the sources. I believe I need to
select SBGGR8 for final capture and SBGGR8_1X8 as data format inside
the pipeline. Can I do that with -s option?
> > Hmm. Is SDL not able to display SBGGR8? Is there anything else I can
> > try before trying to play with gstreamer?
>
> SDL doesn't support Bayer formats, no. We would need to apply a software
> conversion first.
>
> One option, if you can install Qt on the Pinephone, is to use qcam
> instead. It supports debayering (when using the GLES backend, see `qcam
> -h`).
Thanks, it works okay using gles. I don't think I can capture still
images; I should have TIFF available.
> Another simpler option is to use YUYV (assuming it's supported), with
> `-s pixelformat=YUYV`.
That one does not work for some reason.
Would something like this make sense? I do not see other obvious place
to tell if TIFF was detected.
Best regards,
Pavel
diff --git a/src/qcam/main.cpp b/src/qcam/main.cpp
index d3f01a85..1884b2ed 100644
--- a/src/qcam/main.cpp
+++ b/src/qcam/main.cpp
@@ -45,8 +45,14 @@ OptionsParser::Options parseOptions(int argc, char *argv[])
"Print verbose log messages", "verbose");
OptionsParser::Options options = parser.parse(argc, argv);
- if (options.isSet(OptHelp))
+ if (options.isSet(OptHelp)) {
parser.usage();
+#ifdef HAVE_TIFF
+ qInfo() << "TIFF/DNG support available.";
+#else
+ qInfo() << "TIFF/DNG support NOT available, taking still images not possible";
+#endif
+ }
return options;
}
--
People of Russia, stop Putin before his war on Ukraine escalates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20220622/5e076292/attachment.sig>
More information about the libcamera-devel
mailing list