media: v4l2-ctrl: Add base layer priority id control.
Subsystems (2)
PATCH v3 1/1 media: v4l2-ctrl: Add base layer priority id control.
This control indicates the priority id to be applied to base layer.
Signed-off-by Dikshita Agarwal <[email protected]>
--- 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
@@ -4467,3 +4467,12 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - This provides a bitmask which consists of bits [0, LTR_COUNT-1]. This is applicable to H264 and HEVC encoder and can be applied using Request Api. + +``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)`` + Specifies a priority identifier for the NAL unit, which will be applied to + the base layer. By default this value is set to 0 for the base layer, + and the next layer will have the priority ID assigned as 1, 2, 3 and so on. + The video encoder can't decide the priority id to be applied to a layer, + so this has to come from client. + This is applicable to H264 and valid Range is from 0 to 63. + Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1
drivers/media/v4l2-core/v4l2-ctrls.c +1 -0
@@ -961,6 +961,7 @@ const char *v4l2_ctrl_get_name(u32 id)case V4L2_CID_MPEG_VIDEO_LTR_COUNT :return "LTR Count" ;case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX :return "frame LTR index" ;case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES :return "Use LTR Frame(s)" ; +case V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID :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
@@ -424,6 +424,7 @@ enum v4l2_mpeg_video_multi_slice_mode {#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE+230)#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_MPEG_BASE+231)#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_MPEG_BASE+232) +#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_MPEG_BASE + 233)/* 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
2.7.4
Quoted 1 line · Dikshita Agarwal
This control indicates the priority id to be applied
id -> ID
(ditto in the subject)
Quoted 14 lines
to base layer.
Signed-off-by Dikshita Agarwal <[email protected]>--- 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 +0
-0
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst enum v4l2_mpeg_video_hevc_size_of_length_field - · line 4475
Quoted 9 lines
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +6
-0@@ -4467,3 +4467,12 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - This provides a bitmask which consists of bits [0, LTR_COUNT-1]. This is applicable to H264 and HEVC encoder and can be applied using Request Api. + +``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)`` + Specifies a priority identifier for the NAL unit, which will be applied to + the base layer. By default this value is set to 0 for the base layer, + and the next layer will have the priority ID assigned as 1, 2, 3 and so on. + The video encoder can't decide the priority id to be applied to a layer,
id -> ID
Quoted 21 lines
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +3
-0+ so this has to come from client. + This is applicable to H264 and valid Range is from 0 to 63. + Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1drivers/media/v4l2-core/v4l2-ctrls.c +1
-0@@ -961,6 +961,7 @@ const char *v4l2_ctrl_get_name(u32 id)case V4L2_CID_MPEG_VIDEO_LTR_COUNT :return "LTR Count" ;case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX :return "frame LTR index" ;case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES :return "Use LTR Frame(s)" ; +case V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID :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 +0
-0
include/uapi/linux/v4l2-controls.h enum v4l2_mpeg_video_multi_slice_mode { · line 430
Quoted 7 lines
include/uapi/linux/v4l2-controls.h +1
-0@@ -424,6 +424,7 @@ enum v4l2_mpeg_video_multi_slice_mode {#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE+230)#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_MPEG_BASE+231)#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_MPEG_BASE+232) +#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_MPEG_BASE + 233)/* CIDs for the MPEG-2 Part 2 (H.262) codec */ #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_MPEG_BASE+270)
Regards,
Hans