Skip to content
Commit b0d3159b authored by Trent Piepho's avatar Trent Piepho Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (11901): v4l2: Create helper function for bounding and aligning images



Most hardware has limits on minimum and maximum image dimensions and also
requirements about alignment.  For example, image width must be even or a
multiple of four.  Some hardware has requirements that the total image size
(width * height) be a multiple of some power of two.

v4l_bound_align_image() will enforce min and max width and height, power of
two alignment on width and height, and power of two alignment on total
image size.

It uses an efficient algorithm that will try to find the "closest" image
size that meets the requirements.

Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2c0b19ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment