diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2020-04-24 12:01:49 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2020-04-28 22:25:23 +0200 |
commit | fd554f9dba3171b624e584d50c7554f9c5f9cc52 (patch) | |
tree | 2c2cdf6a92aeed7de55107333f51be1f2ce3ca78 /src/libcamera/pipeline/rkisp1/rkisp1.cpp | |
parent | ee4bb92aaeefaed04603d0b0c279d0d4f0be0197 (diff) |
libcamera: ipa: Add support for CameraSensorInfo
Add support for camera sensor information in the libcamera IPA protocol.
Define a new 'struct ipa_sensor_info' structure in the IPA context and
use it to perform translation between the C and the C++ API.
Update the IPAInterface::configure() operation to accept a new
CameraSensorInfo parameter and port all users of that function to
the new interface.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/pipeline/rkisp1/rkisp1.cpp')
-rw-r--r-- | src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index fde445b9..1a34ffe6 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -822,6 +822,14 @@ int PipelineHandlerRkISP1::start(Camera *camera) activeCamera_ = camera; /* Inform IPA of stream configuration and sensor controls. */ + CameraSensorInfo sensorInfo = {}; + ret = data->sensor_->sensorInfo(&sensorInfo); + if (ret) { + /* \todo Turn this in an hard failure. */ + LOG(RkISP1, Warning) << "Camera sensor information not available"; + sensorInfo = {}; + } + std::map<unsigned int, IPAStream> streamConfig; streamConfig[0] = { .pixelFormat = data->stream_.configuration().pixelFormat, @@ -831,7 +839,7 @@ int PipelineHandlerRkISP1::start(Camera *camera) std::map<unsigned int, const ControlInfoMap &> entityControls; entityControls.emplace(0, data->sensor_->controls()); - data->ipa_->configure(streamConfig, entityControls); + data->ipa_->configure(sensorInfo, streamConfig, entityControls); return ret; } |