mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 12:30:23 +09:00
FROMGIT: media: v4l: Add new Colorimetry Class
Add Colorimetry control class for colorimetry controls
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit f31b9ffd96
git://linuxtv.org/media_tree.git master )
BUG: 175389589
Link: https://lkml.org/lkml/2021/3/23/643
Change-Id: Icd7dd39d5f3d6a19220ddf49057eb041cdfb2e9a
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
This commit is contained in:
committed by
Todd Kjos
parent
a0ac76fc0c
commit
e6b18e4945
@@ -1211,6 +1211,10 @@ const char *v4l2_ctrl_get_name(u32 id)
|
||||
case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD: return "MD Global Threshold";
|
||||
case V4L2_CID_DETECT_MD_THRESHOLD_GRID: return "MD Threshold Grid";
|
||||
case V4L2_CID_DETECT_MD_REGION_GRID: return "MD Region Grid";
|
||||
|
||||
/* Colorimetry controls */
|
||||
/* Keep the order of the 'case's the same as in v4l2-controls.h! */
|
||||
case V4L2_CID_COLORIMETRY_CLASS: return "Colorimetry Controls";
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
@@ -1413,8 +1417,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
|
||||
case V4L2_CID_FM_RX_CLASS:
|
||||
case V4L2_CID_RF_TUNER_CLASS:
|
||||
case V4L2_CID_DETECT_CLASS:
|
||||
case V4L2_CID_COLORIMETRY_CLASS:
|
||||
*type = V4L2_CTRL_TYPE_CTRL_CLASS;
|
||||
/* You can neither read not write these */
|
||||
/* You can neither read nor write these */
|
||||
*flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY;
|
||||
*min = *max = *step = *def = 0;
|
||||
break;
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#define V4L2_CTRL_CLASS_FM_RX 0x00a10000 /* FM Receiver controls */
|
||||
#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */
|
||||
#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */
|
||||
#define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000 /* Colorimetry controls */
|
||||
|
||||
/* User-class control IDs */
|
||||
|
||||
@@ -1195,4 +1196,7 @@ enum v4l2_detect_md_mode {
|
||||
#define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3)
|
||||
#define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4)
|
||||
|
||||
#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
|
||||
#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user