mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
v4l2: Sync kernel header with linuxtv tree
This notably add HEVC and FWHT support, and VP8/9 profiles are now an enumeration and their control exposed as a menu.
This commit is contained in:
parent
94f8603411
commit
6e1ad47db1
3 changed files with 217 additions and 80 deletions
|
@ -1,3 +1,4 @@
|
|||
/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||
/*
|
||||
* include/linux/v4l2-common.h
|
||||
*
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||
/*
|
||||
* Video for Linux Two controls header file
|
||||
*
|
||||
|
@ -187,7 +188,7 @@ enum v4l2_colorfx {
|
|||
|
||||
/* The base for the imx driver controls.
|
||||
* We reserve 16 controls for this driver. */
|
||||
#define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x1090)
|
||||
#define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x10b0)
|
||||
|
||||
/* MPEG-class control IDs */
|
||||
/* The MPEG controls are applicable to all codec controls
|
||||
|
@ -586,7 +587,115 @@ enum v4l2_vp8_golden_frame_sel {
|
|||
#define V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (V4L2_CID_MPEG_BASE+508)
|
||||
#define V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (V4L2_CID_MPEG_BASE+509)
|
||||
#define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_MPEG_BASE+510)
|
||||
#define V4L2_CID_MPEG_VIDEO_VPX_PROFILE (V4L2_CID_MPEG_BASE+511)
|
||||
|
||||
#define V4L2_CID_MPEG_VIDEO_VP8_PROFILE (V4L2_CID_MPEG_BASE+511)
|
||||
enum v4l2_mpeg_video_vp8_profile {
|
||||
V4L2_MPEG_VIDEO_VP8_PROFILE_0 = 0,
|
||||
V4L2_MPEG_VIDEO_VP8_PROFILE_1 = 1,
|
||||
V4L2_MPEG_VIDEO_VP8_PROFILE_2 = 2,
|
||||
V4L2_MPEG_VIDEO_VP8_PROFILE_3 = 3,
|
||||
};
|
||||
/* Deprecated alias for compatibility reasons. */
|
||||
#define V4L2_CID_MPEG_VIDEO_VPX_PROFILE V4L2_CID_MPEG_VIDEO_VP8_PROFILE
|
||||
#define V4L2_CID_MPEG_VIDEO_VP9_PROFILE (V4L2_CID_MPEG_BASE+512)
|
||||
enum v4l2_mpeg_video_vp9_profile {
|
||||
V4L2_MPEG_VIDEO_VP9_PROFILE_0 = 0,
|
||||
V4L2_MPEG_VIDEO_VP9_PROFILE_1 = 1,
|
||||
V4L2_MPEG_VIDEO_VP9_PROFILE_2 = 2,
|
||||
V4L2_MPEG_VIDEO_VP9_PROFILE_3 = 3,
|
||||
};
|
||||
|
||||
/* CIDs for HEVC encoding. */
|
||||
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (V4L2_CID_MPEG_BASE + 600)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (V4L2_CID_MPEG_BASE + 601)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (V4L2_CID_MPEG_BASE + 602)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (V4L2_CID_MPEG_BASE + 603)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (V4L2_CID_MPEG_BASE + 604)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (V4L2_CID_MPEG_BASE + 605)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE (V4L2_CID_MPEG_BASE + 606)
|
||||
enum v4l2_mpeg_video_hevc_hier_coding_type {
|
||||
V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B = 0,
|
||||
V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (V4L2_CID_MPEG_BASE + 607)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (V4L2_CID_MPEG_BASE + 608)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (V4L2_CID_MPEG_BASE + 609)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (V4L2_CID_MPEG_BASE + 610)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (V4L2_CID_MPEG_BASE + 611)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (V4L2_CID_MPEG_BASE + 612)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (V4L2_CID_MPEG_BASE + 613)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (V4L2_CID_MPEG_BASE + 614)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_PROFILE (V4L2_CID_MPEG_BASE + 615)
|
||||
enum v4l2_mpeg_video_hevc_profile {
|
||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN = 0,
|
||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE = 1,
|
||||
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_LEVEL (V4L2_CID_MPEG_BASE + 616)
|
||||
enum v4l2_mpeg_video_hevc_level {
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_1 = 0,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_2 = 1,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1 = 2,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_3 = 3,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1 = 4,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_4 = 5,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1 = 6,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_5 = 7,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1 = 8,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2 = 9,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_6 = 10,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1 = 11,
|
||||
V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2 = 12,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (V4L2_CID_MPEG_BASE + 617)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_TIER (V4L2_CID_MPEG_BASE + 618)
|
||||
enum v4l2_mpeg_video_hevc_tier {
|
||||
V4L2_MPEG_VIDEO_HEVC_TIER_MAIN = 0,
|
||||
V4L2_MPEG_VIDEO_HEVC_TIER_HIGH = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (V4L2_CID_MPEG_BASE + 619)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE + 620)
|
||||
enum v4l2_cid_mpeg_video_hevc_loop_filter_mode {
|
||||
V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED = 0,
|
||||
V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED = 1,
|
||||
V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (V4L2_CID_MPEG_BASE + 621)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (V4L2_CID_MPEG_BASE + 622)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE (V4L2_CID_MPEG_BASE + 623)
|
||||
enum v4l2_cid_mpeg_video_hevc_refresh_type {
|
||||
V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE = 0,
|
||||
V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA = 1,
|
||||
V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (V4L2_CID_MPEG_BASE + 624)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (V4L2_CID_MPEG_BASE + 625)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (V4L2_CID_MPEG_BASE + 626)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (V4L2_CID_MPEG_BASE + 627)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (V4L2_CID_MPEG_BASE + 628)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (V4L2_CID_MPEG_BASE + 629)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (V4L2_CID_MPEG_BASE + 630)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (V4L2_CID_MPEG_BASE + 631)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT (V4L2_CID_MPEG_BASE + 632)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (V4L2_CID_MPEG_BASE + 633)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (V4L2_CID_MPEG_BASE + 634)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD (V4L2_CID_MPEG_BASE + 635)
|
||||
enum v4l2_cid_mpeg_video_hevc_size_of_length_field {
|
||||
V4L2_MPEG_VIDEO_HEVC_SIZE_0 = 0,
|
||||
V4L2_MPEG_VIDEO_HEVC_SIZE_1 = 1,
|
||||
V4L2_MPEG_VIDEO_HEVC_SIZE_2 = 2,
|
||||
V4L2_MPEG_VIDEO_HEVC_SIZE_4 = 3,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (V4L2_CID_MPEG_BASE + 636)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (V4L2_CID_MPEG_BASE + 637)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (V4L2_CID_MPEG_BASE + 638)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (V4L2_CID_MPEG_BASE + 639)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (V4L2_CID_MPEG_BASE + 640)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (V4L2_CID_MPEG_BASE + 641)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_MPEG_BASE + 642)
|
||||
#define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_MPEG_BASE + 643)
|
||||
#define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_MPEG_BASE + 644)
|
||||
|
||||
/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
|
||||
|
@ -656,7 +765,6 @@ enum v4l2_mpeg_mfc51_video_force_frame_type {
|
|||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54)
|
||||
|
||||
|
||||
/* Camera class control IDs */
|
||||
|
||||
#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||
/*
|
||||
* Video for Linux Two header file
|
||||
*
|
||||
|
@ -519,6 +520,7 @@ struct v4l2_pix_format {
|
|||
|
||||
/* Grey bit-packed formats */
|
||||
#define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */
|
||||
#define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */
|
||||
|
||||
/* Palette formats */
|
||||
#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */
|
||||
|
@ -601,6 +603,16 @@ struct v4l2_pix_format {
|
|||
#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */
|
||||
#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
|
||||
#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */
|
||||
/* 12bit raw bayer packed, 6 bytes for every 4 pixels */
|
||||
#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C')
|
||||
#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C')
|
||||
#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C')
|
||||
#define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C')
|
||||
/* 14bit raw bayer packed, 7 bytes for every 4 pixels */
|
||||
#define V4L2_PIX_FMT_SBGGR14P v4l2_fourcc('p', 'B', 'E', 'E')
|
||||
#define V4L2_PIX_FMT_SGBRG14P v4l2_fourcc('p', 'G', 'E', 'E')
|
||||
#define V4L2_PIX_FMT_SGRBG14P v4l2_fourcc('p', 'g', 'E', 'E')
|
||||
#define V4L2_PIX_FMT_SRGGB14P v4l2_fourcc('p', 'R', 'E', 'E')
|
||||
#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */
|
||||
#define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */
|
||||
#define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */
|
||||
|
@ -627,6 +639,8 @@ struct v4l2_pix_format {
|
|||
#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
|
||||
#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
|
||||
#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */
|
||||
#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */
|
||||
#define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */
|
||||
|
||||
/* Vendor-specific formats */
|
||||
#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
|
||||
|
@ -661,6 +675,12 @@ struct v4l2_pix_format {
|
|||
#define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */
|
||||
#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
|
||||
|
||||
/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */
|
||||
#define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */
|
||||
#define V4L2_PIX_FMT_IPU3_SGBRG10 v4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */
|
||||
#define V4L2_PIX_FMT_IPU3_SGRBG10 v4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */
|
||||
#define V4L2_PIX_FMT_IPU3_SRGGB10 v4l2_fourcc('i', 'p', '3', 'r') /* IPU3 packed 10-bit RGGB bayer */
|
||||
|
||||
/* SDR formats - used only for Software Defined Radio devices */
|
||||
#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
|
||||
#define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */
|
||||
|
@ -680,6 +700,8 @@ struct v4l2_pix_format {
|
|||
/* Meta-data formats */
|
||||
#define V4L2_META_FMT_VSP1_HGO v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */
|
||||
#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */
|
||||
#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */
|
||||
#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
|
||||
|
||||
/* priv field value to indicates that subsequent fields are valid. */
|
||||
#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
|
||||
|
@ -1377,6 +1399,13 @@ struct v4l2_bt_timings {
|
|||
* InfoFrame).
|
||||
*/
|
||||
#define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8)
|
||||
/*
|
||||
* CEA-861 specific: only valid for video receivers.
|
||||
* If set, then HW can detect the difference between regular FPS and
|
||||
* 1000/1001 FPS. Note: This flag is only valid for HDMI VIC codes with
|
||||
* the V4L2_DV_FL_CAN_REDUCE_FPS flag set.
|
||||
*/
|
||||
#define V4L2_DV_FL_CAN_DETECT_REDUCED_FPS (1 << 9)
|
||||
|
||||
/* A few useful defines to calculate the total blanking and frame sizes */
|
||||
#define V4L2_DV_BT_BLANKING_WIDTH(bt) \
|
||||
|
@ -2294,7 +2323,6 @@ struct v4l2_create_buffers {
|
|||
*
|
||||
*/
|
||||
#define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability)
|
||||
#define VIDIOC_RESERVED _IO('V', 1)
|
||||
#define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc)
|
||||
#define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format)
|
||||
#define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format)
|
||||
|
|
Loading…
Reference in a new issue