History

Merge tag 'media/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab: - the usbvision driver was dropped from staging - the Zoran driver were re-added at staging. It gained lots of improvements, and was converted to use videobuf2 API - a new virtual driver (vidtv) was added in order to allow testing the digital TV framework and APIs - the media uAPI documentation gained a glossary with commonly used terms, helping to simplify some parts of the docs - more cleanups at the atomisp driver - Mediatek VPU gained support for MT8183 - added support for codecs with supports doing colorspace conversion (CSC) - support for CSC API was added at vivid and rksip1 drivers - added a helper core support and uAPI for better supporting H.264 codecs - added support for Renesas R8A774E1 - use the new SPDX GFDL-1.1-no-invariants-or-later license on media uAPI docs, instead of a license text - Venus driver has gained VP9 codec support - lots of other cleanups and driver improvements * tag 'media/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (555 commits) media: dvb-frontends/drxk_hard.c: fix uninitialized variable warning media: tvp7002: fix uninitialized variable warning media: s5k5baf: drop 'data' field in struct s5k5baf_fw media: dt-bindings: media: venus: Add an optional power domain for perf voting media: rcar-vin: rcar-dma: Fix setting VNIS_REG for RAW8 formats media: staging: rkisp1: uapi: Do not use BIT() macro media: v4l2-mem2mem: Fix spurious v4l2_m2m_buf_done media: usbtv: Fix refcounting mixup media: zoran.rst: place it at the right place this time media: add Zoran cardlist media: admin-guide: update cardlists media: siano: rename a duplicated card string media: zoran: move documentation file to the right place media: atomisp: fixes build breakage for ISP2400 due to a cleanup media: zoran: fix mixed case on vars media: zoran: get rid of an unused var media: zoran: use upper case for card types media: zoran: fix sparse warnings media: zoran: fix smatch warning media: zoran: update TODO ...

Linus Torvalds committed 6 years ago

Commit fd5c32d2 parents 647412d c386e071002 files · +26154 −18129Browse files

Showing the changes to include/uapi/linux (4 of 1002 files). Show all

Unified · Split

4 files
  1. include/uapi/linux/v4l2-controls.h +25 −0
  2. include/uapi/linux/v4l2-mediabus.h +13 −2
  3. include/uapi/linux/v4l2-subdev.h +9 −1
  4. include/uapi/linux/videodev2.h +14 −9
