From 49bae441ed58f05a2c25cf6459afa3aa0839824d Mon Sep 17 00:00:00 2001 From: David Plowman Date: Tue, 2 Feb 2021 17:05:37 +0000 Subject: ipa: raspberrypi: Warn when control algorithms are missing; do not fail Users are free to avoid loading certain control algorithms from the json tuning file if they wish, and this could mean that some libcamera controls will therefore not be available. Currently we don't have a good means of indicating which these are, therefore failing completely when an application tries to use one is unhelpful - it is better just to issue a warning. Note that once we can indicate this properly, applications should check for supported controls as this change may be reverted. Signed-off-by: David Plowman Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- include/libcamera/ipa/raspberrypi.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/libcamera/ipa') diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h index 5a943382..3500f7df 100644 --- a/include/libcamera/ipa/raspberrypi.h +++ b/include/libcamera/ipa/raspberrypi.h @@ -49,7 +49,15 @@ enum BufferMask { /* Size of the LS grid allocation. */ static constexpr unsigned int MaxLsGridSize = 32 << 10; -/* List of controls handled by the Raspberry Pi IPA */ +/* + * List of controls handled by the Raspberry Pi IPA + * + * \todo This list will need to be built dynamically from the control + * algorithms loaded by the json file, once this is supported. At that + * point applications should check first whether a control is supported, + * and the pipeline handler may be reverted so that it aborts when an + * unsupported control is encountered. + */ static const ControlInfoMap Controls = { { &controls::AeEnable, ControlInfo(false, true) }, { &controls::ExposureTime, ControlInfo(0, 999999) }, -- cgit v1.2.1