[RFC,1/3] ipa: core: add IPASensorDelays structure
diff mbox series

Message ID 20241028173659.247353-2-mike.rudenko@gmail.com
State New
Headers show
Series
  • Pass sensor delays from rkisp1 IPA to the pipeline handler
Related show

Commit Message

Mikhail Rudenko Oct. 28, 2024, 5:36 p.m. UTC
Add struct IPASensorDelays for passing sensor delays from
a CameraSensorHelper to a pipeline handler at initialization
time. Distinct member variables instead of a map ensure at compile
time that all delays required by the pipeline handler are defined.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
 include/libcamera/ipa/core.mojom | 35 ++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

Comments

Milan Zamazal Oct. 31, 2024, 10:08 a.m. UTC | #1
Mikhail Rudenko <mike.rudenko@gmail.com> writes:

> Add struct IPASensorDelays for passing sensor delays from
> a CameraSensorHelper to a pipeline handler at initialization
> time. Distinct member variables instead of a map ensure at compile
> time that all delays required by the pipeline handler are defined.
>
> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
> ---
>  include/libcamera/ipa/core.mojom | 35 ++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>
> diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom
> index bce79724..c95cce4b 100644
> --- a/include/libcamera/ipa/core.mojom
> +++ b/include/libcamera/ipa/core.mojom
> @@ -341,3 +341,38 @@ struct IPAStream {
>  	uint32 pixelFormat;
>  	Size size;
>  };
> +
> +/**
> + * \struct IPASensorDelays
> + * \brief Sensor control delays for the IPA interface
> + *
> + * The IPASensorDelays structure is used to pass sensoer control delays from

sensoer -> sensor

> + * the CameraSensorHelper instance in an IPA to the DelayedControls instance
> + * in a pipeline handler.
> + */
> +
> +/**
> + * \var IPASensorDelays::exposureDelay
> + * \brief The delay for CID_EXPOSURE
> + */
> +
> +/**
> + * \var IPASensorDelays::gainDelay
> + * \brief The delay for CID_ANALOGUE_GAIN
> + */
> +
> +/**
> + * \var IPASensorDelays::hblankDelay
> + * \brief The delay for CID_HBLANK
> + */
> +
> +/**
> + * \var IPASensorDelays::vblankDelay
> + * \brief The delay for CID_VBLANK
> + */
> +struct IPASensorDelays {
> +	uint32 exposureDelay;
> +	uint32 gainDelay;
> +	uint32 hblankDelay;
> +	uint32 vblankDelay;
> +};
Mikhail Rudenko Oct. 31, 2024, 1:39 p.m. UTC | #2
Hi Milan,

On 2024-10-31 at 11:08 +01, Milan Zamazal <mzamazal@redhat.com> wrote:

> Mikhail Rudenko <mike.rudenko@gmail.com> writes:
>
>> Add struct IPASensorDelays for passing sensor delays from
>> a CameraSensorHelper to a pipeline handler at initialization
>> time. Distinct member variables instead of a map ensure at compile
>> time that all delays required by the pipeline handler are defined.
>>
>> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
>> ---
>>  include/libcamera/ipa/core.mojom | 35 ++++++++++++++++++++++++++++++++
>>  1 file changed, 35 insertions(+)
>>
>> diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom
>> index bce79724..c95cce4b 100644
>> --- a/include/libcamera/ipa/core.mojom
>> +++ b/include/libcamera/ipa/core.mojom
>> @@ -341,3 +341,38 @@ struct IPAStream {
>>  	uint32 pixelFormat;
>>  	Size size;
>>  };
>> +
>> +/**
>> + * \struct IPASensorDelays
>> + * \brief Sensor control delays for the IPA interface
>> + *
>> + * The IPASensorDelays structure is used to pass sensoer control delays from
>
> sensoer -> sensor

Good catch, thanks!

--
Best regards,
Mikhail Rudenko

Patch
diff mbox series

diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom
index bce79724..c95cce4b 100644
--- a/include/libcamera/ipa/core.mojom
+++ b/include/libcamera/ipa/core.mojom
@@ -341,3 +341,38 @@  struct IPAStream {
 	uint32 pixelFormat;
 	Size size;
 };
+
+/**
+ * \struct IPASensorDelays
+ * \brief Sensor control delays for the IPA interface
+ *
+ * The IPASensorDelays structure is used to pass sensoer control delays from
+ * the CameraSensorHelper instance in an IPA to the DelayedControls instance
+ * in a pipeline handler.
+ */
+
+/**
+ * \var IPASensorDelays::exposureDelay
+ * \brief The delay for CID_EXPOSURE
+ */
+
+/**
+ * \var IPASensorDelays::gainDelay
+ * \brief The delay for CID_ANALOGUE_GAIN
+ */
+
+/**
+ * \var IPASensorDelays::hblankDelay
+ * \brief The delay for CID_HBLANK
+ */
+
+/**
+ * \var IPASensorDelays::vblankDelay
+ * \brief The delay for CID_VBLANK
+ */
+struct IPASensorDelays {
+	uint32 exposureDelay;
+	uint32 gainDelay;
+	uint32 hblankDelay;
+	uint32 vblankDelay;
+};