include/uapi/linux/v4l2-controls.h+25−0
@@ -375,6 +375,7 @@ enum v4l2_mpeg_video_aspect { · 374 unmodified lines
375375 enum v4l2_mpeg_video_bitrate_mode {
376376 V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
377377 V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
378+ V4L2_MPEG_VIDEO_BITRATE_MODE_CQ = 2,
378379 };
379380 #define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
380381 #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
@@ -650,6 +651,23 @@ enum v4l2_mpeg_video_vp9_profile { · 269 unmodified lines
650651 V4L2_MPEG_VIDEO_VP9_PROFILE_2 = 2,
651652 V4L2_MPEG_VIDEO_VP9_PROFILE_3 = 3,
652653 };
654+#define V4L2_CID_MPEG_VIDEO_VP9_LEVEL (V4L2_CID_MPEG_BASE+513)
655+enum v4l2_mpeg_video_vp9_level {
656+ V4L2_MPEG_VIDEO_VP9_LEVEL_1_0 = 0,
657+ V4L2_MPEG_VIDEO_VP9_LEVEL_1_1 = 1,
658+ V4L2_MPEG_VIDEO_VP9_LEVEL_2_0 = 2,
659+ V4L2_MPEG_VIDEO_VP9_LEVEL_2_1 = 3,
660+ V4L2_MPEG_VIDEO_VP9_LEVEL_3_0 = 4,
661+ V4L2_MPEG_VIDEO_VP9_LEVEL_3_1 = 5,
662+ V4L2_MPEG_VIDEO_VP9_LEVEL_4_0 = 6,
663+ V4L2_MPEG_VIDEO_VP9_LEVEL_4_1 = 7,
664+ V4L2_MPEG_VIDEO_VP9_LEVEL_5_0 = 8,
665+ V4L2_MPEG_VIDEO_VP9_LEVEL_5_1 = 9,
666+ V4L2_MPEG_VIDEO_VP9_LEVEL_5_2 = 10,
667+ V4L2_MPEG_VIDEO_VP9_LEVEL_6_0 = 11,
668+ V4L2_MPEG_VIDEO_VP9_LEVEL_6_1 = 12,
669+ V4L2_MPEG_VIDEO_VP9_LEVEL_6_2 = 13,
670+};
653671
654672 /* CIDs for HEVC encoding. */
655673
@@ -742,6 +760,13 @@ enum v4l2_cid_mpeg_video_hevc_size_of_length_field { · 86 unmodified lines
742760 #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_MPEG_BASE + 642)
743761 #define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_MPEG_BASE + 643)
744762 #define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_MPEG_BASE + 644)
763+#define V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (V4L2_CID_MPEG_BASE + 645)
764+#define V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_BASE + 646)
765+enum v4l2_mpeg_video_frame_skip_mode {
766+ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED = 0,
767+ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1,
768+ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2,
769+};
745770
746771 /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
747772 #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
include/uapi/linux/v4l2-mediabus.h+13−2
@@ -16,6 +16,8 @@ · 15 unmodified lines
1616 #include <linux/types.h>
1717 #include <linux/videodev2.h>
1818
19+#define V4L2_MBUS_FRAMEFMT_SET_CSC 0x0001
20+
1921 /**
2022 * struct v4l2_mbus_framefmt - frame format on the media bus
2123 * @width: image width
@@ -24,8 +26,11 @@ · 2 unmodified lines
2426 * @field: used interlacing type (from enum v4l2_field)
2527 * @colorspace: colorspace of the data (from enum v4l2_colorspace)
2628 * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding)
29+ * @hsv_enc: HSV encoding of the data (from enum v4l2_hsv_encoding)
2730 * @quantization: quantization of the data (from enum v4l2_quantization)
2831 * @xfer_func: transfer function of the data (from enum v4l2_xfer_func)
32+ * @flags: flags (V4L2_MBUS_FRAMEFMT_*)
33+ * @reserved: reserved bytes that can be later used
2934 */
3035 struct v4l2_mbus_framefmt {
3136 __u32 width;
@@ -33,10 +38,16 @@ struct v4l2_mbus_framefmt { · 1 unmodified line
3338 __u32 code;
3439 __u32 field;
3540 __u32 colorspace;
36− __u16 ycbcr_enc;
41+ union {
42+ /* enum v4l2_ycbcr_encoding */
43+ __u16 ycbcr_enc;
44+ /* enum v4l2_hsv_encoding */
45+ __u16 hsv_enc;
46+ };
3747 __u16 quantization;
3848 __u16 xfer_func;
39− __u16 reserved[11];
49+ __u16 flags;
50+ __u16 reserved[10];
4051 };
4152
4253 #ifndef __KERNEL__
include/uapi/linux/v4l2-subdev.h+9−1
@@ -65,19 +65,27 @@ struct v4l2_subdev_crop { · 64 unmodified lines
6565 __u32 reserved[8];
6666 };
6767
68+#define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001
69+#define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002
70+#define V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC 0x00000004
71+#define V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC
72+#define V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION 0x00000008
73+
6874 /**
6975 * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration
7076 * @pad: pad number, as reported by the media API
7177 * @index: format index during enumeration
7278 * @code: format code (MEDIA_BUS_FMT_ definitions)
7379 * @which: format type (from enum v4l2_subdev_format_whence)
80+ * @flags: flags set by the driver, (V4L2_SUBDEV_MBUS_CODE_*)
7481 */
7582 struct v4l2_subdev_mbus_code_enum {
7683 __u32 pad;
7784 __u32 index;
7885 __u32 code;
7986 __u32 which;
80− __u32 reserved[8];
87+ __u32 flags;
88+ __u32 reserved[7];
8189 };
8290
8391 /**
include/uapi/linux/videodev2.h+14−9
@@ -373,9 +373,9 @@ enum v4l2_hsv_encoding { · 372 unmodified lines
373373
374374 enum v4l2_quantization {
375375 /*
376− * The default for R'G'B' quantization is always full range, except
377− * for the BT2020 colorspace. For Y'CbCr the quantization is always
378− * limited range, except for COLORSPACE_JPEG: this is full range.
376+ * The default for R'G'B' quantization is always full range.
377+ * For Y'CbCr the quantization is always limited range, except
378+ * for COLORSPACE_JPEG: this is full range.
379379 */
380380 V4L2_QUANTIZATION_DEFAULT = 0,
381381 V4L2_QUANTIZATION_FULL_RANGE = 1,
@@ -384,14 +384,13 @@ enum v4l2_quantization { · 2 unmodified lines
384384
385385 /*
386386 * Determine how QUANTIZATION_DEFAULT should map to a proper quantization.
387− * This depends on whether the image is RGB or not, the colorspace and the
388− * Y'CbCr encoding.
387+ * This depends on whether the image is RGB or not, the colorspace.
388+ * The Y'CbCr encoding is not used anymore, but is still there for backwards
389+ * compatibility.
389390 */
390391 #define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb_or_hsv, colsp, ycbcr_enc) \
391− (((is_rgb_or_hsv) && (colsp) == V4L2_COLORSPACE_BT2020) ? \
392− V4L2_QUANTIZATION_LIM_RANGE : \
393− (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \
394− V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))
392+ (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \
393+ V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE)
395394
396395 /*
397396 * Deprecated names for opRGB colorspace (IEC 61966-2-5)
@@ -776,6 +775,7 @@ struct v4l2_pix_format { · 378 unmodified lines
776775
777776 /* Flags */
778777 #define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001
778+#define V4L2_PIX_FMT_FLAG_SET_CSC 0x00000002
779779
780780 /*
781781 * F O R M A T E N U M E R A T I O N
@@ -795,6 +795,11 @@ struct v4l2_fmtdesc { · 13 unmodified lines
795795 #define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004
796796 #define V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008
797797 #define V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL 0x0010
798+#define V4L2_FMT_FLAG_CSC_COLORSPACE 0x0020
799+#define V4L2_FMT_FLAG_CSC_XFER_FUNC 0x0040
800+#define V4L2_FMT_FLAG_CSC_YCBCR_ENC 0x0080
801+#define V4L2_FMT_FLAG_CSC_HSV_ENC V4L2_FMT_FLAG_CSC_YCBCR_ENC
802+#define V4L2_FMT_FLAG_CSC_QUANTIZATION 0x0100
798803
799804 /* Frame Size and frame rate enumeration */
800805 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t