diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2021-03-17 14:06:30 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2021-05-20 10:58:52 +0200 |
commit | 630c83f82a6dfcac749469be62599b72c250b063 (patch) | |
tree | 21184972cf5b34ce354884e5a08e38f3d431ff88 /src/ipa/raspberrypi/cam_helper_ov5647.cpp | |
parent | c1b0e931a6f353d35d40f46e07832e8301f61a8a (diff) |
libcamera: ipu3: imgu: Fix BDS height calculation
The IF rectangle height is iteratively computed by first subtracting
the scaling factor to the estimated height, then in a successive loop
by adding the same scaling factor until the maximum IF size is not
reached.
As the computed IF height is not cached in any variable, the second
loop over-writes the result of the first one, even if the BDS alignment
condition is not satisfied.
Fix this by caching the result of the two iterations, and use the one
that produced any result, with a preference for the one produced by the
second loop, as implemented in the reference python script.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Diffstat (limited to 'src/ipa/raspberrypi/cam_helper_ov5647.cpp')
0 files changed, 0 insertions, 0 deletions