diff options
| author | Laurent Pinchart <[email protected]> | 2020-04-06 18:38:58 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2020-04-21 13:15:24 +0200 |
| commit | 0cd5d896a192887041f4030c1d388099a572322e (patch) | |
| tree | bd98c440901eeb386a4837299198e4d782047341 /tools/perf/scripts/python | |
| parent | c25ab5caf516f9439a5607162852d398c635d948 (diff) | |
media: imx: utils: Handle Bayer format lookup through a selection flag
The format lookup (and enumeration) functions take a boolean flag to
tell if Bayer formats should be considered. This leads to hard to read
lines such as
return enum_format(fourcc, NULL, index, cs_sel, true, false);
where the boolean parameters can easily be mixed. To make the code
clearer, add a CS_SEL_BAYER flag that can be passed through the
codespace_sel parameter of the lookup functions to replace the bool
parameter.
[[email protected]: Instead of declaring CS_SEL_ANY as a bitfield
containing only CS_SEL_YUV | CS_SEL_RGB, declare CS_SEL_ANY as all of
the above (YUV, RGB, BAYER). A new enum is declared for the YUV | RGB
selection as CS_SEL_YUV_RGB, and that is used by sub-devices that
don't support BAYER and only allow selecting and enumerating YUV or RGB
encodings. CS_SEL_ANY is now only used by the CSI sub-devices and the
attached capture interfaces, since only those devices support BAYER
formats.]
Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Steve Longerbeam <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions