[PATCH 0/7] rkisp1: Fix aspect ratio and ScalerCrop
Stefan Klug
stefan.klug at ideasonboard.com
Wed Nov 20 09:57:39 CET 2024
Hi all,
This series contains fixes for a few issues on the imx8mp that I'd like
to get in before the next release.
Patch 1/7 is a drive by fix
Patch 2/7 Fixes the aspect ratio on the imx8mp. There exists code to
keep the aspect ratio in the rkisp1 pipeline that adjust the input crop
on the resizer stage. On the imx8mp however the resizer hardware is
missing that functionality and cropping needs to be done on the ISP
output. Patch 2 implements that.
Patches 3-7 fix the ScalerCrop control. The existing implementation
implements ScalerCrop in dewarper coordinates (After scaling down).
This is incorrect as ScalerCrop is specified to be in sensor
coordinates. To fix that, patches 3-5 do preparatory changes and patch 6
implements the correct ScalerCrop control. Patch 7 adds
ScalerMaximumCrop for completeness sake.
Note that this solution while being correct on the numbers is still not
ideal, because the aspect ratio preserving crop on the ISP output is
still applied unconditionally. That will get fixed in an upcoming
series, where the full sensor size get's passed to the dewarper and all
cropping/scaling gets handled there.
Best regards,
Stefan
Stefan Klug (7):
libcamera: rkisp1: Fix scope of dewarper stop() exit action
libcamera: rkisp1: Keep aspect ratio on imx8mp
libcamera: geometry: Add Rectangle::mappedBetween()
pipeline: rkisp1: Split inputCrop and outputCrop
pipeline: rkisp1: Reorder sensorInfo collection code
pipeline: rkisp1: Fix ScalerCrop to be in sensor coordinates
pipeline: rkisp1: Add ScalerMaximumCrop property
include/libcamera/geometry.h | 2 +
src/libcamera/geometry.cpp | 33 +++++++
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 97 ++++++++++++++-----
src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 6 ++
4 files changed, 114 insertions(+), 24 deletions(-)
--
2.43.0
More information about the libcamera-devel
mailing list