summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOliver Brown <oliver.brown@freescale.com>2014-03-12 11:21:02 -0500
committerOliver Brown <oliver.brown@freescale.com>2014-03-20 11:41:51 -0500
commit50d5d4bf13603a49c44ee110758672f5a9f19db0 (patch)
treee9c84dda8a1cfb7e8d45c70adfd5a27800df3c9f /drivers
parent764bcdd8f2f35a37d1e427835792d7d3859e32cb (diff)
ENGR00303200 [IPU Split] - Vertical line in downsaled image with ratio less 2
The optimal resize ratio should be used if the downscaler is not needed. This will fix a vertical line in the center for some scaling ratios. Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mxc/ipu3/ipu_calc_stripes_sizes.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c b/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c
index 27abb06be12b..c466ea991f8b 100644
--- a/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c
+++ b/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c
@@ -388,8 +388,11 @@ int ipu_calc_stripes_sizes(const unsigned int input_frame_width,
&resize_coeff,
&downsize_coeff) < 0)
return -EINVAL;
- left->irr = right->irr =
- (downsize_coeff << 14) | resize_coeff;
+
+ if (downsize_coeff > 0) {
+ left->irr = right->irr =
+ (downsize_coeff << 14) | resize_coeff;
+ }
}
pr_debug("inw %d, onw %d, ilw %d, ilc %d, olw %d,"
" irw %d, irc %d, orw %d, orc %d, "