Add Colorimetry control class for colorimetry controls
Unified · Split
| @@ -1215,6 +1215,10 @@ const char *v4l2_ctrl_get_name(u32 id) · 1214 unmodified lines | |||
| 1215 | case V4L2_CID_STATELESS_H264_DECODE_PARAMS: return "H264 Decode Parameters"; | 1215 | case V4L2_CID_STATELESS_H264_DECODE_PARAMS: return "H264 Decode Parameters"; |
| 1216 | case V4L2_CID_STATELESS_FWHT_PARAMS: return "FWHT Stateless Parameters"; | 1216 | case V4L2_CID_STATELESS_FWHT_PARAMS: return "FWHT Stateless Parameters"; |
| 1217 | case V4L2_CID_STATELESS_VP8_FRAME: return "VP8 Frame Parameters"; | 1217 | case V4L2_CID_STATELESS_VP8_FRAME: return "VP8 Frame Parameters"; |
| 1218 | |||
| 1219 | /* Colorimetry controls */ | ||
| 1220 | /* Keep the order of the 'case's the same as in v4l2-controls.h! */ | ||
| 1221 | case V4L2_CID_COLORIMETRY_CLASS: return "Colorimetry Controls"; | ||
| 1218 | default: | 1222 | default: |
| 1219 | return NULL; | 1223 | return NULL; |
| 1220 | } | 1224 | } |
| @@ -1418,8 +1422,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, · 197 unmodified lines | |||
| 1418 | case V4L2_CID_RF_TUNER_CLASS: | 1422 | case V4L2_CID_RF_TUNER_CLASS: |
| 1419 | case V4L2_CID_DETECT_CLASS: | 1423 | case V4L2_CID_DETECT_CLASS: |
| 1420 | case V4L2_CID_CODEC_STATELESS_CLASS: | 1424 | case V4L2_CID_CODEC_STATELESS_CLASS: |
| 1425 | case V4L2_CID_COLORIMETRY_CLASS: | ||
| 1421 | *type = V4L2_CTRL_TYPE_CTRL_CLASS; | 1426 | *type = V4L2_CTRL_TYPE_CTRL_CLASS; |
| 1422 | /* You can neither read not write these */ | 1427 | /* You can neither read nor write these */ |
| 1423 | *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY; | 1428 | *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY; |
| 1424 | *min = *max = *step = *def = 0; | 1429 | *min = *max = *step = *def = 0; |
| 1425 | break; | 1430 | break; |
| @@ -66,6 +66,7 @@ · 65 unmodified lines | |||
| 66 | #define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ | 66 | #define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ |
| 67 | #define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */ | 67 | #define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */ |
| 68 | #define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 /* Stateless codecs controls */ | 68 | #define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 /* Stateless codecs controls */ |
| 69 | #define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000 /* Colorimetry controls */ | ||
| 69 | 70 | ||
| 70 | /* User-class control IDs */ | 71 | /* User-class control IDs */ |
| 71 | 72 | ||
| @@ -1861,6 +1862,9 @@ struct v4l2_ctrl_vp8_frame { · 1789 unmodified lines | |||
| 1861 | __u64 flags; | 1862 | __u64 flags; |
| 1862 | }; | 1863 | }; |
| 1863 | 1864 | ||
| 1865 | #define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900) | ||
| 1866 | #define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1) | ||
| 1867 | |||
| 1864 | /* MPEG-compression definitions kept for backwards compatibility */ | 1868 | /* MPEG-compression definitions kept for backwards compatibility */ |
| 1865 | #ifndef __KERNEL__ | 1869 | #ifndef __KERNEL__ |
| 1866 | #define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC | 1870 | #define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC |