summaryrefslogtreecommitdiff
path: root/src/ipa/rpi/controller/controller.cpp
AgeCommit message (Collapse)Author
2024-01-05ipa: rpi: Add hardware line rate constraintsNaushir Patuck
Advertise hardware constraints on the pixel processing rate through the Controller::HardwareConfig structure. When calculating the minimum line length during a configure() operation, ensure that we don't exceed this constraint. If we do exceed the hardware constraints, increase the modes's minimum line length so the pixel processing rate falls below the hardware limit. If this is not possible, throw a loud error message in the logs. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2023-10-18ipa: rpi: Add PiSP definitions to the Controller hardware descriptionNaushir Patuck
Add an entry to Controller::HardwareConfig describing the PiSP hardware for the IPA and controller algorithms to use. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-10-18ipa: rpi: Add statsInline to the Controller hardware descriptionNaushir Patuck
Add a new boolean field (statsInline) to Controller::HardwareConfigMap. This field indicates where the statistics are generated in the hardware ISP pipeline. For statsInline == true, statistics are generated before the frame is processed (e.g. the PiSP case), and statsInline == false indicates statistics are generated after the frame is processed (e.g. the VC4 case). Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-09-16ipa: rpi: Fix segfault when parsing invalid json fileNaushir Patuck
If the json file parsing failed due to a malformed file, the root pointer would be null. This was not tested and caused a segfault when trying to use the pointer to retrieve the version key. Fix this by bailing out early if the parser returns a null pointer. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
2023-05-04pipeline: ipa: raspberrypi: Refactor and move the Raspberry Pi codeNaushir Patuck
Split the Raspberry Pi pipeline handler and IPA source code into common and VC4/BCM2835 specific file structures. For the pipeline handler, the common code files now live in src/libcamera/pipeline/rpi/common/ and the VC4-specific files in src/libcamera/pipeline/rpi/vc4/. For the IPA, the common code files now live in src/ipa/rpi/{cam_helper,controller}/ and the vc4 specific files in src/ipa/rpi/vc4/. With this change, the camera tuning files are now installed under share/libcamera/ipa/rpi/vc4/. To build the pipeline and IPA, the meson configuration options have now changed from "raspberrypi" to "rpi/vc4": meson setup build -Dipas=rpi/vc4 -Dpipelines=rpi/vc4 Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>