<div dir="ltr"><div dir="ltr">Hi Han-Lin,<br><br>I realise this replay might be very (very) late now :-) However, I have been<br>working on something very similar to this work for the Raspberry Pi pipeline<br>handler: <a href="https://patchwork.libcamera.org/project/libcamera/list/?series=3659">https://patchwork.libcamera.org/project/libcamera/list/?series=3659</a>.<br>I just wanted to reach out to see if there is any common ground between both our<br>patch series that would help us both.<br><br>Having briefly looked through your series, I think the key difference is how we<br>provide the config file to the respective pipeline handlers. I've opted for a<br>simpler approach of using an environment variable to provide a filename to the<br>pipeline handler. There is a helper function PipelineHandler::configurationFile()<br>that will attempt to locate the file from either the system install path, or<br>the source directory. It's up to the respective pipeline handler to parse the<br>file and interpret the parameters as required.<br><br>Is this approach something you can make use of for your series, replacing the<br>"options" mechanism that you have implemented? As always, feel free to ask any<br>questions if you have them.<br><br>Regards,<br>Naush<br><div><br></div><div>On Wed, 9 Feb 2022 at 07:19, Han-Lin Chen <<a href="mailto:hanlinchen@chromium.org" target="_blank">hanlinchen@chromium.org</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
This patch series is to introduce the pipeline configuration preference<br>
for IPU3. Before the series, IPU3 calculates the ImgU configuration<br>
based on the algorithm from Intel:<br>
<a href="https://github.com/intel/intel-ipu3-pipecfg" rel="noreferrer" target="_blank">https://github.com/intel/intel-ipu3-pipecfg</a><br>
<br>
However, IPU3 seems not well defined with the limitation on ImgU and<br>
leading to configuration failure in some cases. See:<br>
<a href="https://bugs.libcamera.org/show_bug.cgi?id=67" rel="noreferrer" target="_blank">https://bugs.libcamera.org/show_bug.cgi?id=67</a><br>
<br>
Due to this, on ChromeOS, Intel made manual adjusts on the validated<br>
setting for each camera module. The patch series is to introduce the<br>
feature for IPU3, and possibly other platforms with similar issues.<br>
<br>
The patch 1-2 is to introduce Option control for user to enable features<br>
which need to be selected before querying capabilities of a camera.<br>
<br>
The patch 3 Adds helper class to wrap libyaml for easier reading yaml<br>
files.<br>
<br>
The patch 4-9 Supports the Pipeline configuration preference of IPU3 and<br>
default to be enabled on ChromeOS is it's specified on hal_config.yaml.<br>
<br>
Han-Lin Chen (9):<br>
libcamera: Introduce option to customize behavior for a camera module<br>
libcamera: Add options() and setOptions() operations to Camera<br>
libcamera: Introduce YamlParser as a helper to parse yaml files<br>
android: camera_hal_config: Use YamlParser to parse android hal config<br>
android: Add pipeline_config_file parameter for camera_hal.yaml<br>
android: Set PipelineConfigFile option if it's supported by the camera<br>
libcamera: ipu3: Add helper class PipeConfigPreference<br>
libcamera: ipu3: Support PipelineConfigFile option<br>
android: Elevate min duration to 30 FPS if it's lower within 2%<br>
<br>
README.rst | 2 +-<br>
include/libcamera/camera.h | 3 +<br>
include/libcamera/geometry.h | 4 +<br>
include/libcamera/internal/camera.h | 2 +<br>
include/libcamera/internal/meson.build | 1 +<br>
include/libcamera/internal/pipeline_handler.h | 2 +<br>
include/libcamera/internal/yaml_parser.h | 82 ++<br>
include/libcamera/ipa/ipa_controls.h | 1 +<br>
include/libcamera/meson.build | 3 +-<br>
include/libcamera/<a href="http://option_ids.h.in" rel="noreferrer" target="_blank">option_ids.h.in</a> | 36 +<br>
src/android/camera_capabilities.cpp | 31 +-<br>
src/android/camera_device.cpp | 19 +<br>
src/android/camera_hal_config.cpp | 344 ++------<br>
src/android/camera_hal_config.h | 1 +<br>
src/android/data/nautilus/camera_hal.yaml | 2 +<br>
src/android/data/nautilus/imx258.yaml | 248 ++++++<br>
src/android/data/soraka/camera_hal.yaml | 2 +<br>
src/android/data/soraka/ov13858.yaml | 236 ++++++<br>
src/android/data/soraka/ov5670.yaml | 242 ++++++<br>
src/libcamera/camera.cpp | 59 ++<br>
src/libcamera/control_serializer.cpp | 12 +<br>
src/libcamera/geometry.cpp | 20 +<br>
src/libcamera/meson.build | 3 +<br>
src/libcamera/<a href="http://option_ids.cpp.in" rel="noreferrer" target="_blank">option_ids.cpp.in</a> | 58 ++<br>
src/libcamera/option_ids.yaml | 16 +<br>
src/libcamera/pipeline/ipu3/ipu3.cpp | 215 ++++-<br>
src/libcamera/pipeline/ipu3/meson.build | 1 +<br>
.../pipeline/ipu3/pipe_config_pref.cpp | 285 +++++++<br>
.../pipeline/ipu3/pipe_config_pref.h | 80 ++<br>
src/libcamera/pipeline_handler.cpp | 26 +<br>
src/libcamera/yaml_parser.cpp | 796 ++++++++++++++++++<br>
31 files changed, 2563 insertions(+), 269 deletions(-)<br>
create mode 100644 include/libcamera/internal/yaml_parser.h<br>
create mode 100644 include/libcamera/<a href="http://option_ids.h.in" rel="noreferrer" target="_blank">option_ids.h.in</a><br>
create mode 100644 src/android/data/nautilus/imx258.yaml<br>
create mode 100644 src/android/data/soraka/ov13858.yaml<br>
create mode 100644 src/android/data/soraka/ov5670.yaml<br>
create mode 100644 src/libcamera/<a href="http://option_ids.cpp.in" rel="noreferrer" target="_blank">option_ids.cpp.in</a><br>
create mode 100644 src/libcamera/option_ids.yaml<br>
create mode 100644 src/libcamera/pipeline/ipu3/pipe_config_pref.cpp<br>
create mode 100644 src/libcamera/pipeline/ipu3/pipe_config_pref.h<br>
create mode 100644 src/libcamera/yaml_parser.cpp<br>
<br>
-- <br>
2.35.0.263.gb82422642f-goog<br>
<br>
</blockquote></div>
</div>