Commit e9ebce2d authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab

media: staging: rkisp1: rsz: get the capture format info from the capture struct

Currently the format info of the capture is retrieved by calling
the function v4l2_format_info. This is not needed since it is
already saved in the capture object.
Signed-off-by: default avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 839efdb6
...@@ -387,11 +387,9 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz, ...@@ -387,11 +387,9 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz,
if (rsz->pixel_enc == V4L2_PIXEL_ENC_YUV) { if (rsz->pixel_enc == V4L2_PIXEL_ENC_YUV) {
struct rkisp1_capture *cap = struct rkisp1_capture *cap =
&rsz->rkisp1->capture_devs[rsz->id]; &rsz->rkisp1->capture_devs[rsz->id];
const struct v4l2_format_info *pixfmt_info =
v4l2_format_info(cap->pix.fmt.pixelformat);
hdiv = pixfmt_info->hdiv; hdiv = cap->pix.info->hdiv;
vdiv = pixfmt_info->vdiv; vdiv = cap->pix.info->vdiv;
} }
src_c.width = src_y.width / hdiv; src_c.width = src_y.width / hdiv;
src_c.height = src_y.height / vdiv; src_c.height = src_y.height / vdiv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment