Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13623467pxu; Sun, 3 Jan 2021 22:59:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWeh9+0dBs2ftL8i7gd69EMDJnqYv4peqqyKnwir2vpUsTpQkHpu0BR1fasZWrQ8zlsHwQ X-Received: by 2002:a17:906:958e:: with SMTP id r14mr67152367ejx.319.1609743582020; Sun, 03 Jan 2021 22:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609743582; cv=none; d=google.com; s=arc-20160816; b=L6xWLEEDOv+vX27YMJpOQIHhP56N07WNb/TIqyBgkqYPsc9JT1qpeh2pm1pI/6BLG1 TpbJhDzoB8sLI1kgZJR99eFlDs0fUucto0ePKEEhUEaabY6d2s+MfCUODqeTF2H+fzjy s68drRqWNl7zjbVgyUCWKkCDI55MvhzTxVp80n1ppXWDCbGBFwb0EdaA4TovuT5w1E1r lqTERdvJxeYhzN/dsUm/0q8Qd9JtFx5DwNBtli0wdS4zVjT+hpGmVJmC5j4ETTBhxmSY LazNqwUQy4HDAKZjNbom2h3kwD9TEy+rNs78moPGVBZ31nIyvbdGd4OP3Z6sNq8SLAkw 2w0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=ZoodYf6wgg2HX6QSWeIiO23v94LggFufq7OMh/86Q9o=; b=tNdAS0YuGgHh6XMyGuzlbpa9p7+MUOAhDIQ21oh2TkisBoNYbLfB7xmfg6jWEggsRI k6XZJwMXjt9SeAjLUo0saKdnBDaFeWq4Qm7A01Kr6Vu3LdfaZYeur7pxPKquq/L0unCI kffL7Nlb4DeYptrYMljDotIypeZQyhkNdKbpjDfw2onvjoNpC5mJdcUFeQcYByMz6uOs 1xN9Hzahl0suW8tToGSHjy9lTBy6mpXxpb6FsMB/syoc1EnqccPbQ43BN7NAAcu6KpfA XHXKAINhBolNRkdXD/o8zMR6S60I5JLushynsvMcC1NOfgiFeNlMztOgCZ2V/HpktuA9 sXLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si28875037edx.227.2021.01.03.22.59.19; Sun, 03 Jan 2021 22:59:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727788AbhADFmz (ORCPT + 99 others); Mon, 4 Jan 2021 00:42:55 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:26488 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbhADFmy (ORCPT ); Mon, 4 Jan 2021 00:42:54 -0500 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 03 Jan 2021 21:42:14 -0800 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 03 Jan 2021 21:42:12 -0800 X-QCInternal: smtphost Received: from dikshita-linux.qualcomm.com ([10.204.65.237]) by ironmsg01-blr.qualcomm.com with ESMTP; 04 Jan 2021 11:11:58 +0530 Received: by dikshita-linux.qualcomm.com (Postfix, from userid 347544) id ECE5E214AD; Mon, 4 Jan 2021 11:11:57 +0530 (IST) From: Dikshita Agarwal To: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl, stanimir.varbanov@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, vgarodia@codeaurora.org, Dikshita Agarwal Subject: [PATCH v4 1/2] media: v4l2-ctrl: Add base layer priority id control. Date: Mon, 4 Jan 2021 11:11:53 +0530 Message-Id: <1609738914-22769-2-git-send-email-dikshita@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1609738914-22769-1-git-send-email-dikshita@codeaurora.org> References: <1609738914-22769-1-git-send-email-dikshita@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This control indicates the priority id to be applied to base layer. Signed-off-by: Dikshita Agarwal --- 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(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 1675bcf..24df818 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -3655,3 +3655,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 diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 2ad6b5a..9bd795f 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -953,6 +953,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 Frames"; + 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_FWHT_I_FRAME_QP: return "FWHT I-Frame QP Value"; diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index c0bb87b..404e69c 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -425,6 +425,7 @@ enum v4l2_mpeg_video_multi_slice_mode { #define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_CODEC_BASE+230) #define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE+231) #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE+232) +#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_CODEC_BASE+233) /* CIDs for the MPEG-2 Part 2 (H.262) codec */ #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270) -- 2.7.4