]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
media: v4l: common: Add a function to obtain best size from a list
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 23 Feb 2018 09:50:14 +0000 (04:50 -0500)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 27 Sep 2018 06:20:48 +0000 (08:20 +0200)
commit31bfe532b308c0fa29703f9e5d699201d08094d1
tree7c6bd06dd83e66cd1fd16f21facde9c86c0bac90
parent67ae5d175d03796127fa442e65e6733f1408107e
media: v4l: common: Add a function to obtain best size from a list

Add a function (as well as a helper macro) to obtain the best size in a
list of device specific sizes. This helps writing drivers as well as
aligns interface behaviour across drivers.

The struct in which this information is contained in is typically specific
to the driver, therefore the existing function v4l2_find_nearest_format()
does not address the need.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
drivers/media/v4l2-core/v4l2-common.c
include/media/v4l2-common.h