[libcamera-devel] [PATCH 0/5] libcamera: imx8-isi: Remove pixelformat-2-media-bus map
Jacopo Mondi
jacopo.mondi at ideasonboard.com
Sun Jan 29 14:58:25 CET 2023
The ISI pipeline handler currently associates the output PixelFormat with the
media bus code that can produce it. This mapping is however limiting as
the ISI can produce any YUV/RGB format from any non-RAW media bus format.
Rework the format selection procedures in order to remove the association
between pixel formats and mbus codes by introducing 4 new functions.
This fixes the problem originally pointed out by Laurent that when used with
RAW sensors, the generated CameraConfiguration does not work as it assumes a
YUV media bus code is available.
Tested with ov5640 which can produce UYVY8, RGB565 and SBGGR8.
$ cam -c1
Selected sensor format: 1920x1080-UYVY8_1X16
$ cam -c1 --stream role=raw
Selected sensor format: 2592x1944-SBGGR8_1X8
$ cam -c1 --stream pixelformat=RGB565
Selected sensor format: 1920x1080-RGB565_
Tested with imx219 which can only produce SRGGB10
$ cam -c1
Selected sensor format: 3280x2464-SRGGB10_1X10
$ cam -c1 --stream pixelformat=YUV
WARN ISI imx8-isi.cpp:278 Cannot find a supported YUV/RGB format
$ cam -c1 --stream role=viewfinder
Selected sensor format: 3280x2464-SRGGB10_1X10
Also fix the available stream formats list for both YUV and RAW use cases.
Jacopo Mondi (5):
libcamera: imx8-isi: Break-out RAW format selection
libcamera: imx8-isi: Break out YUV format selection
libcamera: imx8-isi: Automatically select media bus code
libcamera: imx8-isi: Split Bayer/YUV config generation
libcamera: imx8-isi: Remove mbusCode from formatsMap_
include/libcamera/internal/camera_sensor.h | 1 +
src/libcamera/camera_sensor.cpp | 14 +
src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 612 +++++++++++--------
3 files changed, 378 insertions(+), 249 deletions(-)
--
2.39.0
More information about the libcamera-devel
mailing list