diff options
| author | Hans de Goede <[email protected]> | 2022-10-16 10:35:03 +0100 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2022-11-25 08:15:45 +0000 |
| commit | 4361af85109cdf89bd52f75157d818e4cecb2a4e (patch) | |
| tree | 82022c22876d22879987314b0242d4dc7b5e25a7 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 795ac295eacb291302b8951605677301c7938bd7 (diff) | |
media: atomisp: Refactor atomisp_adjust_fmt()
Refactor atomisp_adjust_fmt():
1. The block starting at "format_bridge = atomisp_get_format_bridge(...)"
and ending with "if (field == V4L2_FIELD_ANY) field = V4L2_FIELD_NONE;"
is duplicated. With only the second block:
a) Properly checking that format_bridge is not NULL; amd
b) Having the special handling for IA_CSS_FRAME_FORMAT_RAW
Remove the first block.
2. On a NULL return from atomisp_get_format_bridge(f->fmt.pix.pixelformat)
fall back to V4L2_PIX_FMT_YUV420 just like in the IA_CSS_FRAME_FORMAT_RAW
case. atomisp_adjust_fmt() is used in VIDIOC_TRY_FMT handling and that
should jusy pick a fmt rather then returning -EINVAL.
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions