[libcamera-devel] [PATCH v2 2/7] ipa: mojom: Move CameraSensorInfo struct exclusively to IPA IPC

Umang Jain umang.jain at ideasonboard.com
Fri May 21 13:25:36 CEST 2021


Hi Jacopo

On 5/21/21 3:01 PM, Jacopo Mondi wrote:
> Hi Umang
>
> On Wed, May 19, 2021 at 03:49:49PM +0530, Umang Jain wrote:
>> CameraSensorInfo structure is designed to pass in camera sensor related
>> information from pipeline-handler to IPA. Since the pipeline-handler
>> and IPA are connected via mojom IPC IPA interface, the interface
>> itself provides a more suitable placement of CameraSensorInfo,
>> instead of camera_sensor.h (which is a libcamera internal header
>> ultimately, at this point).
>>
>> As CameraSensorInfo is already defined in core.mojom, it is just
>> a matter of removing [skipHeader] tag to allow code-generation
>> of CameraSensorInfo.
>>
>> Finally, update header paths to include CameraSensorInfo definition
>> from IPA interfaces instead of "libcamera/internal/camera_sensor.h".
>>
>> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
>> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> [snip]
>
>> +
>> +/**
>> + * \fn CameraSensorInfo::CameraSensorInfo(const std::string &model,
>> +					  uint32_t bitsPerPixel,
>> +					  const Size &activeAreaSize,
>> +					  const Rectangle &analogCrop,
>> +					  const Size &outputSize,
>> +					  uint64_t pixelRate,
>> +					  uint32_t lineLength,
>> +					  uint32_t minFrameLength,
>> +					  uint32_t maxFrameLength)
> What's this and why does it have this peculiar style ?
ouch, it looked fine to me in vim and checkstyle wasn't able to catch 
this (I double checked right-now)
Fixing it in next iteration. Thanks for noticing
>
>> + * \param[in] model
>> + * \param[in] bitsPerPixel
>> + * \param[in] activeAreaSize
>> + * \param[in] analogCrop
>> + * \param[in] outputSize
>> + * \param[in] pixelRate
>> + * \param[in] lineLength
>> + * \param[in] minFrameLength
>> + * \param[in] maxFrameLength
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::model
>> + * \brief The image sensor model name
>> + *
>> + * The sensor model name is a free-formed string that uniquely identifies the
>> + * sensor model.
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::bitsPerPixel
>> + * \brief The number of bits per pixel of the image format produced by the
>> + * image sensor
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::activeAreaSize
>> + * \brief The size of the pixel array active area of the sensor
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::analogCrop
>> + * \brief The portion of the pixel array active area which is read-out and
>> + * processed
>> + *
>> + * The analog crop rectangle top-left corner is defined as the displacement
>> + * from the top-left corner of the pixel array active area. The rectangle
>> + * horizontal and vertical sizes define the portion of the pixel array which
>> + * is read-out and provided to the sensor's internal processing pipeline, before
>> + * any pixel sub-sampling method, such as pixel binning, skipping and averaging
>> + * take place.
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::outputSize
>> + * \brief The size of the images produced by the camera sensor
>> + *
>> + * The output image size defines the horizontal and vertical sizes of the images
>> + * produced by the image sensor. The output image size is defined as the end
>> + * result of the sensor's internal image processing pipeline stages, applied on
>> + * the pixel array portion defined by the analog crop rectangle. Each image
>> + * processing stage that performs pixel sub-sampling techniques, such as pixel
>> + * binning or skipping, or perform any additional digital scaling concur in the
>> + * definition of the output image size.
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::pixelRate
>> + * \brief The number of pixels produced in a second
>> + *
>> + * To obtain the read-out time in seconds of a full line:
>> + *
>> + * \verbatim
>> +       lineDuration(s) = lineLength(pixels) / pixelRate(pixels per second)
>> +   \endverbatim
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::lineLength
>> + * \brief Total line length in pixels
>> + *
>> + * The total line length in pixel clock periods, including blanking.
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::minFrameLength
>> + * \brief The minimum allowable frame length in units of lines
>> + *
>> + * The sensor frame length comprises of active output lines and blanking lines
>> + * in a frame. The minimum frame length value dictates the minimum allowable
>> + * frame duration of the sensor mode.
>> + *
>> + * To obtain the minimum frame duration:
>> + *
>> + * \verbatim
>> +       frameDuration(s) = minFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)
>> +   \endverbatim
>> + */
>> +
>> +/**
>> + * \var CameraSensorInfo::maxFrameLength
>> + * \brief The maximum allowable frame length in units of lines
>> + *
>> + * The sensor frame length comprises of active output lines and blanking lines
>> + * in a frame. The maximum frame length value dictates the maximum allowable
>> + * frame duration of the sensor mode.
>> + *
>> + * To obtain the maximum frame duration:
>> + *
>> + * \verbatim
>> +       frameDuration(s) = maxFrameLength(lines) * lineLength(pixels) / pixelRate(pixels per second)
>> +   \endverbatim
>> + */
>>   } /* namespace libcamera */
>> --
>> 2.26.2
>>



More information about the libcamera-devel mailing list