mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
media: rkisp1: resizer: Drop unneeded local variable
The sink_y local variable in rkisp1_rsz_config() stores a copy of the sink_crop crop rectangle. Drop it, and rename sink_crop to sink_y. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
603fbdc112
commit
1126d89f8f
|
|
@ -271,14 +271,12 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz,
|
|||
{
|
||||
const struct rkisp1_rsz_yuv_mbus_info *sink_yuv_info, *src_yuv_info;
|
||||
const struct v4l2_mbus_framefmt *src_fmt, *sink_fmt;
|
||||
const struct v4l2_rect *sink_crop;
|
||||
struct v4l2_rect sink_y, sink_c;
|
||||
const struct v4l2_rect *sink_y;
|
||||
struct v4l2_area src_y, src_c;
|
||||
struct v4l2_rect sink_c;
|
||||
|
||||
sink_fmt = v4l2_subdev_get_pad_format(&rsz->sd, sd_state,
|
||||
RKISP1_RSZ_PAD_SINK);
|
||||
sink_crop = v4l2_subdev_get_pad_crop(&rsz->sd, sd_state,
|
||||
RKISP1_RSZ_PAD_SINK);
|
||||
src_fmt = v4l2_subdev_get_pad_format(&rsz->sd, sd_state,
|
||||
RKISP1_RSZ_PAD_SRC);
|
||||
|
||||
|
|
@ -294,14 +292,14 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz,
|
|||
return;
|
||||
}
|
||||
|
||||
sink_y.width = sink_crop->width;
|
||||
sink_y.height = sink_crop->height;
|
||||
sink_y = v4l2_subdev_get_pad_crop(&rsz->sd, sd_state,
|
||||
RKISP1_RSZ_PAD_SINK);
|
||||
sink_c.width = sink_y->width / sink_yuv_info->hdiv;
|
||||
sink_c.height = sink_y->height / sink_yuv_info->vdiv;
|
||||
|
||||
src_y.width = src_fmt->width;
|
||||
src_y.height = src_fmt->height;
|
||||
|
||||
sink_c.width = sink_y.width / sink_yuv_info->hdiv;
|
||||
sink_c.height = sink_y.height / sink_yuv_info->vdiv;
|
||||
|
||||
/*
|
||||
* The resizer is used not only to change the dimensions of the frame
|
||||
* but also to change the scale for YUV formats,
|
||||
|
|
@ -317,13 +315,13 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz,
|
|||
}
|
||||
|
||||
dev_dbg(rsz->rkisp1->dev, "stream %d rsz/scale: %dx%d -> %dx%d\n",
|
||||
rsz->id, sink_crop->width, sink_crop->height,
|
||||
rsz->id, sink_y->width, sink_y->height,
|
||||
src_fmt->width, src_fmt->height);
|
||||
dev_dbg(rsz->rkisp1->dev, "chroma scaling %dx%d -> %dx%d\n",
|
||||
sink_c.width, sink_c.height, src_c.width, src_c.height);
|
||||
|
||||
/* set values in the hw */
|
||||
rkisp1_rsz_config_regs(rsz, &sink_y, &sink_c, &src_y, &src_c, when);
|
||||
rkisp1_rsz_config_regs(rsz, sink_y, &sink_c, &src_y, &src_c, when);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user