[libcamera-devel] [PATCH v2 3/3] ipu3: Apply shading adapter as part of AIQ::run2a()
Han-Lin Chen
hanlinchen at chromium.org
Thu Oct 7 09:21:47 CEST 2021
Apply shading adapter to correct lens shading for both camera.
Signed-off-by: Han-Lin Chen <hanlinchen at chromium.org>
---
aiq/aiq.cpp | 3 +++
aiq/aiq_input_parameters.cpp | 12 ++++++++++++
2 files changed, 15 insertions(+)
diff --git a/aiq/aiq.cpp b/aiq/aiq.cpp
index 708e9d6..24c61cb 100644
--- a/aiq/aiq.cpp
+++ b/aiq/aiq.cpp
@@ -154,6 +154,9 @@ int AIQ::run2a(unsigned int frame, AiqInputParameters ¶ms,
params.paParams.exposure_params = results.ae()->exposures[0].exposure;
parameterAdapterRun(params.paParams, results);
+ params.saParams.awb_results = results.awb();
+ shadingAdapterRun(params.saParams, results);
+
afRun(params.afParams, results);
return 0;
diff --git a/aiq/aiq_input_parameters.cpp b/aiq/aiq_input_parameters.cpp
index 8a53849..36e2b07 100644
--- a/aiq/aiq_input_parameters.cpp
+++ b/aiq/aiq_input_parameters.cpp
@@ -89,6 +89,15 @@ int AiqInputParameters::configure(const IPAConfigInfo &configInfo)
/* Guess from hal-configs-nautilus/files/camera3_profiles.xml#263 */
sensorDescriptor.coarse_integration_time_max_margin = 10;
+ sensorFrameParams.horizontal_crop_offset = 0;
+ sensorFrameParams.vertical_crop_offset = 0;
+ sensorFrameParams.cropped_image_width = configInfo.sensorInfo.analogCrop.width;
+ sensorFrameParams.cropped_image_height = configInfo.sensorInfo.analogCrop.height;
+ sensorFrameParams.horizontal_scaling_numerator = 1;
+ sensorFrameParams.horizontal_scaling_denominator = 1;
+ sensorFrameParams.vertical_scaling_numerator = 1;
+ sensorFrameParams.vertical_scaling_denominator = 1;
+
return 0;
}
@@ -165,6 +174,9 @@ void AiqInputParameters::setAeAwbAfDefaults()
gbceParams.tone_map_level = ia_aiq_tone_map_level_default;
gbceParams.frame_use = ia_aiq_frame_use_still;
gbceParams.ev_shift = 0;
+
+ /* SA Params */
+ saParams.frame_use = ia_aiq_frame_use_still;
}
} /* namespace ipa::ipu3::aiq */
--
2.33.0.882.g93a45727a2-goog
More information about the libcamera-devel
mailing list