Skip to contentSkip to conversation

media: v4l2-ctrl: Add base layer priority id control.

PATCH Superseded Dikshita Agarwal 1 participant 1 message Oct 8, 2020

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: v4l2-ctrl: Add base layer priority id control.

This control indicates the priority id to be applied to base layer.

---
 Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 9 +++++++++
 drivers/media/v4l2-core/v4l2-ctrls.c                      | 1 +
 include/uapi/linux/v4l2-controls.h                        | 1 +
 3 files changed, 11 insertions(+)
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +9 -0
index 690b066..264fb83 100644
@@ -1251,6 +1251,15 @@ enum v4l2_mpeg_video_h264_entropy_mode -
     Force a key frame for the next queued buffer. Applicable to
     encoders. This is a general, codec-agnostic keyframe control.
 
+``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITYID (integer)``
+	Specifies a priority identifier for the NAL unit,
+	which will be applied to base layer.
+	By default this value is set to 0 for base layer.
+	And the next layer will have priority ID assigned as 1,2,3 and so on.
+	Video encode can't decide the priority id to be applied to a layer
+	so this has to come from client.
+	Valid Range: from 0 to 63
+
 .. _v4l2-mpeg-video-h264-cpb-size:
 
 ``V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (integer)``
drivers/media/v4l2-core/v4l2-ctrls.c +1 -0
index 9296294..ec78510 100644
@@ -958,6 +958,7 @@ const char *v4l2_ctrl_get_name(u32 id)
 	case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE:		return "Vertical MV Search Range";
 	case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER:		return "Repeat Sequence Header";
 	case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME:		return "Force Key Frame";
+	case V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITYID:		return "Base Layer Priority ID"
 	case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS:		return "MPEG-2 Slice Parameters";
 	case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION:		return "MPEG-2 Quantization Matrices";
 	case V4L2_CID_MPEG_VIDEO_FWHT_PARAMS:			return "FWHT Stateless Parameters";
include/uapi/linux/v4l2-controls.h +1 -0
index b869b54..9ed3e39 100644
@@ -415,6 +415,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
 #define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+227)
 #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE		(V4L2_CID_MPEG_BASE+228)
 #define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME		(V4L2_CID_MPEG_BASE+229)
+#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITYID	(V4L2_CID_MPEG_BASE+230)
 
 /* CIDs for the MPEG-2 Part 2 (H.262) codec */
 #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL			(V4L2_CID_MPEG_BASE+270)
Signature · 1 line
1.9.1