@@ -683,6 +683,11 @@ static void find_seams(struct ipu_image_convert_ctx *ctx,
if (ipu_rot_mode_is_irt(ctx->rot_mode)) {
resized_width = out->base.rect.height;
resized_height = out->base.rect.width;
+ out_left_align = tile_top_align(out->fmt);
+ out_top_align = tile_left_align(out->fmt);
+ out_width_align = tile_height_align(out->type,
+ ctx->rot_mode);
+ out_height_align = tile_width_align(out->fmt);
out_right = out->base.rect.height;
out_bottom = out->base.rect.width;
}
@@ -732,7 +737,7 @@ static void find_seams(struct ipu_image_convert_ctx *ctx,
}
for (col = in->num_cols - 1; col > 0; col--) {
- bool allow_overshoot = (col == in->num_cols - 1) &&
+ bool allow_overshoot = (col < in->num_cols - 1) &&
!(ctx->rot_mode & IPU_ROT_BIT_HFLIP);
unsigned int out_start;
unsigned int out_end;
@@ -775,6 +780,7 @@ static void find_seams(struct ipu_image_convert_ctx *ctx,
in_right, flipped_out_left, out_right);
for (row = in->num_rows - 1; row > 0; row--) {
+ bool allow_overshoot = row < in->num_rows - 1;
unsigned int out_start;
unsigned int out_end;
unsigned int in_top;
@@ -788,8 +794,7 @@ static void find_seams(struct ipu_image_convert_ctx *ctx,
find_best_seam(ctx, out_start, out_end,
in_top_align, out_top_align, out_height_align,
ctx->downsize_coeff_v, ctx->image_resize_coeff_v,
- row == in->num_rows - 1,
- &in_top, &out_top);
+ allow_overshoot, &in_top, &out_top);
if ((ctx->rot_mode & IPU_ROT_BIT_VFLIP) ^
ipu_rot_mode_is_irt(ctx->rot_mode))