summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/ipu3/imgu.h
AgeCommit message (Collapse)Author
2021-02-05libcamera: ipu3: imgu: Allocate buffers for stats and paramNiklas Söderlund
Instead of preparing for buffer importing allocate buffers that can be used by an IPA. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-02-05libcamera: ipu3: imgu: Add parameters video deviceNiklas Söderlund
Add the parameters video device to the data structure of the ImgUDevice. Even if the video device is configured, prepared to import buffers and started no buffers are ever queued to it so it does not yet effect the capture. Nor is does this change hinder the current capture mode to function. This is done in preparation to attach an IPA to the IPU3 pipeline. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-02-05libcamera: ipu3: imgu: Configure the stat video device as part of configure()Niklas Söderlund
There is no reason to expose and call a separate configureStat() when the statistics video device can be configured with the exact same parameters as part of configure(). Move the configuration internally to the ImgUDevice simplifying the interface, there is no functional change. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-08-03libcamera: ipu3: imgu: Rename configureInput()Jacopo Mondi
The ImgUDevice::configureInput() function does not only configure the input format but applies rectangles to the IF, BDS and GDC components. Rename it to ImgUDevice::configure(). Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-08-03libcamera: ipu3: Configure ImgU with the computed parametersJacopo Mondi
Instrument the ImgUDevice::configureInput() function to use the provided pipe configuration parameters to configure the IF, BDS and GDC rectangles. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-08-03libcamera: ipu3: imgu: Calculate ImgU pipe configurationJacopo Mondi
Instrument the ImgU component to dynamically calculate the image manipulation pipeline intermediate sizes. To correctly configure the ImgU it is necessary to program the IF, BDS and GDC sizes, which are currently fixed to the input frame size. The procedure used to calculate the intermediate sizes has been ported from the pipe_config.py python script, available at: https://github.com/intel/intel-ipu3-pipecfg at revision: 61e83f2f7606 ("Add more information into README") Define two structures (ImgUDevice::Pipe and ImgUDevice::PipeConfig) to allow the pipeline handler to supply and retrieve configuration parameters from the ImgU. Finally, add a new operation to the ImgUDevice that calculates the pipe configuration parameters based on the requested input and output sizes. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-07-15libcamera: geometry: Turn Size and Rectangle into classesLaurent Pinchart
SizeRange is defined as a class while Size and Rectangle are defined as struct. This is confusing for users in forward declarations. Simplify it by turning both structures into classes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-06-28libcamera: ipu3: imgu: Use unique_ptr for video and subdevicesNiklas Söderlund
Instead of manually deleting the video and subdevices in the destructor use std::unique_ptr. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28libcamera: ipu3: imgu: Remove ImgUOutputNiklas Söderlund
The struct ImgUOutput now only contains one member that is in use, the video device. Remove the struct and use the video device directly instead. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28libcamera: ipu3: imgu: Use specific functions to configure each sinkNiklas Söderlund
When the IPU3 pipeline only provided streams to applications that came from the ImgU it made sense to have a generic function to configure all the different outputs. With the addition of the RAW stream this begins to be cumbersome to read and make sense of in the PipelineHandlerIPU3 code. Replace the generic function that takes a specific argument for which sink to configure with a specific function for each sink. This makes the code easier to follow as it's always clear which of the ImgU sinks are being configured without knowing the content of a generically named variable. It also paves the way for future improvements. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28libcamera: ipu3: imgu: Mark things that are internal as privateNiklas Söderlund
Mark all variables and functions that are only used internally as private. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28libcamera: ipu3: imgu: Do not cache indexNiklas Söderlund
The numerical index of the imgu is only used to create its name in string form. There is no need to keep it around after that, remove it. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-28libcamera: ipu3: imgu: Move the ImgUDevice class to separate filesNiklas Söderlund
In preparation of refactoring the IPU3 pipeline handler breakout the ImgUDevice into its own .cpp and .h file, no functional change. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>