Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2449afcb authored by Trent Piepho's avatar Trent Piepho Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (11909): cx23885: Use v4l bounding/alignment function



The v4l function has a better algorithm for aligning image size.

Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1c657a99
Loading
Loading
Loading
Loading
+2 −9
Original line number Original line Diff line number Diff line
@@ -963,15 +963,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
	}
	}


	f->fmt.pix.field = field;
	f->fmt.pix.field = field;
	if (f->fmt.pix.height < 32)
	v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2,
		f->fmt.pix.height = 32;
			      &f->fmt.pix.height, 32, maxh, 0, 0);
	if (f->fmt.pix.height > maxh)
		f->fmt.pix.height = maxh;
	if (f->fmt.pix.width < 48)
		f->fmt.pix.width = 48;
	if (f->fmt.pix.width > maxw)
		f->fmt.pix.width = maxw;
	f->fmt.pix.width &= ~0x03;
	f->fmt.pix.bytesperline =
	f->fmt.pix.bytesperline =
		(f->fmt.pix.width * fmt->depth) >> 3;
		(f->fmt.pix.width * fmt->depth) >> 3;
	f->fmt.pix.sizeimage =
	f->fmt.pix.sizeimage =