diff --git a/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c b/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c index 09c7664a07e..6a29c90fe09 100644 --- a/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c +++ b/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c @@ -1,5 +1,5 @@ /* - * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -223,8 +223,7 @@ int ipu_calc_stripes_sizes(const unsigned int input_frame_width, output_m = m_calc(output_pixelformat); - if ((output_frame_width < input_frame_width) || (input_frame_width < 4) - || (output_frame_width < 4)) + if ((input_frame_width < 4) || (output_frame_width < 4)) return 1; irr_opt = _do_div((((u64)(input_frame_width - 1)) << 32), @@ -266,7 +265,7 @@ int ipu_calc_stripes_sizes(const unsigned int input_frame_width, (right->input_width - 1)), (right->output_width - 1)); left->irr = right->irr = truncate(0, div, 1); } else { /* with overlap */ - onw = truncate(0, (((u64)output_frame_width) << 32) >> 1, + onw = truncate(0, (((u64)output_frame_width - 1) << 32) >> 1, output_f); inw = truncate(0, onw * irr_opt, input_f); /* this is the maximal inw which allows the same resizing ratio */